From 02ea97edfa10c001eb232e0ef7a5e0fd2938edce Mon Sep 17 00:00:00 2001 From: Royoo <3230853833@qq.com> Date: Thu, 26 Nov 2026 10:57:20 +0800 Subject: [PATCH] Share target tracking between translated SRV and UAV checks --- src/startup_stubs/d3d12_xs_device.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/startup_stubs/d3d12_xs_device.cpp b/src/startup_stubs/d3d12_xs_device.cpp index a6e66c8542..95e40f2cd4 100644 --- a/src/startup_stubs/d3d12_xs_device.cpp +++ b/src/startup_stubs/d3d12_xs_device.cpp @@ -2501,11 +2501,9 @@ struct Pass { UINT stencil_reference = 0; // last guest OMSetStencilRef on this recording UINT target_count = 0; ID3D12Resource* target0 = nullptr; // desktop resource of render target 0 (for per-draw dumps) - ID3D12Resource* bound_targets[8]{}; - ID3D12Resource* bound_depth = nullptr; ID3D12Resource* trace_targets[8]{}; ID3D12Resource* trace_depth = nullptr; - ID3D12Resource* bound_targets[8]{}; // the last accepted bind: targets [0, target_count) and the depth texture + ID3D12Resource* bound_targets[8]{}; // accepted color binds [0, target_count), shared by SRV and UAV checks ID3D12Resource* bound_depth = nullptr; bool heap_set = false; x2w_startup::SamplerSource title_samplers; @@ -3584,8 +3582,6 @@ void __stdcall list_targets(Wrapper* self, UINT count, const D3D12_CPU_DESCRIPTO } } if (!count && !dsv_ptr) return; - std::copy_n(targets, 8, pass.bound_targets); - pass.bound_depth = dsv_target; if (red_producers().enabled()) { std::copy_n(targets, 8, pass.trace_targets); pass.trace_depth = dsv_target;