Skip to content

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

Merged
QemmHD merged 1 commit into
ProjectLeonida:mainfrom
Mby159:d3d-291-mesh-statistics
Nov 24, 2026
Merged

QemmHD merged 1 commit into
ProjectLeonida:mainfrom
Mby159:d3d-291-mesh-statistics

Conversation

@Mby159

@Mby159 Mby159 commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

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
    (8f481cf). 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).

@sodove

sodove commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

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

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

@Mby159

Mby159 commented Nov 24, 2026

Copy link
Copy Markdown
Contributor Author

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.

@sodove

sodove commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

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.

@quartz-heron-58

Copy link
Copy Markdown
Contributor

Tested c9f4a56 (cherry-picked onto main 1c93c86) 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 d42773d: 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).

@bvtterbroot

Copy link
Copy Markdown

Tested c9f4a56 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.

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

@Mby159
Mby159 force-pushed the d3d-291-mesh-statistics branch from c9f4a56 to 9e8eb27 Compare November 24, 2026 12:34
Mby159 added a commit to Mby159/leonida that referenced this pull request Nov 24, 2026
…primitives query (D3D-MESH-CLIPPING-COUNTER)

Where the device has the meshShaderQueries feature of VK_EXT_mesh_shader, the number of
primitives the mesh shader emitted comes from a VK_QUERY_TYPE_MESH_PRIMITIVES_GENERATED_EXT
query run around each mesh segment, and it is added as the clipping invocations of that
segment. CPrimitives stays 0: Vulkan has no clipped-primitive counter, and D3D12's
CPrimitives is the clipper's output.

Claim: D3D-MESH-CLIPPING-COUNTER
Depends on: ProjectLeonida#540
@Mby159
Mby159 force-pushed the d3d-291-mesh-statistics branch from 9e8eb27 to 916dbc6 Compare November 24, 2026 12:35
Mby159 added a commit to Mby159/leonida that referenced this pull request Nov 24, 2026
…primitives query (D3D-MESH-CLIPPING-COUNTER)

Where the device has the meshShaderQueries feature of VK_EXT_mesh_shader, the number of
primitives the mesh shader emitted comes from a VK_QUERY_TYPE_MESH_PRIMITIVES_GENERATED_EXT
query run around each mesh segment, and it is added as the clipping invocations of that
segment. CPrimitives stays 0: Vulkan has no clipped-primitive counter, and D3D12's
CPrimitives is the clipper's output.

Claim: D3D-MESH-CLIPPING-COUNTER
Depends on: ProjectLeonida#540
@Mby159

Mby159 commented Nov 24, 2026

Copy link
Copy Markdown
Contributor Author

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.

QemmHD added a commit that referenced this pull request Nov 24, 2026
Merging.

**Why merged:** Indexes the DXBC identities the Xbox native graphics pipelines use, which the native-PSO path needs. The earlier hold (new tool not listed as a translator input) is fixed in 62a9588: native_pso_hashes is now in translator_deps.cmake, make_game.py's translation sources and runtime.yml.

**Why it's good:** Security read of the three-dot diff: tools and tests only, no binaries, downloads or network calls. The PR's own tests: 129 passed. The consistency set, which caught the missing input registration last time, is clean now.

Tested on Windows 11, RTX 4070 SUPER (NVIDIA 621.24), VS 2022 + Ninja RelWithDebInfo, Vulkan SDK 1.4.363.0, alone on main (21625bc or 51f3160) and in a cumulative merge of #497, #278, #310, #334, #346, #340, #355, #361, #363, #620 and #577 (which carries #540) on main 2d73c24 (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 added a commit that referenced this pull request Nov 24, 2026
Merging.

**Why merged:** Adds the named NonSemantic.Shader.DebugInfo.100 instruction table so SPIR-V debug instructions disassemble by name. Oliwettoo checked that the table matches SPIRV-Headers' grammar exactly (44 names).

**Why it's good:** Data table plus tests only. Its tests: 47 passed. No behaviour change for shaders without debug info.

Tested on Windows 11, RTX 4070 SUPER (NVIDIA 621.24), VS 2022 + Ninja RelWithDebInfo, Vulkan SDK 1.4.363.0, alone on main (21625bc or 51f3160) and in a cumulative merge of #497, #278, #310, #334, #346, #340, #355, #361, #363, #620 and #577 (which carries #540) on main 2d73c24 (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 added a commit that referenced this pull request Nov 24, 2026
Merging.

