fixed a D3D11 resource hazard warning about depth/stencil buffer bindings

swapped the calls back so that the depth buffer is never bound as both a RT and SRV at the same time
This commit is contained in:
myT 2020-10-09 04:01:26 +02:00
parent 6f7d4892df
commit dea818a260

View file

@ -920,8 +920,10 @@ static void ApplyPipeline(PipelineId index)
}
else
{
// keep this call order to make sure the depth buffer isn't bound as a SRV anymore
// when we set it as a render target
ApplyPixelShaderResource(1, d3d.textures[0].view);
d3ds.context->OMSetRenderTargets(1, &d3d.renderTargetViewMS, d3d.depthStencilView);
ApplyPixelShaderResource(1, d3d.textures[0].view); // make sure the depth shader view isn't bound anymore
}
d3d.pipelineIndex = index;