From 558022bc0256ec55d01fdb29f81fe7f012755c92 Mon Sep 17 00:00:00 2001 From: Jake Turner Date: Wed, 23 Jul 2025 15:21:39 +0100 Subject: [PATCH] D3D12 ExecuteIndirect allow callbacks to change the commandSignature This allows callbacks to recreate the command signature to match the root signature (which might have been modified) i.e. shader feedback --- renderdoc/driver/d3d12/d3d12_command_list_wrap.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/renderdoc/driver/d3d12/d3d12_command_list_wrap.cpp b/renderdoc/driver/d3d12/d3d12_command_list_wrap.cpp index 9e98c3f4a..c93149ea2 100644 --- a/renderdoc/driver/d3d12/d3d12_command_list_wrap.cpp +++ b/renderdoc/driver/d3d12/d3d12_command_list_wrap.cpp @@ -4254,6 +4254,9 @@ bool WrappedID3D12GraphicsCommandList::Serialise_ExecuteIndirect( uint32_t eventId = m_Cmd->HandlePreCallback(list, drawType, (i + 1) * comSig->sig.arguments.count()); + // Allow the callback to recreate the command signature i.e. to match the root signature + pCommandSignature = m_Cmd->m_IndirectData.commandSig; + // action up to and including i. The previous draws will be nop'd out Unwrap(list)->ExecuteIndirect(Unwrap(pCommandSignature), 1, argBuffer, argOffset, NULL, 0);