mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:10:53 +01:00
[PR #677] [MERGED] OLD-7234: restore old upstream PR 7234 - d3d12_xs: pin that the root-signature flag mask keeps every public flag (old upstream PR 7140) #717
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#717
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/677
Author: @aslan2142
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/25/2026
Merged by: @aslan2142
Base:
main← Head:root-sig-flag-mask📝 Commits (5)
558206bd3d12_xs: pin that the root-signature flag mask keeps every public flag (old upstream PR 7140)3769fd6root_sig_public_flags_test: allow 1.2 "host refuses, shim succeeds" only on a host without 1.200c65b9Merge commit 'refs/fix2/main' into fix2-6775e85304root_sig_public_flags_test: link d3d12_xs_pso_stream.cpp, as root_sig_test does on mainac3aef5root_sig_public_flags_test: expect the heap-indexed fallback where the host refuses those flags📊 Changes
3 files changed (+475 additions, -1 deletions)
View changed files
📝
docs/d3d12_vulkan.md(+15 -1)📝
runtime/CMakeLists.txt(+17 -0)➕
runtime/test/root_sig_public_flags_test.cpp(+443 -0)📄 Description
Claimed in the coordination issue as: OLD-7234 https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7130351383
Restoration of my original pull request, old upstream PR 7234 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; the only changes are that the old PR references in comments and commit messages are now plain text ("old upstream PR 7140").What and why
main.kXboxRootSignatureFlagHighByte,runtime/shims/d3d12_xs_rootsig.h) on every descriptor and RTS0 blob, whatever built it.0x03000000: its direct call passes a 1.1 description withFlags = 0x80, and its decoder readsFlagsas a 16-bit value.D3D12_ROOT_SIGNATURE_FLAGSvalue is in bits 0-11, so the mask cannot touch one, and it can stay unconditional.docs/d3d12_vulkan.mdanswers the question the doc still left open ("whether its root signatures carry them is open") and says why the mask stays as it is.root_sig_public_flags_test(Windows only, next toroot_sig_test) checks:[0, 0xFFFF];0x80and all twelve;0x03000080comes back as0x80, with a valid container hash and no other byte changed;static_asserts that no public flag lies in the cleared byte.Tested
Built and run on Linux. The Windows build used clang targeting x86_64-w64-mingw32 and ran under Wine 11.22. MSVC (
/W4 /permissive-) is left to CI.root_sig_public_flags_testbuilt againstmain's code: 28 pass, 0 fail, as expected for a guard.0x80, in a scratch copy: 12 pass, 16 fail. So the test catches a mask that eats a public flag.root_sig_test: 56 pass, 1 fail, the same onmainand on this branch. The failure is "shim deserializer accepts an all-zero-checksum Xbox blob". Wine's host deserializer causes it, and this pull request does not touch it.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.