Repository navigation
d3d12: CreateCommandSignature creates a DISPATCH_MESH signature on a device with mesh shaders (ExecuteIndirect with it not replayed yet) - #7330
Conversation
…device with mesh shaders The Vulkan layer created signatures for draw, draw-indexed and dispatch only and answered E_NOTIMPL for DISPATCH_MESH, which the PC runtime creates on any mesh-shader tier 1 device. A title that creates such a signature at startup and asserts on the result stopped there. The signature is created when the device has VK_EXT_mesh_shader (MeshShaderTier 1), as a new IndirectKind::dispatch_mesh (the name and value ItsNotRexed#3777 uses, so the two merge). ExecuteIndirect with it records nothing yet and says so once; ItsNotRexed#3777 replays it as vkCmdDrawMeshTasksIndirectEXT. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Independent Windows + GPU test of Setup: Windows 11 x64, MSVC 19.44.35220 (
AI-assisted review/test. |
|
Tested
AI-assisted (Claude Code). |
|
Independent native Windows check at efc3478, RTX 3060 12 GB / NVIDIA 621.14, clang-cl/xwin, Khronos validation 1.4.363. d3d12_execute_indirect_validation passed all 49 parity cases against native NVIDIA D3D12 and WARP, including the positive GPU dispatch, with zero validation errors. d3d12_mesh passed with validation off. With validation on, it failed twice with three vkCmdDrawMeshTasksEXT-pipelineStatistics-07076 reports, for the clipping counters already reported in #2359. I saw no other validation errors in those runs. AI-assisted testing. |
|
Verified at efc3478, merge-tree clean against current main 9177299. DISPATCH_MESH gated on the same MeshShaderTier as DispatchMesh, ExecuteIndirect-with-mesh records nothing and logs once — consistent with the stated "not replayed yet" scope (#3777) — and d3d12_mesh_test.cpp covers both the no-extension refusal and the create/execute/close path with stride<12 refused. C++/ctest not runnable on this box; CI pending is the execution gate. AI-assisted: yes. Tested on Linux (RTX 5080 host, CPU-only run, C++ review-only). |
Claimed in #7231 (comment)
Depends on: none (based on main). It overlaps #3777 on purpose: the new
IndirectKind::dispatch_mesh = 3has the name and value #3777 uses, and its creation case is the one #3777 adds. If #3777 lands first, this PR is unnecessary; if this lands first, #3777 drops the stand-in inExecuteIndirect.What
CreateCommandSignatureon the Vulkan layer creates a one-argumentDISPATCH_MESHsignature when the device hasVK_EXT_mesh_shader(it reportsMeshShaderTier1). Without the extension it is stillE_NOTIMPL, the same answer a mesh PSO gets there. The stride and argument-order checks before it are unchanged, so a stride below the 12 bytes ofD3D12_DISPATCH_MESH_ARGUMENTSisE_INVALIDARG.ExecuteIndirectwith such a signature validates its buffers as before, then records nothing and logs once: the replay is Runtime: ExecuteIndirect with DISPATCH_MESH signatures and the M5 mesh gate (translated mesh shader) #3777's (vkCmdDrawMeshTasksIndirectEXT). The list stays valid and closes.Why
The retail boot under
LEONIDA_D3D12=vulkan, with #7163 (type 105) and #7115 (slot 61) merged locally. The title's renderer init creates five one-argument command signatures at startup and asserts if any of them fails. The fifth is a 12-byteDISPATCH_MESH, which the layer refused withE_NOTIMPL. The PC runtime creates it on any mesh-tier-1 device, and the layer already has mesh PSOs andDispatchMeshon that tier.This is a stand-in: the title's indirect mesh dispatches draw nothing until the replay lands. I'll post that remaining work on the coordination issue.
Tested
Windows 11, MSVC 2022 (14.44, RelWithDebInfo, Ninja), RTX 5090, Vulkan SDK 1.4.363.0:
d3d12_mesh_test: exit 0. New checks: without the extension, the signature isE_NOTIMPL. With it, the signature is created, a stride of 8 isE_INVALIDARG, and a list withExecuteIndirectthrough the signature closesS_OK.CreateCommandSignatureexpectation.d3d12_execute_indirect_validation_test: 49 parity cases, 0 failures.d3d12_vulkan_device_testexits 1 here both with and without this change (no case reports a mismatch; it fails the same way on plain main on this machine).AI-assisted: yes (Claude Code)
Checklist
docs/design.md, with how it was confirmed. (n/a: no translator change)🤖 Generated with Claude Code