mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:50:51 +01:00
[PR #1009] d3d12: immutable compute root-argument blocks (ROOT-SIG-SPILL-MODEL) #1047
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#1047
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/1009
Author: @djrolfes
Created: 11/24/2026
Status: 🔄 Open
Base:
main← Head:djrolfes/root-sig-spill-safe📝 Commits (2)
23848bcroot_signature: model the compute argument block instead of refusing a spill25e5c4ed3d12: snapshot compute arguments into submission-retained arena blocks📊 Changes
19 files changed (+986 additions, -118 deletions)
View changed files
📝
docs/d3d12_vulkan.md(+50 -19)📝
docs/design.md(+1 -0)📝
runtime/CMakeLists.txt(+45 -0)📝
runtime/shims/d3d12_com.cpp(+19 -24)📝
runtime/shims/d3d12_com.h(+2 -0)📝
runtime/shims/d3d12_vulkan_device.cpp(+24 -4)📝
runtime/src/command_list.h(+4 -0)📝
runtime/src/root_signature.cpp(+17 -15)📝
runtime/src/root_signature.h(+24 -15)📝
runtime/src/vulkan_backend.h(+24 -0)📝
runtime/src/vulkan_replay.h(+28 -0)➕
runtime/test/d3d12_root_arguments_test.cpp(+189 -0)➕
runtime/test/glsl/cs_root_arguments.comp(+28 -0)➕
runtime/test/queue_root_arguments_test.cpp(+151 -0)➕
runtime/test/replay_root_arguments_test.cpp(+134 -0)📝
runtime/test/root_signature_test.cpp(+86 -31)➕
runtime/test/vk_root_arguments_test.cpp(+100 -0)📝
tests/test_root_sig_contract.py(+44 -5)📝
tools/root_sig_contract.py(+16 -5)📄 Description
Claimed: ROOT-SIG-SPILL-MODEL (coordination).
Depends on: #974, #1547, #1723 (merged; their layouts, pipeline workers and post-story queue/indirect paths are retained).
What and why
Compute root arguments need a packed memory block even for some signatures that fit inline. This is the full argument block, not merely a tail spill.
All 52 embedded builder headers already initialize s4 from WorkgroupId.x. No translator/system-value override is needed.
Tested rebase
Head
0cc10a1ec, based on490f5b9ec, replaces previously tested1a85aad9c. Earlier tested heads remain preserved. Clean merge-tree check against newer main5da72d19f. Same PR and remote branch; updated with an explicit old-head lease.Preserves main's graphics/mesh argument windows, heap-direct indexing, title-VA rebasing, table descriptor counts, asynchronous/skipped pipeline behavior and geometry retention.
block_offsetfollowstable_descriptors; a regression asserts they remain distinct. The rollback fixture now injects a genuine second-upload failure instead of assuming an unresolved pipeline must abort submission.The newer rebase also keeps main's stateful indirect-draw recording, clamp preparation/emission and submission retention, and
remember_tabletracking. Compute snapshots follow the movedrecord_indirecthelper. A regression resolves one deferred pipeline shared by direct/indirect dispatches and checks every root-block VA survives. The GPU fixture now retains main's unbacked-root-view zeroing control and uses an explicitly synthetic, never-dereferenced alias to probe both address halves.d3d12_indirect_zeroskips the Microsoft-host comparison under Wine; it is not counted as a pass.d3d12_indirect_dispatch_countnow passes with main's merged fix; its earlier failure is not being carried as a waived result.GPUs tested: NVIDIA RTX 3070 Ti 8 GiB, driver 620.73.04, Linux; Wine 11.22 for Windows tests. Windows validation layers are unavailable here; GPU validation ran natively. Native Windows/MSVC not tested. Independent native Windows RTX 4060 confirmation of the old head's six root tests remains historical evidence, not a test of this rebase.
Scope and limitations
No title RT correctness, world frame or gameplay is claimed. The separate retail validation tree testing #1558 and owned translator fixes does not contain this PR.
Spilling-table behavior extends the measured inline four-byte table width and remains unmeasured in a retail spilling-table program. Other driver-SGPR scalar conventions are not established by these tests. Graphics spill layout is unsupported.
The earlier incorrect CreateHeap attribution remains withdrawn in the correction; slot 61 belongs to #383, not this work.
AI-assisted: yes. No game content, shader listings, raw boot logs, captures, keys or decryption included.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.