[d3d11] Handle nullptr RasterizerState in ApplyRasterizerSampleCount

This broke as of a637134c56 is causing a crash in the BGFX d3d11 samples.
This commit is contained in:
Joshua Ashton 2022-09-16 06:11:05 +00:00 committed by Philip Rebohle
parent 3a6f8fa413
commit 699d56e35d
1 changed files with 3 additions and 1 deletions

View File

@ -3227,7 +3227,9 @@ namespace dxvk {
pc.rasterizerSampleCount = m_state.om.sampleCount;
if (unlikely(!m_state.om.sampleCount)) {
pc.rasterizerSampleCount = m_state.rs.state->Desc()->ForcedSampleCount;
pc.rasterizerSampleCount = m_state.rs.state
? m_state.rs.state->Desc()->ForcedSampleCount
: 0;
if (!pc.rasterizerSampleCount)
pc.rasterizerSampleCount = 1;