diff --git a/runtime/src/command_list.h b/runtime/src/command_list.h index 8b79c987e9..3ad697cfa6 100644 --- a/runtime/src/command_list.h +++ b/runtime/src/command_list.h @@ -620,8 +620,9 @@ enum class IndirectKind : std::uint8_t { draw = 0, draw_indexed = 1, dispatch = 2, - // D3D12_DISPATCH_MESH_ARGUMENTS. Created on a device with mesh shaders; ExecuteIndirect with it records nothing - // yet (the replay is #3777's), so a title that only creates such a signature at startup goes on. + // D3D12_DISPATCH_MESH_ARGUMENTS. Created on a device with mesh shaders; ExecuteIndirect with it records a mesh + // Draw that the replay draws with vkCmdDrawMeshTasksIndirect(Count)EXT after its clamp pass (d3d12_com.cpp, + // record_indirect), not an ExecuteIndirect command. dispatch_mesh = 3, }; diff --git a/runtime/src/vulkan_replay.h b/runtime/src/vulkan_replay.h index 4f3c476541..f72670cd3b 100644 --- a/runtime/src/vulkan_replay.h +++ b/runtime/src/vulkan_replay.h @@ -2054,6 +2054,9 @@ inline VkDeviceSize indirect_record_size(IndirectKind kind) { case IndirectKind::draw: return sizeof(VkDrawIndirectCommand); case IndirectKind::draw_indexed: return sizeof(VkDrawIndexedIndirectCommand); case IndirectKind::dispatch: return sizeof(VkDispatchIndirectCommand); + // A DISPATCH_MESH signature is recorded as a mesh Draw (record_indirect in d3d12_com.cpp), never as an + // ExecuteIndirect command, so one that reaches this is invalid: 0 makes the caller reject it. + case IndirectKind::dispatch_mesh: return 0; } return 0; }