From a6771daf4948bf915669df7c792cf21585aa945d Mon Sep 17 00:00:00 2001 From: Joshua Ashton Date: Thu, 7 May 2020 15:35:48 +0100 Subject: [PATCH] [d3d9] Unbind depth image views on device reset --- src/d3d9/d3d9_device.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/d3d9/d3d9_device.cpp b/src/d3d9/d3d9_device.cpp index d853e0e8..e137ade7 100644 --- a/src/d3d9/d3d9_device.cpp +++ b/src/d3d9/d3d9_device.cpp @@ -6630,12 +6630,15 @@ namespace dxvk { DWORD sampler = i; auto samplerInfo = RemapStateSamplerShader(sampler); - uint32_t slot = computeResourceSlotId(samplerInfo.first, DxsoBindingType::ColorImage, uint32_t(samplerInfo.second)); + uint32_t colorSlot = computeResourceSlotId(samplerInfo.first, DxsoBindingType::ColorImage, uint32_t(samplerInfo.second)); + uint32_t depthSlot = computeResourceSlotId(samplerInfo.first, DxsoBindingType::DepthImage, uint32_t(samplerInfo.second)); EmitCs([ - cSlot = slot + cColorSlot = colorSlot, + cDepthSlot = depthSlot ](DxvkContext* ctx) { - ctx->bindResourceView(cSlot, nullptr, nullptr); + ctx->bindResourceView(cColorSlot, nullptr, nullptr); + ctx->bindResourceView(cDepthSlot, nullptr, nullptr); }); }