[d3d9] Unbind depth image views on device reset

This commit is contained in:
Joshua Ashton 2020-05-07 15:35:48 +01:00
parent 42deab0d60
commit a6771daf49
1 changed files with 6 additions and 3 deletions

View File

@ -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);
});
}