d3d12/vulkan: the mesh statistics pool enables no forbidden counter (D3D-291) #540

Manually merged
github merged 1 commit from gh-pr/540/head into gh-pr/540/base 2026-11-26 09:07:22 +00:00
Owner

@⁠Mby159 on GitHub · 2026-11-24 07:15 UTC · original
Mby159:d3d-291-mesh-statistics → main · +162 −83 · 8 files · 1 commits · merged 2026-11-24 13:37 UTC

Claimed in the coordination issue as: D3D-291 (#14)

What and why

The pool a mesh draw runs in enabled the two clipping counters, and
VUID-vkCmdDrawMeshTasksEXT-pipelineStatistics-07076 names both of them among the counters a pool that is active
during a vkCmdDrawMeshTasksEXT must not have: the validation layer reports the VUID on every DispatchMesh inside a
statistics query. The finding is in
#14 and is the mesh half of #506.

The VUID leaves the fragment and compute invocations allowed, so the mesh pool now counts those two only. The two sets
of counters are named in runtime/src/vulkan_replay.h (kMeshStatisticsFlags and the bits the same VUID forbids),
so the rule is in one place and a test can check it. The sum copies the two counters into the PSInvocations and
CSInvocations fields of the record, and the clipping fields of a mesh segment read 0.

That last part is a measured difference from D3D12: D3D12 counts the clipping invocations and primitives of a mesh
pipeline (one synthetic triangle gave one of each in WARP and in native D3D12), but Vulkan has no counter for them
during a mesh draw, so there is nothing to read them from. Ordinary draw segments still supply all eleven counters, so
a query that mixes both kinds keeps the clipping count of its vertex draws.

runtime/src/statistics_sum_spirv.h is regenerated from statistics_sum.comp with glslang 16.6.0 (the version the
CI pins) and the command its header names; the module's ID numbering differs slightly from the build it replaces, the
code is the same apart from that one condition.

Tested

  • ctest --test-dir runtime/build -C Release: 72 of 72 tests passed (2 skipped: shader_library_corpus needs the
    game's shaders, vk_sync_validation needs a device with the feature). Built with clang 23.1.6 (llvm-mingw
    20261117) against the pinned Vulkan headers (6802bb47, vulkan-sdk-1.4.363.0).
  • replay_query_predication_test (new case 17) checks that the mesh pool enables none of the nine counters the VUID
    forbids, and counts every one it leaves allowed.
  • replay_query_edges_test (new case) runs the mesh sum through the CPU mocks: the mesh segment is read from the
    mesh pool, and it fills PSInvocations and CSInvocations and no other field.
  • python -I scripts/run_semantic_tests.py -j 6 tests/semantic: 465 files, 6105 tests, 0 files failed on main
    (8f481cf1). The translator is untouched.
  • python -I scripts/check_no_game_data.py <the eight changed files>: passes.
  • The regenerated SPIR-V passes spirv-val.

CI

windows, no-game-data and change-scope pass. macos and linux-gpu-tools fail, on
cs_imgload_tfe and cs_imgload_d16_tfe (texel(5,3) = 2071 against the expected 71). Those two
fixtures are the translator bug of #31, and the failure is on main too: the runtime run of
main at 84347bbb fails the same two jobs the same way. This pull request does not touch the
translator or those fixtures, and the same two jobs fail on other open pull requests (#382, #345,
#411), so the red is inherited rather than introduced here.

The GPU test that covers this path is d3d12_mesh_test, which needs a GPU with VK_EXT_mesh_shader and the
Khronos validation layer; this machine has neither (the Radeon 780M is RDNA3, which has no mesh shader support, and
there is no validation layer installed). The validation-layer and WARP/D3D12 measurements for this fix are in the
withdrawn duplicate #527, which reached the same change: on main c023a365 d3d12_mesh reports three VUID
errors, with the mesh pool counting the fragment and compute invocations only it reports none, the rendered image
still matches all 4096 pixels, the mixed and vertex-only clipping counts are both 2/2 and the mesh-only one is 0/0,
and the mesh-only query still records pixel shader invocations.

GPUs tested: n/a on this host. The measurements above are from sodove's Windows 11 host (NVIDIA GeForce RTX 5070 Ti,
driver 610.74, Khronos validation layer 1.4.369, MSVC 19.44.35220).

AI-assisted: yes.

Checklist

  • Based on current main and merges cleanly.
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption.
  • A new translator rule is in the contract table of docs/design.md (not applicable: this is the D3D12 to Vulkan
    runtime layer, whose contract is docs/d3d12_vulkan.md).
**@⁠Mby159** on GitHub · 2026-11-24 07:15 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/540) `Mby159:d3d-291-mesh-statistics` → `main` · +162 −83 · 8 files · 1 commits · merged 2026-11-24 13:37 UTC Claimed in the coordination issue as: D3D-291 ([#14](https://git.gtahub.st/github/ubiquitarianism--leonida/issues/14)) ### What and why The pool a mesh draw runs in enabled the two clipping counters, and `VUID-vkCmdDrawMeshTasksEXT-pipelineStatistics-07076` names both of them among the counters a pool that is active during a `vkCmdDrawMeshTasksEXT` must not have: the validation layer reports the VUID on every `DispatchMesh` inside a statistics query. The finding is in [#14](https://git.gtahub.st/github/ubiquitarianism--leonida/issues/14) and is the mesh half of #506. The VUID leaves the fragment and compute invocations allowed, so the mesh pool now counts those two only. The two sets of counters are named in `runtime/src/vulkan_replay.h` (`kMeshStatisticsFlags` and the bits the same VUID forbids), so the rule is in one place and a test can check it. The sum copies the two counters into the `PSInvocations` and `CSInvocations` fields of the record, and the clipping fields of a mesh segment read 0. That last part is a measured difference from D3D12: D3D12 counts the clipping invocations and primitives of a mesh pipeline (one synthetic triangle gave one of each in WARP and in native D3D12), but Vulkan has no counter for them during a mesh draw, so there is nothing to read them from. Ordinary draw segments still supply all eleven counters, so a query that mixes both kinds keeps the clipping count of its vertex draws. `runtime/src/statistics_sum_spirv.h` is regenerated from `statistics_sum.comp` with glslang 16.6.0 (the version the CI pins) and the command its header names; the module's ID numbering differs slightly from the build it replaces, the code is the same apart from that one condition. ### Tested - `ctest --test-dir runtime/build -C Release`: 72 of 72 tests passed (2 skipped: `shader_library_corpus` needs the game's shaders, `vk_sync_validation` needs a device with the feature). Built with clang 23.1.6 (llvm-mingw 20261117) against the pinned Vulkan headers (6802bb47, vulkan-sdk-1.4.363.0). - `replay_query_predication_test` (new case 17) checks that the mesh pool enables none of the nine counters the VUID forbids, and counts every one it leaves allowed. - `replay_query_edges_test` (new case) runs the mesh sum through the CPU mocks: the mesh segment is read from the mesh pool, and it fills `PSInvocations` and `CSInvocations` and no other field. - `python -I scripts/run_semantic_tests.py -j 6 tests/semantic`: 465 files, 6105 tests, 0 files failed on `main` (8f481cf1). The translator is untouched. - `python -I scripts/check_no_game_data.py <the eight changed files>`: passes. - The regenerated SPIR-V passes `spirv-val`. ### CI `windows`, `no-game-data` and `change-scope` pass. `macos` and `linux-gpu-tools` fail, on `cs_imgload_tfe` and `cs_imgload_d16_tfe` (`texel(5,3) = 2071` against the expected 71). Those two fixtures are the translator bug of #31, and the failure is on `main` too: the runtime run of `main` at `84347bbb` fails the same two jobs the same way. This pull request does not touch the translator or those fixtures, and the same two jobs fail on other open pull requests (#382, #345, #411), so the red is inherited rather than introduced here. The GPU test that covers this path is `d3d12_mesh_test`, which needs a GPU with `VK_EXT_mesh_shader` and the Khronos validation layer; this machine has neither (the Radeon 780M is RDNA3, which has no mesh shader support, and there is no validation layer installed). The validation-layer and WARP/D3D12 measurements for this fix are in the withdrawn duplicate #527, which reached the same change: on `main` `c023a365` `d3d12_mesh` reports three VUID errors, with the mesh pool counting the fragment and compute invocations only it reports none, the rendered image still matches all 4096 pixels, the mixed and vertex-only clipping counts are both 2/2 and the mesh-only one is 0/0, and the mesh-only query still records pixel shader invocations. GPUs tested: n/a on this host. The measurements above are from sodove's Windows 11 host (NVIDIA GeForce RTX 5070 Ti, driver 610.74, Khronos validation layer 1.4.369, MSVC 19.44.35220). AI-assisted: yes. ### Checklist - [x] Based on current `main` and merges cleanly. - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption. - [ ] A new translator rule is in the contract table of `docs/design.md` (not applicable: this is the D3D12 to Vulkan runtime layer, whose contract is `docs/d3d12_vulkan.md`).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:07:21 +00:00
github manually merged commit 916dbc619d into gh-pr/540/base 2026-11-26 09:07:22 +00:00
Author
Owner

@⁠sodove on GitHub · 2026-11-24 07:20 UTC · original · edited 2026-11-24 07:28 UTC

Verified this exact head c9f4a5697b on Windows 11 26100.7623, RTX 5070 Ti (610.74), MSVC 19.44.35220 Release, with Khronos validation layer 1.4.369 enabled.

  • d3d12_mesh passed with zero Vulkan validation errors and all 4096 pixels matching. Mixed clipping was 2/2, vertex-only clipping invocations were 2, and mesh-only clipping was 0/0. The mesh-only query recorded 1024 pixel-shader invocations.
  • replay_query_predication and replay_query_edges passed, including the new checks on this head.
  • With #516 at d336fc9970 applied over this head, d3d12_mesh, d3d12_clear and d3d12_clear_restricted_depth all passed with validation enabled. That covers both reports in #506.

Synthetic fixtures only. AI-assisted verification.

Cross-API counter comparison for the follow-up

I compared the Vulkan mesh-primitives-generated query directly with D3D12 mesh pipeline statistics for the proposal in #14. Separate synthetic harnesses used the same triangle cases on RTX 5070 Ti (610.74) and Windows 11 26100.7623. WARP and native hardware D3D12 agreed on both clipping fields in all four cases.

One emitted triangle D3D12 CInvocations / CPrimitives Vulkan mesh primitives generated
Visible 1 / 1 1
Fully outside the clip volume 1 / 0 1
Crossing the near plane 1 / 2 1
Culled by the mesh shader 0 / 0 1

The shader-cull case distinguishes the generated count from D3D12 CInvocations. The clip-plane cases distinguish it from CPrimitives. The Vulkan test ran the generated-primitives query alongside a fragment-invocations query with Khronos validation 1.4.369 enabled. All four cases repeated with zero validation errors. Vulkan query definitions · D3D12 counter definitions

**@⁠sodove** on GitHub · 2026-11-24 07:20 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/540#issuecomment-7124883608) · edited 2026-11-24 07:28 UTC Verified this exact head c9f4a5697ba0b12eb326a7304b5fff81e7415f5e on Windows 11 26100.7623, RTX 5070 Ti (610.74), MSVC 19.44.35220 Release, with Khronos validation layer 1.4.369 enabled. - d3d12_mesh passed with zero Vulkan validation errors and all 4096 pixels matching. Mixed clipping was 2/2, vertex-only clipping invocations were 2, and mesh-only clipping was 0/0. The mesh-only query recorded 1024 pixel-shader invocations. - replay_query_predication and replay_query_edges passed, including the new checks on this head. - With #516 at d336fc99708bb704134d7e7951bf186485a7f6fa applied over this head, d3d12_mesh, d3d12_clear and d3d12_clear_restricted_depth all passed with validation enabled. That covers both reports in #506. Synthetic fixtures only. AI-assisted verification. ### Cross-API counter comparison for the follow-up I compared the Vulkan mesh-primitives-generated query directly with D3D12 mesh pipeline statistics for the proposal in [#14](https://git.gtahub.st/github/ubiquitarianism--leonida/issues/14). Separate synthetic harnesses used the same triangle cases on RTX 5070 Ti (610.74) and Windows 11 26100.7623. WARP and native hardware D3D12 agreed on both clipping fields in all four cases. | One emitted triangle | D3D12 CInvocations / CPrimitives | Vulkan mesh primitives generated | | --- | --- | --- | | Visible | 1 / 1 | 1 | | Fully outside the clip volume | 1 / 0 | 1 | | Crossing the near plane | 1 / 2 | 1 | | Culled by the mesh shader | 0 / 0 | 1 | The shader-cull case distinguishes the generated count from D3D12 CInvocations. The clip-plane cases distinguish it from CPrimitives. The Vulkan test ran the generated-primitives query alongside a fragment-invocations query with Khronos validation 1.4.369 enabled. All four cases repeated with zero validation errors. [Vulkan query definitions](https://docs.vulkan.org/spec/latest/chapters/queries.html) · [D3D12 counter definitions](https://learn.microsoft.com/en-us/windows/win32/api/d3d12/ns-d3d12-d3d12_query_data_pipeline_statistics)
Author
Owner

@⁠Mby159 on GitHub · 2026-11-24 08:11 UTC · original

Thanks to sodove for running this exact head on Windows with the validation layer: d3d12_mesh passes with zero Vulkan validation errors and all 4096 pixels matching, the mesh-only query records 1024 pixel-shader invocations with 0/0 clipping, and with #516 applied over it the two reports in #506 are covered. That is the confirmation this change needed — the validation layer was the only thing that could show the VUID going away.

On the follow-up in #14 (VK_QUERY_TYPE_MESH_PRIMITIVES_GENERATED_EXT for a mesh segment's CInvocations): read as an addition, and we would like to help. The cross-API numbers in sodove's report say the generated count is neither D3D12's CInvocations (it counts a triangle the mesh shader culled, which D3D12 does not) nor CPrimitives (1 against 0 or 2 when the clipper drops or splits a triangle). So before writing code, three questions:

  • Does the count go into CInvocations only, leaving CPrimitives at 0, given the culled-triangle difference?
  • Where the device has no meshShaderQueries, the fields stay 0 as they do here (RADV on the integrated Radeon reports it false)?
  • A third per-submission pool of that query type, begun and ended with each mesh segment, with the count added as field 5 in statistics_sum.comp — the shape milk4sale describes.

We can implement that and cover the segment plan and the sum on the CPU (the replay_query_predication and replay_query_edges mocks), with milk4sale or sodove confirming the run on a mesh-capable device under the validation layer, which is the part this machine cannot do. Say here if someone else would rather take it; otherwise we will claim it in the coordination issue and open a pull request on top of this one.

**@⁠Mby159** on GitHub · 2026-11-24 08:11 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/540#issuecomment-7125828085) Thanks to sodove for running this exact head on Windows with the validation layer: d3d12_mesh passes with zero Vulkan validation errors and all 4096 pixels matching, the mesh-only query records 1024 pixel-shader invocations with 0/0 clipping, and with #516 applied over it the two reports in #506 are covered. That is the confirmation this change needed — the validation layer was the only thing that could show the VUID going away. On the follow-up in #14 (`VK_QUERY_TYPE_MESH_PRIMITIVES_GENERATED_EXT` for a mesh segment's `CInvocations`): read as an addition, and we would like to help. The cross-API numbers in sodove's report say the generated count is neither D3D12's `CInvocations` (it counts a triangle the mesh shader culled, which D3D12 does not) nor `CPrimitives` (1 against 0 or 2 when the clipper drops or splits a triangle). So before writing code, three questions: - Does the count go into `CInvocations` only, leaving `CPrimitives` at 0, given the culled-triangle difference? - Where the device has no `meshShaderQueries`, the fields stay 0 as they do here (RADV on the integrated Radeon reports it false)? - A third per-submission pool of that query type, begun and ended with each mesh segment, with the count added as field 5 in `statistics_sum.comp` — the shape milk4sale describes. We can implement that and cover the segment plan and the sum on the CPU (the `replay_query_predication` and `replay_query_edges` mocks), with milk4sale or sodove confirming the run on a mesh-capable device under the validation layer, which is the part this machine cannot do. Say here if someone else would rather take it; otherwise we will claim it in the coordination issue and open a pull request on top of this one.
Author
Owner

@⁠sodove on GitHub · 2026-11-24 08:20 UTC · original

I can verify the follow-up on the RTX 5070 Ti under Vulkan validation, including a test device with meshShaderQueries disabled.

For the count, I would leave the mesh contribution to CPrimitives at zero. Adding the generated count to CInvocations would be a driver-dependent approximation. The D3D12 references both omit the shader-culled primitive, while the NVIDIA Vulkan query counts it. The llvmpipe result from milk4sale differs again. Devices without meshShaderQueries can keep the current zero mesh contribution in both fields.

If the approximation is chosen, the third pool can add only to field 5 for mesh segments. A mixed draw and mesh query is useful here because it also checks that field 6 still receives the normal draw contribution. I can run the visible, shader-culled, mixed, and feature-disabled cases on the proposed implementation.

**@⁠sodove** on GitHub · 2026-11-24 08:20 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/540#issuecomment-7126020757) I can verify the follow-up on the RTX 5070 Ti under Vulkan validation, including a test device with meshShaderQueries disabled. For the count, I would leave the mesh contribution to CPrimitives at zero. Adding the generated count to CInvocations would be a driver-dependent approximation. The D3D12 references both omit the shader-culled primitive, while the NVIDIA Vulkan query counts it. The llvmpipe result from milk4sale differs again. Devices without meshShaderQueries can keep the current zero mesh contribution in both fields. If the approximation is chosen, the third pool can add only to field 5 for mesh segments. A mixed draw and mesh query is useful here because it also checks that field 6 still receives the normal draw contribution. I can run the visible, shader-culled, mixed, and feature-disabled cases on the proposed implementation.
Author
Owner

@⁠quartz-heron-58 on GitHub · 2026-11-24 08:42 UTC · original

Tested c9f4a569 (cherry-picked onto main 1c93c869) together with #516's two commits on an NVIDIA GeForce RTX 4080 (driver 621.24, Vulkan 1.4.357), Windows 11 Home build 26300, MSVC 14.44 / RelWithDebInfo, built with scripts\build_runtime.ps1: pass. The three commits applied on top of each other without conflicts.

With LEONIDA_VK_VALIDATION=1, ctest -R "^d3d12_(clear|mesh)|replay_query":

Before, on a build of main d42773d0: d3d12_mesh fails with the three VUID-vkCmdDrawMeshTasksEXT-pipelineStatistics-07076 errors of #506 (and d3d12_clear with its four).

With the three commits: d3d12_mesh, replay_query_edges, replay_query_predication, d3d12_clear, d3d12_clear_restricted_depth and d3d12_clear_formats all pass, 6 of 6, with no VUID line in the output. The same six pass without validation.

Limits: the two PRs were tested together, not each alone; only these six tests were run, not the whole ctest suite; the before and after builds are 24 commits of main apart. No game files.

AI-assisted (Claude Code built, ran the tests and wrote this comment).

**@⁠quartz-heron-58** on GitHub · 2026-11-24 08:42 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/540#issuecomment-7126460032) Tested c9f4a569 (cherry-picked onto main 1c93c869) together with #516's two commits on an NVIDIA GeForce RTX 4080 (driver 621.24, Vulkan 1.4.357), Windows 11 Home build 26300, MSVC 14.44 / RelWithDebInfo, built with `scripts\build_runtime.ps1`: pass. The three commits applied on top of each other without conflicts. With `LEONIDA_VK_VALIDATION=1`, `ctest -R "^d3d12_(clear|mesh)|replay_query"`: Before, on a build of main d42773d0: `d3d12_mesh` fails with the three VUID-vkCmdDrawMeshTasksEXT-pipelineStatistics-07076 errors of #506 (and `d3d12_clear` with its four). With the three commits: `d3d12_mesh`, `replay_query_edges`, `replay_query_predication`, `d3d12_clear`, `d3d12_clear_restricted_depth` and `d3d12_clear_formats` all pass, 6 of 6, with no VUID line in the output. The same six pass without validation. Limits: the two PRs were tested together, not each alone; only these six tests were run, not the whole ctest suite; the before and after builds are 24 commits of main apart. No game files. AI-assisted (Claude Code built, ran the tests and wrote this comment).
Author
Owner

@⁠bvtterbroot on GitHub · 2026-11-24 12:02 UTC · original

Tested c9f4a569 on AMD Radeon RX 7900 XTX (RDNA3, Navi 31), AMD driver 26.11.2 (32.0.32029.2010), Vulkan 1.4.359, Windows 11, Vulkan SDK 1.4.363.0: pass.

  • With LEONIDA_VK_VALIDATION=1: d3d12_mesh passes, and the 3 x VUID-vkCmdDrawMeshTasksEXT-pipelineStatistics-07076 that main 21625bca reports are gone. It passes without validation too.
  • replay_query_edges and replay_query_predication pass.
  • Together with #516 (local merge of both heads on main 21625bca): full ctest 299/304; the 5 failures are the same 5 as on main (vk_queue_query_sync, d3d12_texture_tiles, d3d12_execute_indirect_validation, d3d12_clear, d3d12_pipeline_library_host), so nothing new. d3d12_clear is the AMD NaN depth clear noted on #516.

No game files. AI-assisted (Claude Code ran the builds and tests).

**@⁠bvtterbroot** on GitHub · 2026-11-24 12:02 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/540#issuecomment-7130871853) Tested c9f4a569 on AMD Radeon RX 7900 XTX (RDNA3, Navi 31), AMD driver 26.11.2 (32.0.32029.2010), Vulkan 1.4.359, Windows 11, Vulkan SDK 1.4.363.0: pass. - With `LEONIDA_VK_VALIDATION=1`: `d3d12_mesh` passes, and the 3 x `VUID-vkCmdDrawMeshTasksEXT-pipelineStatistics-07076` that `main` 21625bca reports are gone. It passes without validation too. - `replay_query_edges` and `replay_query_predication` pass. - Together with #516 (local merge of both heads on `main` 21625bca): full `ctest` 299/304; the 5 failures are the same 5 as on `main` (`vk_queue_query_sync`, `d3d12_texture_tiles`, `d3d12_execute_indirect_validation`, `d3d12_clear`, `d3d12_pipeline_library_host`), so nothing new. `d3d12_clear` is the AMD NaN depth clear noted on #516. No game files. AI-assisted (Claude Code ran the builds and tests).
Author
Owner

@⁠Mby159 on GitHub · 2026-11-24 12:36 UTC · original

Rebased onto main at 21625bca8: new head 916dbc61 (parent 21625bca8), one commit, the same eight files, the same +162/-83 as c9f4a569. The change itself is byte for byte the one @⁠sodove verified on the RTX 5070 Ti and @⁠bvtterbroot verified on the RX 7900 XTX - only the parent moved.

Why now. The base this pull request carried (d42773d0) is old enough that tests/test_cmake_translator_deps.py fails on the test merge, and not because of this change: build.py reaches tools/rdna2_isa_tables.py and tools/rdna2_decode.py but the dependency list that the test compares against had not been updated yet, and main has that list updated since. The same assertion is what turned macos-python and stdlib-tests-linux red here while main itself passes it. Rebasing is also what the repository's own checklist asks for ("Based on current main and merges cleanly"); #431 was rebased for the same reason, and the re-check runs above still apply because the tree of the change is identical.

What stays red, and why. macos and linux-gpu-tools fail on cs_imgload_tfe and cs_imgload_d16_tfe - the two shaders main fails as well (#31). stdlib-tests-linux and macos-python still carry tests/test_tool_stdout_encoding.py, which is red on main today and is what #605 fixes. The Windows check job was cancelled by the runner queue, not by a failure.

**@⁠Mby159** on GitHub · 2026-11-24 12:36 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/540#issuecomment-7131673578) Rebased onto `main` at `21625bca8`: new head `916dbc61` (parent `21625bca8`), one commit, the same eight files, the same `+162/-83` as `c9f4a569`. The change itself is byte for byte the one @⁠sodove verified on the RTX 5070 Ti and @⁠bvtterbroot verified on the RX 7900 XTX - only the parent moved. **Why now.** The base this pull request carried (`d42773d0`) is old enough that `tests/test_cmake_translator_deps.py` fails on the test merge, and not because of this change: `build.py` reaches `tools/rdna2_isa_tables.py` and `tools/rdna2_decode.py` but the dependency list that the test compares against had not been updated yet, and `main` has that list updated since. The same assertion is what turned `macos-python` and `stdlib-tests-linux` red here while `main` itself passes it. Rebasing is also what the repository's own checklist asks for ("Based on current `main` and merges cleanly"); #431 was rebased for the same reason, and the re-check runs above still apply because the tree of the change is identical. **What stays red, and why.** `macos` and `linux-gpu-tools` fail on `cs_imgload_tfe` and `cs_imgload_d16_tfe` - the two shaders `main` fails as well (#31). `stdlib-tests-linux` and `macos-python` still carry `tests/test_tool_stdout_encoding.py`, which is red on `main` today and is what #605 fixes. The Windows `check` job was cancelled by the runner queue, not by a failure.
Author
Owner

@⁠QemmHD on GitHub · 2026-11-24 13:37 UTC · original

Merging.

Why merged: Fixes the mesh half of #506: the statistics pool active during vkCmdDrawMeshTasksEXT no longer enables the two clipping counters that VUID-vkCmdDrawMeshTasksEXT-pipelineStatistics-07076 forbids. Verified on an RTX 5070 Ti (sodove), RTX 4080 (quartz-heron-58) and RX 7900 XTX (bvtterbroot), all with validation on; the rebase to 916dbc619 is byte-identical (range-diff checked). Merged on its own first because #577 is stacked on it.

Why it's good: On the 4070 SUPER with LEONIDA_VK_VALIDATION=1: plain main fails d3d12_mesh with 3x VUID-...-07076; main + #540 + #577 passes d3d12_mesh, replay_query_edges and replay_query_predication with 0 validation errors, and the counters match sodove's numbers (mesh-only C 8/0, PS 1024).

Tested on Windows 11, RTX 4070 SUPER (NVIDIA 621.24), VS 2022 + Ninja RelWithDebInfo, Vulkan SDK 1.4.363.0, alone on main (21625bca8 or 51f316092) and in a cumulative merge of #497, #278, #310, #334, #346, #340, #355, #361, #363, #620 and #577 (which carries #540) on main 2d73c242f (git merge-tree: 0 conflicts against current main). Repo-consistency set (cmake/translator-deps, shader_stage_resume, runtime_paths, docs, make_game, no-game-data, run_semantic_tests): 566 passed / 5 skipped / 0 failed on main and on main + batch. compileall OK. Full ctest: 302/304 on main and on main + batch (the same two pre-existing failures, d3d12_execute_indirect_validation and d3d12_depth_resolve, no new ones).

AI-assisted (Claude Code, Claude Opus 5.5).

**@⁠QemmHD** on GitHub · 2026-11-24 13:37 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/540#issuecomment-7133108623) Merging. **Why merged:** Fixes the mesh half of #506: the statistics pool active during vkCmdDrawMeshTasksEXT no longer enables the two clipping counters that VUID-vkCmdDrawMeshTasksEXT-pipelineStatistics-07076 forbids. Verified on an RTX 5070 Ti (sodove), RTX 4080 (quartz-heron-58) and RX 7900 XTX (bvtterbroot), all with validation on; the rebase to 916dbc619 is byte-identical (range-diff checked). Merged on its own first because #577 is stacked on it. **Why it's good:** On the 4070 SUPER with LEONIDA_VK_VALIDATION=1: plain main fails d3d12_mesh with 3x VUID-...-07076; main + #540 + #577 passes d3d12_mesh, replay_query_edges and replay_query_predication with 0 validation errors, and the counters match sodove's numbers (mesh-only C 8/0, PS 1024). Tested on Windows 11, RTX 4070 SUPER (NVIDIA 621.24), VS 2022 + Ninja RelWithDebInfo, Vulkan SDK 1.4.363.0, alone on main (21625bca8 or 51f316092) and in a cumulative merge of #497, #278, #310, #334, #346, #340, #355, #361, #363, #620 and #577 (which carries #540) on main 2d73c242f (git merge-tree: 0 conflicts against current main). Repo-consistency set (cmake/translator-deps, shader_stage_resume, runtime_paths, docs, make_game, no-game-data, run_semantic_tests): 566 passed / 5 skipped / 0 failed on main and on main + batch. compileall OK. Full ctest: 302/304 on main and on main + batch (the same two pre-existing failures, d3d12_execute_indirect_validation and d3d12_depth_resolve, no new ones). AI-assisted (Claude Code, Claude Opus 5.5).
This discussion has been locked. Commenting is limited to contributors.
No description provided.