d3d12: resolve extended pipeline statistics on Vulkan #1420

Closed
PyZikYG wants to merge 1 commit from upstream-pr/1420 into main
PyZikYG commented 2026-11-24 23:48:56 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by PyZikYG on 2026-11-24T23:48:56Z.


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.

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5482326218 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1420). Originally posted by [PyZikYG](https://github.com/PyZikYG) on 2026-11-24T23:48:56Z. --- 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.

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!1420
No description provided.