[D3D12] d3d12_break_on_error + fix PerformSwap descriptor heap wrap

This commit is contained in:
Triang3l
2020-05-17 00:26:04 +03:00
parent 8341a48210
commit b7a5c24bb1
7 changed files with 88 additions and 34 deletions

View File

@@ -342,9 +342,7 @@ void D3D12Context::EndSwap() {
direct_queue->ExecuteCommandLists(1, execute_command_lists);
// Present and check if the context was lost.
HRESULT result = swap_chain_->Present(0, 0);
if (result == DXGI_ERROR_DEVICE_RESET ||
result == DXGI_ERROR_DEVICE_REMOVED) {
if (FAILED(swap_chain_->Present(0, 0))) {
context_lost_ = true;
return;
}