| Commit-Queue | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
class D3D12CommandQueueMockModernize the mock declarations using the unified `MOCK_METHOD` macro
For example:
```
MOCK_METHOD(HRESULT, Signal, (ID3D12Fence* fence, UINT64 value), (Calltype(STDMETHODCALLTYPE)));
```
if (auto status = WaitForInFlightWork(); !status.is_ok()) {I don't think we can call virtual methods in destructors.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +1 |
Modernize the mock declarations using the unified `MOCK_METHOD` macro
For example:
```
MOCK_METHOD(HRESULT, Signal, (ID3D12Fence* fence, UINT64 value), (Calltype(STDMETHODCALLTYPE)));
```
Done
if (auto status = WaitForInFlightWork(); !status.is_ok()) {I don't think we can call virtual methods in destructors.
Thanks for pointing this out! Updated to use a private Impl API in the dtor.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
D3D12VideoProcessorWrapper::~D3D12VideoProcessorWrapper() {Reorder the member declarations in `D3D12VideoEncodeDelegate` so that `video_processor_wrapper_` is declared *after* `processed_input_frame_`.
Because C++ destroys class members in the reverse order of their declaration, `processed_input_frame_` is destroyed and its underlying D3D12 resource reference is released before `video_processor_wrapper_`'s destructor is invoked.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Auto-Submit | +1 |
| Commit-Queue | +1 |
The +1 got removed. Please help to re-stamp. Thanks!
D3D12VideoProcessorWrapper::~D3D12VideoProcessorWrapper() {Reorder the member declarations in `D3D12VideoEncodeDelegate` so that `video_processor_wrapper_` is declared *after* `processed_input_frame_`.
Because C++ destroys class members in the reverse order of their declaration, `processed_input_frame_` is destroyed and its underlying D3D12 resource reference is released before `video_processor_wrapper_`'s destructor is invoked.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +2 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Fix GPU UAF in D3D12VideoProcessorWrapper teardown.
D3D12VideoEncodeDelegate::Encode() submits asynchronous video
processing work to D3D12VideoProcessorWrapper::ProcessFrames() and
relies on the CPU sync inside D3D12VideoEncoderWrapper::Encode() to
wait on it later. If a codec-specific EncodeImpl() bails between those
two steps (e.g. with kBadReferenceBuffer for a manual reference buffer
that was never populated), that sync is skipped and the subsequent
teardown releases the wrapper's command allocator, command list and
processed input frame while the video processor queue is still using
them.
Wait for in-flight video-processor work whenever EncodeImpl() errors
after ProcessFrames() may have submitted work, so the delegate's
resources are safe by the time NotifyError() begins teardown.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |