[PR #429] [CLOSED] d3d12: use GPU count buffers for indirect mesh dispatches #482

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

📋 Pull Request Information

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

Base: main ← Head: vulkan-mesh-dispatch-count


📝 Commits (2)

  • 1fc1ff4 d3d12: execute fixed-count indirect mesh dispatches on Vulkan
  • 4343395 d3d12: use GPU count buffers for indirect mesh dispatches

📊 Changes

8 files changed (+144 additions, -25 deletions)

View changed files

📝 docs/d3d12_vulkan.md (+11 -4)
📝 runtime/shims/d3d12_com.cpp (+16 -7)
📝 runtime/shims/d3d12_vulkan_device.cpp (+2 -2)
📝 runtime/src/command_list.h (+17 -4)
📝 runtime/src/vulkan_backend.h (+2 -0)
📝 runtime/src/vulkan_replay.h (+38 -2)
📝 runtime/test/d3d12_mesh_test.cpp (+57 -6)
📝 runtime/test/replay_cpu_bench.cpp (+1 -0)

📄 Description

Claimed as D3D-MESH-INDIRECT-COUNT.

Depends on: #424

A mesh-only ExecuteIndirect command with a GPU count buffer previously failed recording. This change reuses the compute indirect-count helper to prepare compact mesh dispatch records on the GPU. It reads the count at execution and writes zero-group records beyond the count, so even a UINT32_MAX counter is bounded by MaxCommandCount before drawing. The helper runs outside pipeline statistics queries. The count path requires buffer device addresses and compute scratch.

This PR includes the rebased #424 commit until #424 is merged.

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/429 **Author:** [@PyZikYG](https://github.com/PyZikYG) **Created:** 11/24/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `vulkan-mesh-dispatch-count` --- ### 📝 Commits (2) - [`1fc1ff4`](https://github.com/ubiquitarianism/leonida/commit/1fc1ff430912d6742a0c98dd2bd88f26fd284377) d3d12: execute fixed-count indirect mesh dispatches on Vulkan - [`4343395`](https://github.com/ubiquitarianism/leonida/commit/434339571809687dec8c50b565e3e4d34a72511a) d3d12: use GPU count buffers for indirect mesh dispatches ### 📊 Changes **8 files changed** (+144 additions, -25 deletions) <details> <summary>View changed files</summary> 📝 `docs/d3d12_vulkan.md` (+11 -4) 📝 `runtime/shims/d3d12_com.cpp` (+16 -7) 📝 `runtime/shims/d3d12_vulkan_device.cpp` (+2 -2) 📝 `runtime/src/command_list.h` (+17 -4) 📝 `runtime/src/vulkan_backend.h` (+2 -0) 📝 `runtime/src/vulkan_replay.h` (+38 -2) 📝 `runtime/test/d3d12_mesh_test.cpp` (+57 -6) 📝 `runtime/test/replay_cpu_bench.cpp` (+1 -0) </details> ### 📄 Description Claimed as [D3D-MESH-INDIRECT-COUNT](https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7122562592). Depends on: #424 A mesh-only ExecuteIndirect command with a GPU count buffer previously failed recording. This change reuses the compute indirect-count helper to prepare compact mesh dispatch records on the GPU. It reads the count at execution and writes zero-group records beyond the count, so even a UINT32_MAX counter is bounded by MaxCommandCount before drawing. The helper runs outside pipeline statistics queries. The count path requires buffer device addresses and compute scratch. This PR includes the rebased #424 commit until #424 is merged. 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:18:01 +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#482
No description provided.