[PR #1620] [CLOSED] Store indirect signature argument types and replay VERTEX_BUFFER_VIEW/INDEX_BUFFER_VIEW state #1634

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

📋 Pull Request Information

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

Base: main ← Head: indirect-state-args


📝 Commits (1)

  • fe916f5 Store indirect signature argument types and replay VERTEX_BUFFER_VIEW/INDEX_BUFFER_VIEW state

📊 Changes

5 files changed (+101 additions, -8 deletions)

View changed files

📝 runtime/shims/d3d12_com.cpp (+25 -5)
📝 runtime/shims/d3d12_com.h (+6 -2)
📝 runtime/shims/d3d12_vulkan_device.cpp (+8 -1)
📝 runtime/src/command_list.h (+4 -0)
📝 runtime/src/vulkan_replay.h (+58 -0)

📄 Description

Claimed in the coordination issue as: INDIRECT-STATE-ARGS

Depends on:

Fixes:

What and why

CommandSignature stored only indirect kind and byte stride, dropping every argument descriptor (VERTEX_BUFFER_VIEW, INDEX_BUFFER_VIEW, root constants, descriptor views). ExecuteIndirect recorded minimal state and the Vulkan replay applied no argument bindings, so a signature like [VERTEX_BUFFER_VIEW, DRAW] drew with whatever vertex buffer was already bound. This stores argument types from CreateCommandSignature through ExecuteIndirect into the replay, which reads VERTEX_BUFFER_VIEW and INDEX_BUFFER_VIEW values from the argument buffer and binds the matching VkBuffer before the indirect draw.

Tested

Build check only — no GPU available for vkCmdDrawIndirect validation; host-parity validation cases in d3d12_execute_indirect_validation_test.cpp can be added for signatures with vertex/index buffer arguments.

GPUs tested: n/a

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 (CONTRIBUTING.md), including in logs or reports quoted here
  • A new translator rule is in the contract table of docs/design.md — n/a (D3D12 layer, not shader translator)

🔄 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/1620 **Author:** [@BubsMcgee](https://github.com/BubsMcgee) **Created:** 11/25/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `indirect-state-args` --- ### 📝 Commits (1) - [`fe916f5`](https://github.com/ubiquitarianism/leonida/commit/fe916f5ede0fec1d8daf214590a2f875c3ca0fd1) Store indirect signature argument types and replay VERTEX_BUFFER_VIEW/INDEX_BUFFER_VIEW state ### 📊 Changes **5 files changed** (+101 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `runtime/shims/d3d12_com.cpp` (+25 -5) 📝 `runtime/shims/d3d12_com.h` (+6 -2) 📝 `runtime/shims/d3d12_vulkan_device.cpp` (+8 -1) 📝 `runtime/src/command_list.h` (+4 -0) 📝 `runtime/src/vulkan_replay.h` (+58 -0) </details> ### 📄 Description Claimed in the coordination issue as: INDIRECT-STATE-ARGS Depends on: Fixes: ### What and why CommandSignature stored only indirect kind and byte stride, dropping every argument descriptor (VERTEX_BUFFER_VIEW, INDEX_BUFFER_VIEW, root constants, descriptor views). ExecuteIndirect recorded minimal state and the Vulkan replay applied no argument bindings, so a signature like [VERTEX_BUFFER_VIEW, DRAW] drew with whatever vertex buffer was already bound. This stores argument types from CreateCommandSignature through ExecuteIndirect into the replay, which reads VERTEX_BUFFER_VIEW and INDEX_BUFFER_VIEW values from the argument buffer and binds the matching VkBuffer before the indirect draw. ### Tested Build check only — no GPU available for vkCmdDrawIndirect validation; host-parity validation cases in d3d12_execute_indirect_validation_test.cpp can be added for signatures with vertex/index buffer arguments. GPUs tested: n/a AI-assisted: yes ### Checklist - [x] Based on current main and merges cleanly - [x] One topic; follow-up work goes in a new pull request - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here - [ ] A new translator rule is in the contract table of docs/design.md — n/a (D3D12 layer, not shader translator) --- <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:55 +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#1634
No description provided.