**Why merged:** manifest_verifier refuses a --cache path that aliases the input manifest (another spelling, a hard link, a symlink or a case alias), which would otherwise overwrite the manifest: a real data-loss guard. Reviewed as good by Oliwettoo.

**Why it's good:** Its tests: 82 passed, 4 skipped. It merges cleanly together with #346, which touches the same tool; the cumulative run includes both. Note from Oliwettoo: this conflicts with #344, which will need a rebase.

Tested on Windows 11, RTX 4070 SUPER (NVIDIA 621.24), VS 2022 + Ninja RelWithDebInfo, Vulkan SDK 1.4.363.0, alone on main (21625bc or 51f3160) and in a cumulative merge of #497, #278, #310, #334, #346, #340, #355, #361, #363, #620 and #577 (which carries #540) on main 2d73c24 (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 added a commit that referenced this pull request Nov 24, 2026
Merging.

**Why merged:** manifest_verifier also protects every file the manifest lists from being overwritten by cache writes (the companion to #334). Reviewed as good by Oliwettoo.

**Why it's good:** Its tests: 83 passed, 4 skipped, on its own and stacked with #334.

Tested on Windows 11, RTX 4070 SUPER (NVIDIA 621.24), VS 2022 + Ninja RelWithDebInfo, Vulkan SDK 1.4.363.0, alone on main (21625bc or 51f3160) and in a cumulative merge of #497, #278, #310, #334, #346, #340, #355, #361, #363, #620 and #577 (which carries #540) on main 2d73c24 (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 added a commit that referenced this pull request Nov 24, 2026
Merging.

**Why merged:** CI-only: a hung Windows runtime test now fails on its own (per-test ctest --timeout 300, TIMEOUT 180 on the loader test) instead of cancelling the whole job, and the job limit goes from 20 to 35 minutes. Each value is explained in a comment. Reviewed as good by Oliwettoo.

**Why it's good:** Workflow change with no new permissions, actions or downloads. The local tests it touches: 87 passed, 9 skipped. The runner-side effect can only be seen in CI, but there's nothing risky in it: the timeouts only turn hangs into failures.

Tested on Windows 11, RTX 4070 SUPER (NVIDIA 621.24), VS 2022 + Ninja RelWithDebInfo, Vulkan SDK 1.4.363.0, alone on main (21625bc or 51f3160) and in a cumulative merge of #497, #278, #310, #334, #346, #340, #355, #361, #363, #620 and #577 (which carries #540) on main 2d73c24 (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 added a commit that referenced this pull request Nov 24, 2026
Merging.

**Why merged:** d3d12_xs_surface SDK discovery skips a Windows Kits version folder that lacks um/d3d12.h (a WDK-only folder), while an explicit WINDOWS_SDK_INCLUDE/SDK_INCLUDE is still taken as given. Reviewed as good by Oliwettoo.

**Why it's good:** Its tests: 18 passed, 1 skipped. The runtime build on this machine is unaffected (same ctest).

Tested on Windows 11, RTX 4070 SUPER (NVIDIA 621.24), VS 2022 + Ninja RelWithDebInfo, Vulkan SDK 1.4.363.0, alone on main (21625bc or 51f3160) and in a cumulative merge of #497, #278, #310, #334, #346, #340, #355, #361, #363, #620 and #577 (which carries #540) on main 2d73c24 (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 added a commit that referenced this pull request Nov 24, 2026
Merging.

**Why merged:** stale_build follows includes through the CMake include directories, so a header change in another include dir correctly marks a target stale. Dezmonius independently re-checked the fixed head; the "six failures" he first reported were the new tests running against the old implementation, which is expected.

**Why it's good:** Its tests: 55 passed, 8 skipped, and on current main with main's new tests/test_stale_build.py: 26/26.

Tested on Windows 11, RTX 4070 SUPER (NVIDIA 621.24), VS 2022 + Ninja RelWithDebInfo, Vulkan SDK 1.4.363.0, alone on main (21625bc or 51f3160) and in a cumulative merge of #497, #278, #310, #334, #346, #340, #355, #361, #363, #620 and #577 (which carries #540) on main 2d73c24 (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

QemmHD commented Nov 24, 2026

Copy link
Copy Markdown
Collaborator

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 916dbc6 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 (21625bc or 51f3160) and in a cumulative merge of #497, #278, #310, #334, #346, #340, #355, #361, #363, #620 and #577 (which carries #540) on main 2d73c24 (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
QemmHD merged commit 3bb46d6 into ProjectLeonida:main Nov 24, 2026
7 of 12 checks passed
QemmHD added a commit that referenced this pull request Nov 24, 2026
Merging.

**Why merged:** Stacked on #540: the clipping invocations of a mesh segment now come from a mesh-pipeline query, so CInvocations/CPrimitives stay correct for mixed vertex + mesh work. sodove verified the exact head, including the disconnected-feature negative control that found (and now proves fixed) a gap in the test.

**Why it's good:** The embedded SPIR-V in statistics_sum_spirv.h was recompiled from the PR's .comp: all 431 words are identical and spirv-val passes. d3d12_mesh with validation: 0 errors, mixed C 12 vs vertex-only C 2, so the mesh share is 10, as expected.

Tested on Windows 11, RTX 4070 SUPER (NVIDIA 621.24), VS 2022 + Ninja RelWithDebInfo, Vulkan SDK 1.4.363.0, alone on main (21625bc or 51f3160) and in a cumulative merge of #497, #278, #310, #334, #346, #340, #355, #361, #363, #620 and #577 (which carries #540) on main 2d73c24 (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).
demoz53 added a commit to demoz53/leonida that referenced this pull request Nov 24, 2026
Brings 58 PRs integration did not have (among them ProjectLeonida#359 ProjectLeonida#360 ProjectLeonida#402 ProjectLeonida#497 ProjectLeonida#557 ProjectLeonida#558
ProjectLeonida#560 ProjectLeonida#561 ProjectLeonida#572 ProjectLeonida#573 ProjectLeonida#574 ProjectLeonida#577) and the newer heads of ProjectLeonida#401 and ProjectLeonida#404. 15 files
conflicted; resolved by hand:

- frame_pacer.h, d3d12_xs_device.h/.cpp: ProjectLeonida#402's pacer (per-event ticks,
  issue_token_locked) now issues from ProjectLeonida#414's shared FrameTokenSource, so a token
  from the device-side WaitFrameEventX is one the pacer accepts (towade's ProjectLeonida#14
  finding: without it every PresentX is refused). The dead frame_next_token and
  issued_ counters are dropped. Queue slot 32 stays ProjectLeonida#414's PresentX; ProjectLeonida#402's
  presentation-handler routes serve slot 30 or LEONIDA_XS_PRESENT_X_SLOT.
  ProjectLeonida#402's GetFrameStatisticsX route moves into ProjectLeonida#385's route_xbox_device_slot.
- acphal.cpp/acphal_test.cpp: upstream's reworked SHAPE allocation and release;
  the release writes nothing through its first argument, as ProjectLeonida#405 requires; both
  sides' tests kept. Upstream's ProjectLeonida#401/ProjectLeonida#404 heads remove lifecycle.cpp and the C++
  xma2_decoder.cpp (replaced by runtime/xma_decoder), so build_runtime.ps1's
  cl.exe list drops them and keeps ProjectLeonida#549's and ProjectLeonida#400's files.
- vulkan_backend.h, statistics_sum.comp, its SPIR-V header, d3d12_mesh_test,
  replay_query_edges_test, d3d12_vulkan_device.cpp, docs: ProjectLeonida#577's clipping
  counter on top of ProjectLeonida#540, which both sides carry; the Timestamps sentence keeps
  integration's corrected wording (c33ce87).
- xs_proxy_mock_test.cpp: both sides' cases; pr_conflict_label.py keeps the
  guarded reconfigure.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SwavyJayden pushed a commit to SwavyJayden/leonida that referenced this pull request Nov 24, 2026
…primitives query (D3D-MESH-CLIPPING-COUNTER)

Where the device has the meshShaderQueries feature of VK_EXT_mesh_shader, the number of
primitives the mesh shader emitted comes from a VK_QUERY_TYPE_MESH_PRIMITIVES_GENERATED_EXT
query run around each mesh segment, and it is added as the clipping invocations of that
segment. CPrimitives stays 0: Vulkan has no clipped-primitive counter, and D3D12's
CPrimitives is the clipper's output.

Claim: D3D-MESH-CLIPPING-COUNTER
Depends on: ProjectLeonida#540
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants