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). |
|
Tested on the retail executable: pass. Windows 11, i7-14700K, RTX 4070 SUPER, MSVC RelWithDebInfo, |
|
A host measurement for the path without mesh shaders. On an AMD RX 5700 (Windows 11, So Would you rather fold that into this PR, or shall I open a small follow-up on top of it? A follow-up would add a host-compared case and a GPU run on the RX 5700, which has no AI-assisted (Claude Code). |
|
Tested efc3478 on AMD Radeon RX 6650 XT (RDNA2), Windows 11, MSVC 14.44, Vulkan SDK 1.4.363:
|
|
Live on Wine 11.22 + RTX 5070 Ti: with #7163 alone, stop 19 still fails (the title's DISPATCH_MESH signature is refused by the Vulkan layer). With #7330 on top, all five device-slot-41 calls succeed (type 105 as DISPATCH from #7163, DISPATCH_MESH from #7330) and init goes on to slots 61, 24, 74 and 86. Environment: CachyOS, Wine 11.22, Intel i9-14900KF, RTX 5070 Ti / NVIDIA 620.73.04, Vulkan 1.4.357, clang-cl 23.1.5 + xwin SDK 10.0.26100, Release, |
|
Independent combined-stack check of
Merge details: retained all existing overridden slots and tests. #7115's sampler handler additionally translates its destination via #7021's existing CPU-handle helper in this local integration. All seven combined proxy mock modes pass. Windows 11 build 26300, RTX 5090 / driver 32.0.16.2124, clang-cl 21.1.8 + xwin SDK 10.0.26100, static CRT, Vulkan backend. Native Windows execution; socket/DNS/transmission entrypoints debugger-guarded, no assertion skipping. No Vulkan validation layer available. Counts and public API names only; no game data or raw diagnostics attached. AI-assisted (Codex). |
|
Independent Wine/RADV single-change comparison of #7330 at Arch Linux, Wine 11.18, RX 7900 XT / RADV Mesa 26.2.3, clang-cl 23.1.6 + xwin, RelWithDebInfo. Same prefix, shader library and 30-second offline sandbox; display available, no assertion skipping. Local diagnostic integration only, not current main or ladder-frame. Control: main
Synthetic results: 11/12 focused tests pass (seven proxy modes, COM, indirect-validation and two tiny-frame modes). This supports clearing the startup signature stop on this combination, not indirect mesh rendering: the PR's missing ExecuteIndirect replay remains missing. Next we are testing existing #7115, with attention to #7021's handle translation; no duplicate implementation. AI-assisted testing and review (Codex). |
|
checked: #7330 | with: merge of PR head onto main, then
AI-assisted. |
|
answer: dracbat's no-mesh proposal, measured on the retail title on a second GPU without base:
So on macOS this is the stop your change clears. Every Mac runs through MoltenVK, which has no AI-assisted. agent: yes |
|
checked: #7330 | with: applied the diff on main 6312c05, built d3d12_mesh_test (MSVC, Ninja RelWithDebInfo) | on: Windows 11, RX 9060 XT (mesh tier 1 confirmed by the test itself) | result: PASS — mesh tier 1, all 4096 pixels matched, pipeline-state-stream PSOs, statistics queries; the new DISPATCH_MESH signature cases (create with extension, E_NOTIMPL without, E_INVALIDARG under 12-byte stride, ExecuteIndirect records nothing and the list closes) all pass Code read: dispatch_mesh is gated on state_.info.mesh_shader like DispatchMesh itself, the un-replayed ExecuteIndirect path logs once and leaves the list valid instead of failing, and IndirectKind::dispatch_mesh is appended (no renumbering of existing kinds). AI-assisted check. |
|
checked: efc3478 | base: main@8575d36ed + #7330 | on: Windows 11, MSVC 14.51, NVIDIA RTX 4070 SUPER (621.14) | result: builds clean and the PR's
AI-assisted. |
… DISPATCH_MESH signature on a device with mesh shaders (ExecuteIndirect with it not replayed yet) Squashed from ItsNotRexed#7330 by NiiRoZz, head efc3478 (security scan PASS).
Reviewed head: efc3478 Review: ItsNotRexed#7330 (comment) Board: ItsNotRexed#8919 AI-assisted integration.
|
checked: #7330efc3478 | with: merged into a local retail-boot stack (main 867d922 + the boot PRs listed in #6824), retail 1.0.2.1 One note: |
|
Tested efc3478 under Wine: Proton Experimental (wine 11),
AI-assisted run (Claude Code); no game files used. |
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