d3d12: compute dispatch root-binding review follow-up #3345
No reviewers
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows!3345
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3343"
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?
@romn4rch on GitHub · 2026-11-28 11:21 UTC · original
romn4rch:copilot/pr-2491-review-088f7f23→main· +713 −50 · 12 files · 3 commits · openReplacement 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).
@KelboLive on GitHub · 2026-11-28 21:23 UTC · original · approved these changes
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.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.Error messages generalized consistently across the codebase.
@KelboLive on GitHub · 2026-11-28 21:57 UTC · original · approved these changes
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.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.Error messages generalized consistently across the codebase.
@Leyukaka on GitHub · 2026-11-29 07:01 UTC · original · reviewed
Review of head
088f7f23, by reading only (not built or run).As the description says, this replaces #2491: the branch is #2491's two commits (
d0ccda2f,aa7a96b5) plus088f7f23.git diff aa7a96b5 088f7f23 -- srcis empty. The new commit changes onlytests/startup_compute_dispatch.cpp(log-count checks) andCMakeLists.txt(X2W_TRAP_LOGfor the twostartup_compute_dispatch_root_*tests).git merge-tree --write-tree origin/main 088f7f23exits 0 onmain212d4b5f.The three points of the
aa7a96b5review on #2491 are unchanged at this head, same line numbers; details are there:list_upload_gpuhit as the root UAV address (d3d12_xs_device.cpp:4455-4456); those pages are UPLOAD heap,GENERIC_READ(list_upload_pages.h:19,27). No fixture case reaches this branch.:4458-4469) uses the owner's desktop buffer whenplaced.aliasis null and does not checkD3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS; the translated output path refuses both (d3d12_compute_dispatch.inl:641,:645).d3d12_compute_dispatch.inl:774-778(root SRVs only) and the rect-list conversion (d3d12_xs_device.cpp:3899, guarded byhas_compute_root_viewsat:3887, which ignores constants) set the desktop compute root again withoutrestore_compute_root; a later Dispatch still passesall_bound(:4574-4590).New at this head:
tests/startup_compute_dispatch.cpp:302(no arguments),:314(UAV, no constants),:331(unplaced UAV),:382(misaligned UAV),:389(rejected UAV).:328(unplaced),:379(+384 + 1),:387(~0).+384 + 1address is inside the placed buffer and is dropped for alignment (d3d12_xs_device.cpp:4471), yet the line it logs (:4480) says "is not an upload or placed buffer range". The new check counts that text.is_bound(i, 0, p.constants_count, cap)atd3d12_xs_device.cpp:4584reduced to count 1. Every refused Dispatch has either no constant word set or all 32, and both forwarded ones follow a 32-word write. A Dispatch after a partial write (words 0-1 only, for example) that must be refused would pin it.tests/startup_compute_dispatch.cpp:364says the offset 31, count 2 write is "rejected".Store::setcuts it to one word at offset 31 (root_constant_store.h:48-49) and slot 39 forwards that word (d3d12_draw.inl:3466-3468). The full write at:368overwrites that word, so the readback is unaffected.Minor:
docs/experiments.mdonmainhas two## Startup list Dispatchsections (lines 17188 and 17224). This PR updates the first; the second still says only root SRV parameters are forwarded.CI passes at
088f7f23. Theprpreset runsstartup_compute_dispatch_root_warponly.Points 1-3 are still open at
088f7f23.@JohnConnorNPC on GitHub · 2026-11-29 12:48 UTC · original
I reviewed
088f7f23againstmain77d1ba4dby reading it. I did no Windows build or GPU run.MUST
main.git merge-tree --write-tree --name-only origin/main 088f7f23givesCONFLICT (content): Merge conflict in CMakePresets.json.if (const auto gpu = list_upload_gpu(self, address, 1))and theplaced.owner->own().realfallback, which are Leyukaka's points 1 and 2.record_translated_dispatchstill replays onlydesktop_compute_upload_srvsafter a translated dispatch (point 3).fc0c862bhas those fixes and is rebased on currentmain.SHOULD
2. If you still want the log-count checks from
088f7f23, they would need porting onto #2491, because a rebase here won't carry them over correctly. They count lines that containis not an upload or placed buffer range, which #2491 no longer logs. It now logsis not an aliased placed buffer range with unordered access. #2491's three new slot 45 controls (upload page, no UAV flag, non-aliased) also add refused Dispatches and dropped binds, so the expected 5 and 3 no longer hold.AI-assisted.
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.