feat: record compute root signature and descriptor tables (list slots 33 and 35) #1796
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1803"
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?
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T18:54:00Z.
Part of #870 (no
Fixes).What this unblocks: a later Dispatch handler (#1441) can read the compute descriptor tables that the title bound with
SetComputeRootDescriptorTable.What
Records the compute descriptor tables of a command list, state only:
SetComputeRootDescriptorTable(parameter, GPU handle). The handle is resolved to the table address in the title's view heap, the same lookup the graphics table (slot 36) uses. It is now shared inresolve_title_table.SetComputeRootSignature) keeps its existing desktop bind. It also tells the tables about the new signature: a different signature (or none) clears them.SetDescriptorHeapswith a different view heap clears the compute tables too, like the graphics tables.Dispatch (slot 14) is not touched here. It stays in #1441.
How
src/startup_stubs/list_compute_root.h(ComputeTables), builds with plain g++ on Linux.d3d12_xs_device.cpp: onePassmember, one table entry, one line in the slot 33 handler.d3d12_draw.inl: the shared lookup, the slot 35 handler, the clear on a view heap change.tests/startup_compute_root.cpp, registered asstartup_compute_root.Verification
Linux:
g++ -std=c++17 -Wall -Wextra -Isrc tests/startup_compute_root.cppand run: okgit diff --check,tests/docs_links_check.py,tests/bidi_controls_check.py: passWin2025 (WARP only), head
9c87260b,python3 x2w_pipe.py win2025 1803 --force(default 3-slot pool):--preset dev) build + ctest: 24/24 passed/O2(--preset release) build + ctest: 24/24 passedstartup_compute_root,startup_stubs,d3d12x_compute_list_warp,cpu_shim_compute_warp,cpu_shim_draw_warp,d3d12x_graphics_list_warp.AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T19:14:42Z.
Closing this draft for now to help keep the open PR queue manageable; the branch stays preserved on the fork so it can be reopened once the queue clears.
Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-24T21:57:19Z.
Codex Review Summary: ✅ Completed
This comment shows the latest Codex review activity on this pull request.
0192a5eℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T22:43:01Z.
Review: CHANGES_REQUESTED
Main already binds a desktop compute root signature at slot 33 (
6e16e21a). This branch registers a state-only handler in the same slot; taking it as written would replace that desktop bind and leave #1974'sPass.compute_rootunset. Please preserve the existing bind and focus the remaining delta on slot 35 and descriptor invalidation. Reuse the accepted/rejected dispatch fixture in #1441 and the root-constant cases in #1974/#1975. A nonzero UAV descriptor offset plus one wrong or cleared binding would distinguish the slot 35 path from a default table.Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T11:02:37Z.
Verification on head
9c87260b:python3 x2w_pipe.py win2025 1803 --force(default 3-slot pool, WARP).--preset dev): build ok, ctest 24/24 passed/O2(--preset release): build ok, ctest 24/24 passedstartup_compute_root,startup_stubs,d3d12x_compute_list_warp,cpu_shim_compute_warp,cpu_shim_draw_warp,d3d12x_graphics_list_warpAI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T13:50:36Z.
Closing this PR for now to keep the Windows test queue short. Nothing is wrong with it and the branch stays as it is.
We will reopen it once the queue is clear, re-run the Win2025 WARP checks at its head, and post the result here.
AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by MasterDomino on 2026-11-25T21:51:23Z.
Reopening at the unchanged head
9c87260b, per @R0Y00's 21:15 note on #2470: this lands first in the order #1803 → #1974 → #1975 → trimmed #2470 → #2490. @tedin7, it's still your PR, so I've only changed its state.Where it stands:
mainbut is 366 commits behind, so CI needs a fresh run.0192a5edis still open.I'll review the slot 33/35 recording and the heap/root invalidation at this head. That includes keeping the already supported desktop slot-33 bind, plus a mutant control.
AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by MasterDomino on 2026-11-25T22:19:18Z.
Review: COMMENTED
Review at head
687eb702. It merges currentmaininto9c87260b; this PR's own changed lines are identical at both commits. It merges cleanly ontomainfc97ade7, and CI is green.@R0Y00, your change request from
0192a5edlooks satisfied on the structural points. Could you re-review, or dismiss it if you agree?main's desktop compute-root bind (SetComputeRootSignature,compute_root,compute_params, the upload-SRV restore). The only addition there iscompute_tables.set_signature(root_info(w)).list_compute_table), plus clearing the tables on a different compute root and on a slot-32 view-heap change.release_targetsresetsPass).resolve_title_tableunchanged, so graphics tables behave as before.One gap remains against the fixture part of the request.
startup_compute_rootcovers a nonzero descriptor offset and a wrong or cleared binding at header level, but nothing in this PR exercises the slot-35 handler or the slot 32/33 wiring.startup_compute_dispatch_*:gpu + k*incrementto slot 35.Minor: the title still says "slots 33 and 35", but slot 33 now only notifies the tables.
Commands and results (Windows 11 build 26300,
--preset dev; AMD Radeon RX 9070 XT, driver 32.0.32029.2010; WARP 10.0.26100.9818)cmake --preset devandcmake --build --preset devat687eb702: OK.ctest --preset dev --no-tests=error -R 'startup_compute_root|startup_stubs|d3d12x_compute_list|cpu_shim_compute|cpu_shim_draw|d3d12x_graphics_list|startup_logical_view|startup_draw|desktop_root_signature': 24 run, 22 passed, 0 failed._hardwaretests ran on the RX 9070 XT.startup_logical_view_{warp,hardware}("adapter accepts 1245184 descriptors directly").f5b03039: it contains9c87260b, every line this PR adds is present, and the header and test are byte-identical.ctest --preset dev --no-tests=error -j1 -R '^startup_compute_dispatch_(warp|hardware)$' -V: 2/2 passed.Mutants (one-line source changes, rebuilt, restored)
startup_compute_root(this PR)startup_compute_dispatch_*(#2470)clear()a no-opset_tableignores the parameter (table 0)set_signaturecall removedNo P1. I have no code changes to request in this PR; the coverage gap above belongs to #2470 or a follow-up.
AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-25T22:27:34Z.
Review: APPROVED
The original slot-33 blocker is resolved. The desktop compute-root bind and parameter upload/restore are preserved. This candidate adds slot 35 table recording and invalidation on compute-root and view-heap changes. I rebuilt
687eb702in Windows Release and ranctest --preset release --no-tests=error -R '^(startup_compute_root|startup_stubs)$' -V: 2 passed, 0 skipped. The table offset and invalidation at the real dispatch still need an end-to-end control. I agree with MasterDomino that this belongs on the first consumer, #2470: use a nonzero descriptor index and restore constants after a root or heap change without rebinding slot 35. That check remains a requirement before #2470 lands.Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T22:35:29Z.
@MasterDomino @R0Y00: #1803 is ready for review at head
687eb702.What changed since
9c87260b: merged currentmain(merge commit, no force-push). The slot 33 desktop compute bind frommainis kept. The delta is only slot 35 table recording and the descriptor/root-signature invalidation. The tests cover a nonzero UAV table offset and a wrong handle that clears the binding. Dispatch consumption is #1974, per the agreed order.CI is green. Win2025 receipt on this exact head:
Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit
687eb7028a8be0108cabf1ff1504b5235347462f:--preset dev):cmake --build --preset dev --target d3d12_xs_device_obj d3d12_xs_shim startup_compute_root startup_indirect_dispatch startup_list_resubmit startup_heap_indexed_root_check startup_storage_root_check startup_logical_view_table_check startup_command_list_slot_names startup_list_queries -- -j 2):31.25s(configure2.28s)ctest --preset dev -R '^(startup_compute_root|startup_stubs|startup_indirect_dispatch.*|startup_list_resubmit.*|startup_heap_indexed_root.*|startup_storage_root.*|startup_logical_view_table.*|startup_command_list_slot_names|startup_list_queries.*)$' --parallel 4 --no-tests=error --output-on-failure): 23/23 passed (1.04s:startup_list_queries_default_warp_control0.09s,startup_indirect_dispatch_warp0.10s,startup_list_queries_warp0.12s,startup_command_list_slot_names0.02s,startup_list_resubmit_nodebug_warp0.30s,startup_list_resubmit_warp0.34s,startup_list_resubmit_nodebug_untracked_warp0.40s,startup_list_resubmit_untracked_warp0.22s,startup_list_resubmit_hardware0.20s,startup_list_resubmit_nodebug_hardware0.20s,startup_indirect_dispatch_hardware0.07s,startup_stubs0.86s,startup_list_resubmit_nodebug_untracked_hardware0.22s,startup_list_resubmit_untracked_hardware0.22s,startup_list_queries_hardware0.08s,startup_heap_indexed_root0.02s,startup_heap_indexed_root_sampler-alone_control0.02s,startup_heap_indexed_root_bind-unrestorable_control0.02s,startup_storage_root0.03s,startup_storage_root_separator_control0.02s,startup_logical_view_table0.02s,startup_list_queries_default_hardware_control0.08s,startup_compute_root0.02s)/O2(--preset release):cmake --build --preset release --target d3d12_xs_device_obj d3d12_xs_shim startup_compute_root startup_indirect_dispatch startup_list_resubmit startup_heap_indexed_root_check startup_storage_root_check startup_logical_view_table_check startup_command_list_slot_names startup_list_queries -- -j 2):46.04s(configure1.90s)ctest --preset release -R '^(startup_compute_root|startup_stubs|startup_indirect_dispatch.*|startup_list_resubmit.*|startup_heap_indexed_root.*|startup_storage_root.*|startup_logical_view_table.*|startup_command_list_slot_names|startup_list_queries.*)$' --parallel 4 --no-tests=error --output-on-failure): 23/23 passed (1.00s:startup_command_list_slot_names0.02s,startup_indirect_dispatch_warp0.09s,startup_list_resubmit_nodebug_warp0.29s,startup_list_resubmit_warp0.36s,startup_list_resubmit_nodebug_untracked_warp0.32s,startup_list_resubmit_untracked_warp0.22s,startup_list_resubmit_hardware0.22s,startup_list_resubmit_nodebug_hardware0.22s,startup_stubs0.67s,startup_indirect_dispatch_hardware0.07s,startup_list_resubmit_nodebug_untracked_hardware0.22s,startup_list_queries_hardware0.04s,startup_list_resubmit_untracked_hardware0.22s,startup_heap_indexed_root0.01s,startup_heap_indexed_root_sampler-alone_control0.01s,startup_heap_indexed_root_bind-unrestorable_control0.01s,startup_list_queries_default_warp_control0.16s,startup_list_queries_warp0.21s,startup_list_queries_default_hardware_control0.07s,startup_storage_root0.03s,startup_storage_root_separator_control0.02s,startup_logical_view_table0.02s,startup_compute_root0.01s)sccache: 3/28 hits; wall92.5sAI-assisted; commands listed were executed locally.