Skip to content

Commit 96963f5

Browse files
committed
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
1 parent 3e1090a commit 96963f5

File tree

2 files changed

+0
-8
lines changed

2 files changed

+0
-8
lines changed

renderdoc/driver/d3d12/d3d12_command_list_wrap.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3952,16 +3952,12 @@ void WrappedID3D12GraphicsCommandList::FinaliseExecuteIndirectEvents(BakedCmdLis
39523952

39533953
if(arg.Constant.RootParameterIndex < state.graphics.sigelems.size())
39543954
{
3955-
state.graphics.sigelems[arg.Constant.RootParameterIndex].constants.resize_for_index(
3956-
arg.Constant.Num32BitValuesToSet + arg.Constant.DestOffsetIn32BitValues);
39573955
state.graphics.sigelems[arg.Constant.RootParameterIndex].SetConstants(
39583956
arg.Constant.Num32BitValuesToSet, data32, arg.Constant.DestOffsetIn32BitValues);
39593957
}
39603958

39613959
if(arg.Constant.RootParameterIndex < state.compute.sigelems.size())
39623960
{
3963-
state.compute.sigelems[arg.Constant.RootParameterIndex].constants.resize_for_index(
3964-
arg.Constant.Num32BitValuesToSet + arg.Constant.DestOffsetIn32BitValues);
39653961
state.compute.sigelems[arg.Constant.RootParameterIndex].SetConstants(
39663962
arg.Constant.Num32BitValuesToSet, data32, arg.Constant.DestOffsetIn32BitValues);
39673963
}

renderdoc/driver/d3d12/d3d12_state.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,16 +110,12 @@ void D3D12RenderState::ResolvePendingIndirectState(WrappedID3D12Device *device)
110110
if(comSig->sig.graphics)
111111
{
112112
graphics.sigelems.resize_for_index(arg.Constant.RootParameterIndex);
113-
graphics.sigelems[arg.Constant.RootParameterIndex].constants.resize_for_index(
114-
arg.Constant.Num32BitValuesToSet + arg.Constant.DestOffsetIn32BitValues);
115113
graphics.sigelems[arg.Constant.RootParameterIndex].SetConstants(
116114
arg.Constant.Num32BitValuesToSet, data32, arg.Constant.DestOffsetIn32BitValues);
117115
}
118116
else
119117
{
120118
compute.sigelems.resize_for_index(arg.Constant.RootParameterIndex);
121-
compute.sigelems[arg.Constant.RootParameterIndex].constants.resize_for_index(
122-
arg.Constant.Num32BitValuesToSet + arg.Constant.DestOffsetIn32BitValues);
123119
compute.sigelems[arg.Constant.RootParameterIndex].SetConstants(
124120
arg.Constant.Num32BitValuesToSet, data32, arg.Constant.DestOffsetIn32BitValues);
125121
}

0 commit comments

Comments
 (0)