mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 22:25:53 +01:00
[PR #657] [MERGED] OLD-8904: restore old upstream PR 8904 - root_signature: accept root constants of 0 values, as the host does (D3D-942) #697
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#697
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/657
Author: @aslan2142
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/25/2026
Merged by: @aslan2142
Base:
main← Head:root-constants-zero📝 Commits (4)
a634430root_signature: accept root constants of 0 values, as the host does (D3D-942)509a543Merge main into root-constants-zero244e89froot_sig_contract: accept root constants of 0 values, as the runtime packer does48245b4root_signature_test: 64 constants spill whole for compute, refused as a spill for pixel📊 Changes
5 files changed (+94 additions, -17 deletions)
View changed files
📝
runtime/src/root_signature.cpp(+3 -8)📝
runtime/src/root_signature.h(+5 -3)📝
runtime/test/root_signature_test.cpp(+64 -1)📝
tests/test_root_sig_contract.py(+15 -1)📝
tools/root_sig_contract.py(+7 -4)📄 Description
Claimed in the coordination issue as: OLD-8904 https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7129644051
Restoration of my original pull request, old upstream PR 8904 in
ItsNotRexed/Leonida, which was closed unmerged when that repository went private on 2026-11-23 (old numbers link nowhere now). Rebased onto main at21625bca8c; no changes beyond the rebase.Depends on: #420 (adjacent-line conflict in pack_stage(); either order resolves easily)
What and why
pack()andpack_stage()inruntime/src/root_signature.cpprefused a 32-bit-constants parameter withNum32BitValues == 0. SoCreateRootSignaturefailed where host D3D12 answersS_OK. The serializer warns for versions 1.0 and 1.1, and both devices still create the root signature.pack()it gets no provenance entry.pack_stage()it shares its first SGPR with the next parameter, so no other offset changes.ShaderUserDatablock, not one range per parameter. The command list already refuses any write past a parameter's constant count.root_signature_test(both packers):Tested
Built and run on Linux. The Windows build used clang targeting x86_64-w64-mingw32 and ran under Wine 11.22. The same files were also built natively for Linux with clang. MSVC (
/W4 /permissive-) is left to CI.root_signature_testonmainunchanged: 56 pass, 0 fail.main's code: 58 pass, 8 fail (the 8 zero-value cases).git diff --checkandscripts/check_no_game_data.pyon the changed files: clean.GPUs tested: n/a (the test needs no GPU)
AI-assisted: yes
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a: no translator change)AI-assisted (Claude Code, Claude Opus 5.5).
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.