Repository navigation
Conversation
Extend x2w_root_constants::Store to support capacity up to 32 words per parameter for native slot 86 roots while preserving the 8-word default for translated compute. In list_compute_constant and list_compute_constants, forward valid 32-bit root constants to the desktop command list when desktop_compute_root is bound. Implement list slot 45 (SetComputeRootUnorderedAccessView) in d3d12_xs.dll, translating guest placed buffer subrange offsets to desktop GPU virtual addresses and routing through bind_compute_root_view so restore_compute_root replays it. Update restore_compute_root to replay all bound 32-bit root constants in addition to root SRVs and UAVs after an intervening shim compute pass. Update CreateRootSignature and list_dispatch to consider compute root parameters forwarded and check that all declared root parameters are bound before dispatch. Add synthetic fixture tests/startup_compute_dispatch.cpp exercising WARP and hardware backends, verifying root constant bounds checking, full 32-word native root constants with vector padding, restoration across shim passes, and placed buffer subrange UAV dispatch with dedicated sentinels pinning unset/invalid states.
The restore fixture now clobbers the constants and the UAV through a same-layout root before x2w_d3d12_fixture_restore_compute_root, so the replay loop is required for the dispatch to read 59; without it the fixture reads 0 at the subrange or writes at the clobbered UAV. store_root_constants returns the words it kept and slots 37/39 forward exactly that span, so a cut write no longer marks words bound while the desktop list stays unset. The fixture dispatches after a 33-word write to the 32-word parameter and must read 39 at offset 448. Pin is_bound's full-width mask and both capacity guards in the store test, rename the unbound-root refusal to cover UAVs and constants, and update the slot 14 docs and the README row. Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
KelboLive
approved these changes
Nov 28, 2026
KelboLive
left a comment
Contributor
There was a problem hiding this comment.
LGTM — solid follow-up that extends compute dispatch forwarding to root UAVs and 32-bit constants alongside root SRVs.
store_root_constantsreturns words kept so the forwarder emits exactly the words both sides store, preventing drift.- Slots 37/39 validate parameter type and clamp capacity to the declared constant count.
- Slot 45 handles upload and placed-buffer UAVs with alignment checks.
restore_compute_rootreplays all constant words after a shim compute pass clobbers the desktop root.decide_dispatchchecks SRV/UAV/constants individually rather than a single bitmask.- Root constant store capacity expanded to 32 words with a 32-bit bound mask (avoids full-range mask wrap).
- New test uses sentinel pins at offsets 0/128/384 to catch mutants that relax binding checks.
Error messages generalized consistently across the codebase.
KelboLive
approved these changes
Nov 28, 2026
KelboLive
left a comment
Contributor
There was a problem hiding this comment.
LGTM — solid follow-up that extends compute dispatch forwarding to root UAVs and 32-bit constants alongside root SRVs.
store_root_constantsreturns words kept so the forwarder emits exactly the words both sides store, preventing drift.- Slots 37/39 validate parameter type and clamp capacity to the declared constant count.
- Slot 45 handles upload and placed-buffer UAVs with alignment checks.
restore_compute_rootreplays all constant words after a shim compute pass clobbers the desktop root.decide_dispatchchecks SRV/UAV/constants individually rather than a single bitmask.- Root constant store capacity expanded to 32 words with a 32-bit bound mask (avoids full-range mask wrap).
- New test uses sentinel pins at offsets 0/128/384 to catch mutants that relax binding checks.
Error messages generalized consistently across the codebase.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replacement submission for #2491. This branch contains the existing compute root-binding and Dispatch work plus the verified review follow-up commit. The original PR remains open because its author-owned branch was not writable from this account; these PRs overlap in scope, so please keep only one submission and close/mark the other as superseded when choosing.
Validation: the WARP/hardware compute-dispatch fixtures, native Dispatch WARP fixture, and root-constant store test passed (4/4).