1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-19 05:52:11 +01:00

[d3d11] Handle nullptr RasterizerState in ApplyRasterizerSampleCount

This broke as of a637134c56aea39ef031d9141224548df384269b 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

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;