[PR #1420] [CLOSED] d3d12: resolve extended pipeline statistics on Vulkan #1450

Closed
opened 2026-11-26 20:21:18 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/1420
Author: @PyZikYG
Created: 11/25/2026
Status: ❌ Closed

Base: main ← Head: mesh-pipeline-statistics


📝 Commits (1)

  • 99a6d19 d3d12: resolve extended pipeline statistics on Vulkan

📊 Changes

10 files changed (+229 additions, -121 deletions)

View changed files

📝 docs/d3d12_vulkan.md (+12 -7)
📝 runtime/shims/d3d12_vulkan_device.cpp (+10 -3)
📝 runtime/src/command_list.h (+7 -1)
📝 runtime/src/statistics_sum.comp (+17 -13)
📝 runtime/src/statistics_sum_spirv.h (+48 -36)
📝 runtime/src/vulkan_backend.h (+22 -23)
📝 runtime/src/vulkan_replay.h (+18 -15)
📝 runtime/test/d3d12_mesh_test.cpp (+60 -0)
📝 runtime/test/replay_query_edges_test.cpp (+34 -22)
📝 runtime/test/replay_query_predication_test.cpp (+1 -1)

📄 Description

Claimed as D3D-132 in the coordination issue.

What and why

Implement D3D12_QUERY_TYPE_PIPELINE_STATISTICS1 from heap creation through command replay and the 112-byte resolve. Extended and legacy queries share the same segment planner, so mixed vertex and mesh workloads and overlapping queries continue to count only their own work.

On devices with meshShaderQueries, populate MSInvocations and MSPrimitives and expose MeshShaderPipelineStatsSupported. The base counters remain available when the mesh query feature is absent. ASInvocations is zero because the runtime has no amplification shader support.

Tested

Built the Windows runtime targets and checked query heap rules, replay, queue synchronization, overlapping queries and mesh result readback.

AI-assisted: yes.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/1420 **Author:** [@PyZikYG](https://github.com/PyZikYG) **Created:** 11/25/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `mesh-pipeline-statistics` --- ### 📝 Commits (1) - [`99a6d19`](https://github.com/ubiquitarianism/leonida/commit/99a6d1998c22fde2c5441ebbd53c8f7c71f6be0e) d3d12: resolve extended pipeline statistics on Vulkan ### 📊 Changes **10 files changed** (+229 additions, -121 deletions) <details> <summary>View changed files</summary> 📝 `docs/d3d12_vulkan.md` (+12 -7) 📝 `runtime/shims/d3d12_vulkan_device.cpp` (+10 -3) 📝 `runtime/src/command_list.h` (+7 -1) 📝 `runtime/src/statistics_sum.comp` (+17 -13) 📝 `runtime/src/statistics_sum_spirv.h` (+48 -36) 📝 `runtime/src/vulkan_backend.h` (+22 -23) 📝 `runtime/src/vulkan_replay.h` (+18 -15) 📝 `runtime/test/d3d12_mesh_test.cpp` (+60 -0) 📝 `runtime/test/replay_query_edges_test.cpp` (+34 -22) 📝 `runtime/test/replay_query_predication_test.cpp` (+1 -1) </details> ### 📄 Description Claimed as D3D-132 in [the coordination issue](https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7147650349). ### What and why Implement `D3D12_QUERY_TYPE_PIPELINE_STATISTICS1` from heap creation through command replay and the 112-byte resolve. Extended and legacy queries share the same segment planner, so mixed vertex and mesh workloads and overlapping queries continue to count only their own work. On devices with `meshShaderQueries`, populate `MSInvocations` and `MSPrimitives` and expose `MeshShaderPipelineStatsSupported`. The base counters remain available when the mesh query feature is absent. `ASInvocations` is zero because the runtime has no amplification shader support. ### Tested Built the Windows runtime targets and checked query heap rules, replay, queue synchronization, overlapping queries and mesh result readback. AI-assisted: yes. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
4ld0 2026-11-26 20:21:18 +01:00
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
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.

Dependencies

No dependencies set

Reference
starred/leonida#1450
No description provided.