Ensure we can set ExecuteIndirect root constant values

* If the array isn't large enough we must resize it, this was already done for
  CBV/SRV/UAV root parameter sets.
This commit is contained in:
baldurk
2025-09-10 14:56:41 +01:00
parent b5559e7d1b
commit 8546876aed
+2
View File
@@ -109,6 +109,7 @@ void D3D12RenderState::ResolvePendingIndirectState(WrappedID3D12Device *device)
if(comSig->sig.graphics)
{
graphics.sigelems.resize_for_index(arg.Constant.RootParameterIndex);
graphics.sigelems[arg.Constant.RootParameterIndex].constants.resize_for_index(
arg.Constant.Num32BitValuesToSet + arg.Constant.DestOffsetIn32BitValues);
graphics.sigelems[arg.Constant.RootParameterIndex].SetConstants(
@@ -116,6 +117,7 @@ void D3D12RenderState::ResolvePendingIndirectState(WrappedID3D12Device *device)
}
else
{
compute.sigelems.resize_for_index(arg.Constant.RootParameterIndex);
compute.sigelems[arg.Constant.RootParameterIndex].constants.resize_for_index(
arg.Constant.Num32BitValuesToSet + arg.Constant.DestOffsetIn32BitValues);
compute.sigelems[arg.Constant.RootParameterIndex].SetConstants(