Repository navigation
d3d12_mesh: compare the mixed query's GS/HS/DS/CS counters with the vertex-only query's (RADV counts GS for vertex draws) - #7256
crastinator wants to merge 1 commit into
Conversation
…ertex-only query's On RADV (RX 6700 XT, Mesa 26.3.1) a vertex draw with no geometry shader bound reports one GS invocation per primitive, so the mixed query's GSInvocations is 2 and `mixed.GSInvocations == 0` fails although the mesh draws add nothing (the mesh-only query is all zeros). The check now asks for what it means: the mesh draws add no GS/HS/DS/CS work, so the mixed query matches the vertex-only query, which has the same two vertex draws. The mesh-only checks are unchanged, and the statistics line also prints the GS counts.
Independent Windows + NVIDIA GeForce RTX 3090 Verification (
|
| Check | Result |
|---|---|
git diff --check main...HEAD |
PASS |
python -I scripts/check_no_game_data.py runtime/test/d3d12_mesh_test.cpp |
PASS |
python -m compileall -q make_game.py tools tests |
PASS |
python -I make_game.py --help |
PASS |
cmake --build runtime/build --config RelWithDebInfo --target d3d12_mesh_test --parallel 8 |
PASS (0 new warnings) |
ctest --test-dir runtime/build -C RelWithDebInfo -j 8 --output-on-failure -V -R "^d3d12_mesh$" |
PASS (0.46 s) |
ctest --test-dir runtime/build -C RelWithDebInfo -j 8 --output-on-failure -R "query|mesh|statistic|occlusion|predicat" |
13/13 PASS (1.21 s) |
Merge & validation check with #7112 (LEONIDA_VK_VALIDATION=1) |
Clean auto-merge on runtime/test/d3d12_mesh_test.cpp; PASS with 0 validation errors |
Output on NVIDIA GeForce RTX 3090 (driver 617.42)
- Default run (
d3d12_mesh):device: NVIDIA GeForce RTX 3090 subgroup sizes: 32..32 (default 32), requirable in stages 0x3fff, subgroupSizeControl on, computeFullSubgroups on statistics, mixed: IA 6/2 VS 6 GS 0 C 12/12 PS 3328 CS 0; mesh only: C 8/8 PS 1024; vertex only: GS 0 C 2 PS 2048 D3D-29: mesh tier 1; mesh and VS PSOs from pipeline state streams (9 refused as invalid, 2 as not implemented); DispatchMesh over X, Y and Z and a stream VS draw matched all 4096 pixels; wrong-kind draws fail at execution, oversized grids at Close; statistics queries around mesh draws resolve - With
LEONIDA_VK_VALIDATION=1:- Standalone on
e83aa4e6c: as noted in the PR description, hits the pre-existing 3 Ă—VUID-vkCmdDrawMeshTasksEXT-pipelineStatistics-07076from the clipping bits in the mesh query pool. - Combined with Runtime: mesh-draw statistics segments count no clipping (VUID-07076); clipping from mesh-primitives queries #7112 (which moves mesh clipping counts to
VK_QUERY_TYPE_MESH_PRIMITIVES_GENERATED_EXT): merges cleanly without conflict and exits0with0validation errors and identical counter output (statistics, mixed: IA 6/2 VS 6 GS 0 C 12/12 PS 3328 CS 0; mesh only: C 8/8 PS 1024; vertex only: GS 0 C 2 PS 2048).
- Standalone on
AI-assisted.
|
Tested
|
|
Tested |
|
Tested
Build: MSVC (VS 2022 Build Tools) RelWithDebInfo via |
|
Tested e83aa4e under Wine 11.21 on Linux, on RADV (AMD Raphael iGPU, RDNA2 gfx1036, Mesa 26.2.6) and NVIDIA RTX 3070 Ti (615.78.08): pass.
That is the Mesa driver itself under Wine, the setup the port is aimed at on Linux, and it behaves like the AMD Windows driver in the comment above. AI-assisted: yes. Claude Code ran these tests on my machine and wrote this summary. |
|
Tested merged onto AI-assisted (Claude Code) |
|
Tested e83aa4e merged onto main 5d74c27 on AMD Radeon RX 6700 XT (RDNA2, gfx1031, wave64 native), AMD 26.11.2 (Windows driver 32.0.21045.29003, Vulkan 1.4.315), Windows 11 Pro 26200, MSVC 19.44, RelWithDebInfo: pass
|
…otRexed#7145 ItsNotRexed#7327 ItsNotRexed#7391 ItsNotRexed#7186 ItsNotRexed#7220 ItsNotRexed#7260 ItsNotRexed#7279 ItsNotRexed#7294 ItsNotRexed#7301 ItsNotRexed#7404 ItsNotRexed#7449 ItsNotRexed#7459 ItsNotRexed#7481 ItsNotRexed#7029 ItsNotRexed#7157 ItsNotRexed#7161 ItsNotRexed#7210 ItsNotRexed#7213 ItsNotRexed#7241 ItsNotRexed#7256 ItsNotRexed#7268 ItsNotRexed#8919 fork integration. Each parent after the first is an exact reviewed PR head. ItsNotRexed#5180 554ddf4 ItsNotRexed#5180 (comment) ItsNotRexed#5887 1894146 ItsNotRexed#5887 (comment) ItsNotRexed#7145 8366ec8 ItsNotRexed#7145 (comment) ItsNotRexed#7327 0392f03 ItsNotRexed#7327 (comment) ItsNotRexed#7391 4abe9b3 ItsNotRexed#7391 (comment) ItsNotRexed#7186 f27a7e8 ItsNotRexed#7186 (comment) ItsNotRexed#7220 7fe517a ItsNotRexed#7220 (comment) ItsNotRexed#7260 007d10f ItsNotRexed#7260 (comment) ItsNotRexed#7279 d6b5221 ItsNotRexed#7279 (comment) ItsNotRexed#7294 d895219 ItsNotRexed#7294 (comment) ItsNotRexed#7301 ec5b887 ItsNotRexed#7301 (comment) ItsNotRexed#7404 3e2978f ItsNotRexed#7404 (comment) ItsNotRexed#7449 dfedc14 ItsNotRexed#7449 (comment) ItsNotRexed#7459 90045c5 ItsNotRexed#7459 (comment) ItsNotRexed#7481 fd9231a ItsNotRexed#7481 (comment) ItsNotRexed#7029 97211c7 ItsNotRexed#7029 (comment) ItsNotRexed#7157 4d13060 ItsNotRexed#7157 (comment) ItsNotRexed#7161 40066d7 ItsNotRexed#7161 (comment) ItsNotRexed#7210 9c8950e ItsNotRexed#7210 (comment) ItsNotRexed#7213 43e0772 ItsNotRexed#7213 (comment) ItsNotRexed#7241 50aef11 ItsNotRexed#7241 (comment) ItsNotRexed#7256 e83aa4e ItsNotRexed#7256 (comment) ItsNotRexed#7268 b75d669 ItsNotRexed#7268 (comment) AI-assisted integration.
Claimed in the coordination issue as: #7231 (comment) (new D3D item, follow-up of D3D-291 / #2359)
What and why
d3d12_meshfails on RADV atruntime/test/d3d12_mesh_test.cpp:474:On RADV a vertex draw with no geometry shader bound reports one GS invocation per primitive. The vertex-only query (two vertex draws, one triangle each) gives
GSInvocations2, and the mixed query, with the same two vertex draws plus the mesh draws, also gives 2. The mesh draws add nothing: the mesh-only query is all zeros, as the test expects. Every other counter in all three queries matches what the test asks for. NVIDIA reports 0 there and passes (thehollowedone's run on #2359).So the check was really about the driver's count for vertex draws, not about mesh draws. It now asks for what it means: the mesh draws add no GS/HS/DS/CS work, so the mixed query's counters equal the vertex-only query's. On a driver that reports 0 for both, this is as strict as before. The mesh-only checks are unchanged. The statistics line also prints the GS counts, so a failure on another driver shows the numbers.
Test only; the layer is unchanged. It doesn't overlap #7112, which changes the clipping bits of the mesh pool.
Tested
AMD Radeon RX 6700 XT (gfx1031), RADV Mesa 26.3.1, CachyOS, Linux 7.3.5. The Windows build was cross-compiled with clang-cl 23.1.5 + xwin (SDK 10.0.26100) and run under Wine 11.22. RADV's
VK_EXT_mesh_shaderreaches the test through winevulkan.main87c6c2b2e83aa4e6onmain8575d36e)d3d12_meshctest -R d3d12_mesh, and 3 direct runs)mixed: … GS 2 …; mesh only: C 8/8 PS 288; vertex only: GS 2 …LEONIDA_VK_VALIDATION=1wasn't run: this Wine prefix has no Windows validation layer. Under validation the test also hits #7112's VUID-07076, which this PR doesn't touch.AI-assisted: yes (Claude Code)
Checklist
docs/design.md, with how it was confirmed. (No translator change.)