mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-25 15:16:22 +00:00
Fix D3D12 debug error when setting constants in EI
For instance would trigger when setting a single 32-bit root constant Do not need to call resize_for_index() on constants because SetConstants() will handle any resizing that is required
This commit is contained in:
@@ -3952,16 +3952,12 @@ void WrappedID3D12GraphicsCommandList::FinaliseExecuteIndirectEvents(BakedCmdLis
|
||||
|
||||
if(arg.Constant.RootParameterIndex < state.graphics.sigelems.size())
|
||||
{
|
||||
state.graphics.sigelems[arg.Constant.RootParameterIndex].constants.resize_for_index(
|
||||
arg.Constant.Num32BitValuesToSet + arg.Constant.DestOffsetIn32BitValues);
|
||||
state.graphics.sigelems[arg.Constant.RootParameterIndex].SetConstants(
|
||||
arg.Constant.Num32BitValuesToSet, data32, arg.Constant.DestOffsetIn32BitValues);
|
||||
}
|
||||
|
||||
if(arg.Constant.RootParameterIndex < state.compute.sigelems.size())
|
||||
{
|
||||
state.compute.sigelems[arg.Constant.RootParameterIndex].constants.resize_for_index(
|
||||
arg.Constant.Num32BitValuesToSet + arg.Constant.DestOffsetIn32BitValues);
|
||||
state.compute.sigelems[arg.Constant.RootParameterIndex].SetConstants(
|
||||
arg.Constant.Num32BitValuesToSet, data32, arg.Constant.DestOffsetIn32BitValues);
|
||||
}
|
||||
|
||||
@@ -110,16 +110,12 @@ 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(
|
||||
arg.Constant.Num32BitValuesToSet, data32, arg.Constant.DestOffsetIn32BitValues);
|
||||
}
|
||||
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(
|
||||
arg.Constant.Num32BitValuesToSet, data32, arg.Constant.DestOffsetIn32BitValues);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user