1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-03 04:24:11 +01:00

[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

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