Fix D3D12 pixel history error if bound target is not declared in PSO

This commit is contained in:
baldurk
2025-11-03 11:34:07 +00:00
parent dec378eb9b
commit fef3f27250
@@ -1725,6 +1725,9 @@ private:
{
uint32_t rtIndex = GetPixelHistoryRenderTargetIndex(pipeState);
if(rtIndex >= pipeDesc.RTVFormats.NumRenderTargets)
flags |= UnboundFragmentShader;
bool found = false;
for(const SigParameter &o : origPSO->PS()->GetDetails().outputSignature)
{
@@ -2121,6 +2124,9 @@ struct D3D12PixelHistoryPerFragmentCallback : D3D12PixelHistoryCallback
D3D12_EXPANDED_PIPELINE_STATE_STREAM_DESC origPipeDesc;
origPSO->Fill(origPipeDesc);
if(renderTargetIndex >= origPipeDesc.RTVFormats.NumRenderTargets)
return;
PerFragmentPipelines pipes = CreatePerFragmentPipelines(state, eid, 0, renderTargetIndex);
ID3D12PipelineState *psosIter[2];