mirror of
https://github.com/microsoft/DirectXTex.git
synced 2025-07-13 13:40:14 +02:00
ScreenGrab12 missing some error handling
This commit is contained in:
parent
ca423ddeb2
commit
ccbaeb528d
@ -764,13 +764,17 @@ namespace
|
|||||||
// Transition the resource to the next state
|
// Transition the resource to the next state
|
||||||
TransitionResource(commandList.Get(), pSource, D3D12_RESOURCE_STATE_COPY_SOURCE, afterState);
|
TransitionResource(commandList.Get(), pSource, D3D12_RESOURCE_STATE_COPY_SOURCE, afterState);
|
||||||
|
|
||||||
commandList->Close();
|
hr = commandList->Close();
|
||||||
|
if (FAILED(hr))
|
||||||
|
return hr;
|
||||||
|
|
||||||
// Execute the command list
|
// Execute the command list
|
||||||
pCommandQ->ExecuteCommandLists(1, (ID3D12CommandList**)commandList.GetAddressOf());
|
pCommandQ->ExecuteCommandLists(1, (ID3D12CommandList**)commandList.GetAddressOf());
|
||||||
|
|
||||||
// Signal the fence
|
// Signal the fence
|
||||||
pCommandQ->Signal(fence.Get(), 1);
|
hr = pCommandQ->Signal(fence.Get(), 1);
|
||||||
|
if (FAILED(hr))
|
||||||
|
return hr;
|
||||||
|
|
||||||
// Block until the copy is complete
|
// Block until the copy is complete
|
||||||
while (fence->GetCompletedValue() < 1)
|
while (fence->GetCompletedValue() < 1)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user