From 3b57c82fe43ffc4280e522a08b413ac9fb807066 Mon Sep 17 00:00:00 2001 From: Triang3l Date: Sat, 3 Nov 2018 20:55:50 +0300 Subject: [PATCH] [D3D12] ROV: Don't use the D24FS8-specific clear shader with ROV --- src/xenia/gpu/d3d12/render_target_cache.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/xenia/gpu/d3d12/render_target_cache.cc b/src/xenia/gpu/d3d12/render_target_cache.cc index d6231b6d1..a36d7137d 100644 --- a/src/xenia/gpu/d3d12/render_target_cache.cc +++ b/src/xenia/gpu/d3d12/render_target_cache.cc @@ -1541,7 +1541,8 @@ bool RenderTargetCache::ResolveClear(uint32_t edram_base, (clear_rect.bottom << (16 + samples_y_log2)); root_constants.base_depth_pitch = edram_base | (is_depth ? (1 << 11) : 0) | (surface_pitch_tiles << 12); - if (is_depth && + // When ROV is used, there's no 32-bit depth buffer. + if (!command_processor_->IsROVUsedForEDRAM() && is_depth && DepthRenderTargetFormat(format) == DepthRenderTargetFormat::kD24FS8) { root_constants.clear_depth24 = regs[XE_GPU_REG_RB_DEPTH_CLEAR].u32; // 20e4 [0,2), based on CFloat24 from d3dref9.dll and on 6e4 in DirectXTex.