Repository navigation
feat: record compute root signature and descriptor tables (list slots 33 and 35) - #1803
Conversation
…33 and 35) Header-only state in list_compute_root.h with a Linux-testable check. Dispatch (slot 14) is not handled here; the state is exposed through ready() and table() for it. Refs R0Y00#870.
|
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. |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour 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. |
R0Y00
left a comment
There was a problem hiding this comment.
Main already binds a desktop compute root signature at slot 33 (6e16e21). This branch registers a state-only handler in the same slot; taking it as written would replace that desktop bind and leave #1974's Pass.compute_root unset. 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.
|
Verification on head
AI-assisted; commands listed were executed locally. |
|
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. |
|
Reopening at the unchanged head Where it stands:
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. |
MasterDomino
left a comment
There was a problem hiding this comment.
Review at head 687eb702. It merges current main into 9c87260b; this PR's own changed lines are identical at both commits. It merges cleanly onto main fc97ade7, and CI is green.
@R0Y00, your change request from 0192a5ed looks satisfied on the structural points. Could you re-review, or dismiss it if you agree?
- Slot 33: it keeps
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)). - Slot 35 and invalidation: what's left is slot 35 (
list_compute_table), plus clearing the tables on a different compute root and on a slot-32 view-heap change.- The tables are also cleared at Close (
release_targetsresetsPass). - Slot 35 on a closed list is ignored.
- Parameters ≥16 are refused, counted, and logged at most 4 times.
- The tables are also cleared at Close (
- Slot 36: its lookup moved into
resolve_title_tableunchanged, so graphics tables behave as before.
One gap remains against the fixture part of the request.
- Here:
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. - In the first consumer, #2470's
startup_compute_dispatch_*:- The table is bound at the heap start.
- Slot 35 is set again after the root change or reset.
- Its root-change and reset controls refuse on the entry values before the tables are read.
- Result: a dropped descriptor offset, a missing clear on a root change and a missing clear on a heap change all pass there; see the mutants below. I'd close this in #2470 (@NiiRoZz) rather than here:
- Write the descriptors at index ≥1 and pass
gpu + k*incrementto slot 35. - Add a control that sets slot 35, then changes the compute root (or the view heap) and sets the constants again without slot 35, expecting "a table descriptor is not bound".
- Write the descriptors at index ≥1 and pass
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.- The
_hardwaretests ran on the RX 9070 XT. - 2 capability skips:
startup_logical_view_{warp,hardware}("adapter accepts 1245184 descriptors directly").
- The
- #2470 at
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.- The debug layer was enabled, with no error message.
- All 320 words matched, and the 6 refusals behaved as expected.
Mutants (one-line source changes, rebuilt, restored)
| mutant | startup_compute_root (this PR) |
startup_compute_dispatch_* (#2470) |
|---|---|---|
| no clear on a different signature | caught | survives |
clear() a no-op |
caught | survives |
| heap-change clear removed (slot 32) | survives | survives |
set_table ignores the parameter (table 0) |
caught | caught ("a table descriptor is not bound") |
| out-of-range parameter accepted | caught (as a crash) | survives |
slot 33 set_signature call removed |
survives | survives |
| slot 35 handler a no-op | survives | caught |
| slot 35 records parameter 0 | survives | caught |
| slot 35 accepted on a closed list | not run | survives |
| descriptor offset dropped (the table resolves to the heap start) | survives | survives |
No 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.
R0Y00
left a comment
There was a problem hiding this comment.
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 687eb702 in Windows Release and ran ctest --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.
|
@MasterDomino @R0Y00: #1803 is ready for review at head What changed since CI is green. Win2025 receipt on this exact head: Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit
AI-assisted; commands listed were executed locally. |
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.