Limit impact of possible NV driver bug

* This seems to crash if no pipeline is bound when SetViewInstanceMask() is
  called. We can't make this completely conditional and still be legal, but at
  least we can avoid triggering it if view instancing isn't being used anyway.
This commit is contained in:
baldurk
2024-01-25 12:29:14 +00:00
parent aeaa2811f6
commit 775031c59b
+2 -1
View File
@@ -245,7 +245,8 @@ void D3D12RenderState::ApplyState(WrappedID3D12Device *dev, ID3D12GraphicsComman
}
// safe to set this - if the pipeline has view instancing disabled, it will do nothing
if(dev->GetOpts3().ViewInstancingTier != D3D12_VIEW_INSTANCING_TIER_NOT_SUPPORTED)
if(dev->GetOpts3().ViewInstancingTier != D3D12_VIEW_INSTANCING_TIER_NOT_SUPPORTED &&
viewInstMask != 0)
cmd->SetViewInstanceMask(viewInstMask);
}