From bc1caaffee5d70275b9f38f2d63b8b0e8ca41de8 Mon Sep 17 00:00:00 2001 From: baldurk Date: Fri, 17 Oct 2025 00:04:13 +0100 Subject: [PATCH] Ensure all UAVs are unbound for D3D11 pixel history pixel copy * This is necessary so the source texture can be bound as an SRV - we already unbind all RTVs. --- renderdoc/driver/d3d11/d3d11_pixelhistory.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/renderdoc/driver/d3d11/d3d11_pixelhistory.cpp b/renderdoc/driver/d3d11/d3d11_pixelhistory.cpp index 32ce4dc07..342045336 100644 --- a/renderdoc/driver/d3d11/d3d11_pixelhistory.cpp +++ b/renderdoc/driver/d3d11/d3d11_pixelhistory.cpp @@ -196,7 +196,7 @@ void D3D11DebugManager::PixelHistoryCopyPixel(D3D11CopyPixelParams &p, size_t ev UINT curCSNumInst = D3D11_SHADER_MAX_INTERFACES; ID3D11Buffer *curCSCBuf[2] = {0}; ID3D11ShaderResourceView *curCSSRVs[10] = {0}; - ID3D11UnorderedAccessView *curCSUAV[4] = {0}; + ID3D11UnorderedAccessView *curCSUAV[D3D11_1_UAV_SLOT_COUNT] = {0}; UINT initCounts[D3D11_1_UAV_SLOT_COUNT]; memset(&initCounts[0], 0xff, sizeof(initCounts)); @@ -234,6 +234,7 @@ void D3D11DebugManager::PixelHistoryCopyPixel(D3D11CopyPixelParams &p, size_t ev offs = 3; } + m_pImmediateContext->CSSetUnorderedAccessViews(0, D3D11_1_UAV_SLOT_COUNT, NULL, NULL); m_pImmediateContext->CSSetUnorderedAccessViews(offs, 1, &p.uav, initCounts); if(p.depthcopy)