D3D12: Fix out of bounds root parameter index when per-pixel lighting is disabled

This commit is contained in:
Pokechu22
2025-01-14 22:00:46 -08:00
parent 3ea870ef8c
commit 64514bd8d4
3 changed files with 7 additions and 8 deletions

View File

@ -578,9 +578,8 @@ bool Gfx::ApplyState()
if (dirty_bits & DirtyState_PS_CUS_CBV)
{
cmdlist->SetGraphicsRootConstantBufferView(
g_ActiveConfig.bBBoxEnable ? ROOT_PARAMETER_PS_CUS_CBV : ROOT_PARAMETER_PS_CBV2,
m_state.constant_buffers[2]);
cmdlist->SetGraphicsRootConstantBufferView(ROOT_PARAMETER_PS_CUS_CBV,
m_state.constant_buffers[2]);
}
if (dirty_bits & DirtyState_VS_SRV_Descriptor && UsesDynamicVertexLoader(pipeline))