From 71fbfdb63ee1c12c6a56d24e8fa8d38d53870ee0 Mon Sep 17 00:00:00 2001 From: Triang3l Date: Wed, 28 Apr 2021 17:27:57 +0300 Subject: [PATCH] [D3D12] Fix non-ROV clearing always giving 'failed in backend' --- src/xenia/gpu/d3d12/d3d12_render_target_cache.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/xenia/gpu/d3d12/d3d12_render_target_cache.cc b/src/xenia/gpu/d3d12/d3d12_render_target_cache.cc index 8287b14a5..05645029e 100644 --- a/src/xenia/gpu/d3d12/d3d12_render_target_cache.cc +++ b/src/xenia/gpu/d3d12/d3d12_render_target_cache.cc @@ -1518,6 +1518,8 @@ bool D3D12RenderTargetCache::Resolve(const Memory& memory, case Path::kHostRenderTargets: { Transfer::Rectangle clear_rectangle; RenderTarget* clear_render_targets[2]; + // If PrepareHostRenderTargetsResolveClear returns false, may be just an + // empty region (success) or an error - don't care. if (PrepareHostRenderTargetsResolveClear( resolve_info, clear_rectangle, clear_render_targets[0], clear_transfers_[0], clear_render_targets[1], @@ -1529,10 +1531,8 @@ bool D3D12RenderTargetCache::Resolve(const Memory& memory, PerformTransfersAndResolveClears(2, clear_render_targets, clear_transfers_, clear_values, &clear_rectangle); - } else { - // May be just an empty region (success) or an error - don't care. - cleared = true; } + cleared = true; } break; case Path::kPixelShaderInterlock: { ui::d3d12::util::DescriptorCpuGpuHandlePair descriptor_edram;