mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:55:52 +01:00
[PR #1737] d3d12: refuse command signatures with arguments before the draw (D3D-INDIRECT-STATE-REFUSE) #1753
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#1753
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/1737
Author: @potatoe0100
Created: 11/25/2026
Status: 🔄 Open
Base:
main← Head:d3d12-indirect-state-refuse📝 Commits (1)
cc642e6d3d12: refuse command signatures with arguments before the draw (D3D-INDIRECT-STATE-REFUSE)📊 Changes
3 files changed (+91 additions, -1 deletions)
View changed files
📝
docs/d3d12_vulkan.md(+6 -1)📝
runtime/shims/d3d12_vulkan_device.cpp(+11 -0)📝
runtime/test/d3d12_execute_indirect_validation_test.cpp(+74 -0)📄 Description
Claimed in the coordination issue as: D3D-INDIRECT-STATE-REFUSE
Depends on: none. #1620 (INDIRECT-STATE-ARGS) touches the same function; whichever lands second drops the VERTEX/INDEX_BUFFER_VIEW part of this refusal once those arguments are replayed.
What and why
On
main,CreateCommandSignatureaccepts a valid signature that puts arguments before its draw or dispatch (root constants, root CBV/SRV/UAV, vertex and index buffer views). But theCommandSignatureobject keeps only its kind and stride, andExecuteIndirectreads the draw arguments at the start of each record. So[VERTEX_BUFFER_VIEW, DRAW]or[CONSTANT, DRAW]was accepted and then drew with the state argument's bytes as its vertex and instance counts, with no message.Until per-command state is replayed (section 4.7 of
docs/d3d12_vulkan.md),CreateCommandSignaturenow answersE_NOTIMPLfor a signature with more than one argument, and logs it once per first argument type, the way other unimplemented features are refused. Invalid descriptions are stillE_INVALIDARGas on the host, since the checks run first. One-argument signatures are unchanged, and the title's five startup signatures (section 4.9) each have one argument.runtime/shims/d3d12_vulkan_device.cpp: the refusal.runtime/test/d3d12_execute_indirect_validation_test.cpp: a layer-only check that eight such shapes (VBV+draw, IBV+draw indexed, constant+draw, constant+dispatch, CBV+draw, SRV+draw indexed, UAV+dispatch, VBV+constant+draw) are refused with no object, that their invalid neighbours (no root signature, short stride) stayE_INVALIDARG, and that a one-argument signature with a root signature is still created.docs/d3d12_vulkan.mdsection 4.7: says so.Tested
Built with VS 2022 Build Tools (MSVC 19.44), Windows SDK 10.0.26100, Vulkan SDK 1.4.363.0, RelWithDebInfo, on
main57ba40bd6. No game files.ctest -R ^d3d12_execute_indirect_validation$withLEONIDA_VK_VALIDATION=1: passes (state-argument signatures: 8 shapes refused with E_NOTIMPL; 51 parity cases against live WARP and the RTX 4060, 0 validation errors). With only the shim change reverted, it fails at the first shape:hr=0x00000000, object created.ctest -j 6: 384 of 384 passed, 13 skipped (game-data and optional tests).GPUs tested: NVIDIA GeForce RTX 4060, driver 621.14, Windows 11 Pro build 26300
AI-assisted: yes (Claude Code). Posted by a non-developer tester.
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a: D3D12 layer, no translator change)🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.