d3d12: keep mesh statistics queries Vulkan-valid (D3D-MESH-STATISTICS-QUERY) #527

Closed
sodove wants to merge 1 commit from upstream-pr/527 into main
sodove commented 2026-11-24 06:57:12 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by sodove on 2026-11-24T06:57:12Z.


Claimed in the coordination issue as: D3D-MESH-STATISTICS-QUERY (#14)

What and why

This addresses the mesh-statistics half of #506. The existing mesh pool enables both clipping counters, which are prohibited during vkCmdDrawMeshTasksEXT. Main produces three validation errors in the synthetic mesh test. Vulkan VUID 07076

The mesh pool now contains fragment and compute invocations. Its two packed counters go to slots 7 and 8, and the existing sum writes the PS and CS fields. Ordinary draw segments still supply all eleven counters. The mesh portion of the clipping fields is zero. This is a measured D3D12 difference: one synthetic triangle produced one clipping invocation and one clipping primitive in both WARP and native D3D12 on this host.

Tested

Windows 11 26100.7623, MSVC 19.44.35220 Release, Khronos validation layer 1.4.369.

  • d3d12_mesh on main c023a365 reports three VUID errors. This branch reports zero and matches all 4096 rendered pixels. Mixed and vertex-only clipping are both 2/2, and mesh-only clipping is 0/0. The mesh-only query still records pixel-shader invocations.
  • d3d12_query_rules, replay_query_predication, and replay_query_edges also pass with LEONIDA_VK_VALIDATION=1.
  • Regenerated the embedded statistics sum from its repository GLSL source with glslang 16.6.0 and SPIR-V validation.

GPUs tested: NVIDIA GeForce RTX 5070 Ti, driver 610.74, Windows 11.

AI-assisted: yes (OpenAI Codex).

Checklist

  • Based on current main.
  • One topic.
  • No game data, keys or decryption. All fixtures and the internal sum shader are synthetic.
  • New translator rule (not applicable).
<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5467599131 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/527). Originally posted by [sodove](https://github.com/sodove) on 2026-11-24T06:57:12Z. --- Claimed in the coordination issue as: D3D-MESH-STATISTICS-QUERY ([#14](https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7124372041)) ### What and why This addresses the mesh-statistics half of #506. The existing mesh pool enables both clipping counters, which are prohibited during vkCmdDrawMeshTasksEXT. Main produces three validation errors in the synthetic mesh test. [Vulkan VUID 07076](https://docs.vulkan.org/refpages/latest/refpages/source/vkCmdDrawMeshTasksEXT.html#VUID-vkCmdDrawMeshTasksEXT-pipelineStatistics-07076) The mesh pool now contains fragment and compute invocations. Its two packed counters go to slots 7 and 8, and the existing sum writes the PS and CS fields. Ordinary draw segments still supply all eleven counters. The mesh portion of the clipping fields is zero. This is a measured D3D12 difference: one synthetic triangle produced one clipping invocation and one clipping primitive in both WARP and native D3D12 on this host. ### Tested Windows 11 26100.7623, MSVC 19.44.35220 Release, Khronos validation layer 1.4.369. - d3d12_mesh on main c023a365 reports three VUID errors. This branch reports zero and matches all 4096 rendered pixels. Mixed and vertex-only clipping are both 2/2, and mesh-only clipping is 0/0. The mesh-only query still records pixel-shader invocations. - d3d12_query_rules, replay_query_predication, and replay_query_edges also pass with LEONIDA_VK_VALIDATION=1. - Regenerated the embedded statistics sum from its repository GLSL source with glslang 16.6.0 and SPIR-V validation. GPUs tested: NVIDIA GeForce RTX 5070 Ti, driver 610.74, Windows 11. AI-assisted: yes (OpenAI Codex). ### Checklist - [x] Based on current main. - [x] One topic. - [x] No game data, keys or decryption. All fixtures and the internal sum shader are synthetic. - [ ] New translator rule (not applicable).
sodove commented 2026-11-24 06:59:51 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by sodove on 2026-11-24T06:59:51Z.


Withdrawing this duplicate. I missed the earlier D3D-291 claim when checking the coordination issue. The synthetic Windows validation and native WARP/D3D12 measurements are available above for the original claimant. Earlier claim

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7124504819 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/527#issuecomment-7124504819). Originally posted by [sodove](https://github.com/sodove) on 2026-11-24T06:59:51Z. --- Withdrawing this duplicate. I missed the earlier D3D-291 claim when checking the coordination issue. The synthetic Windows validation and native WARP/D3D12 measurements are available above for the original claimant. [Earlier claim](https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7124368713)

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
ProjectLeonida/mandy!527
No description provided.