From 163facd7216ce0fe4bde3f62fcdaf9d2775c15b1 Mon Sep 17 00:00:00 2001 From: Tauwni <102470988+Tauwni@users.noreply.github.com> Date: Thu, 26 Nov 2026 03:47:33 +0100 Subject: [PATCH] vulkan_replay: indirect_record_size names IndirectKind::dispatch_mesh; command_list.h comment says how it records clang warned 35 times per build (-Wswitch, every target that includes vulkan_replay.h). A DISPATCH_MESH signature is recorded as a mesh Draw, never as an ExecuteIndirect command, so the answer stays 0 (rejected); the enum's comment still said ExecuteIndirect with it records nothing. Co-Authored-By: Claude Opus 5.5 --- runtime/src/command_list.h | 5 +++-- runtime/src/vulkan_replay.h | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/runtime/src/command_list.h b/runtime/src/command_list.h index d7d7396408..4036d4f07d 100644 --- a/runtime/src/command_list.h +++ b/runtime/src/command_list.h @@ -619,8 +619,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 f4e8136c4b..66b3dad7f1 100644 --- a/runtime/src/vulkan_replay.h +++ b/runtime/src/vulkan_replay.h @@ -2038,6 +2038,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; }