Repository navigation
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.
…root or heap change
Compute root constants are kept per list next to the graphics ones, in a shared 16 x 8 word store that refuses parameter >= 16 and offset >= 8. A new compute root signature clears them.
Part of R0Y00#870. Forward Dispatch only with a desktop compute pipeline and root bound and group counts within 65535 per axis; refuse otherwise.
…nts, document slot 14
…t against the bound root Slot 43 clears a parameter's binding when a replacement is rejected, slot 33 clears all bindings, and the compute pipeline records its root so a mismatched pair is refused.
Compute root constants are kept per list next to the graphics ones, in a shared 16 x 8 word store that refuses parameter >= 16 and offset >= 8. A new compute root signature clears them.
Part of R0Y00#870. Forward Dispatch only with a desktop compute pipeline and root bound and group counts within 65535 per axis; refuse otherwise.
…nts, document slot 14
…t against the bound root Slot 43 clears a parameter's binding when a replacement is rejected, slot 33 clears all bindings, and the compute pipeline records its root so a mismatched pair is refused.
Conflicts in d3d12_xs_device.cpp and docs/experiments.md resolved by keeping both sides: the pipeline root out-parameter of the stream builder next to the cached-mesh root, the bound root SRV mask next to the recorded upload SRV addresses, and both table entries and document sections. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Conflicts in d3d12_draw.inl and d3d12_xs_device.cpp resolved by keeping both sides: graphics root constants go through the shared store and still mark the words a slot 40 call set. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A device slot 67 placeholder keeps the key of its published request. At
list slot 14 the stand-in loads the stage cs manifest and compiled
program for that key and records the dispatch: raw buffer inputs and
outputs from hardware descriptors in the recorded compute tables, entry
values from the recorded compute root constants. Other manifest lines
leave the pipeline untranslated; a dispatch that cannot be bound
completely is refused with one logged reason and records nothing.
startup_compute_dispatch_{warp,hardware} drives a source-built program
through the stand-in list and reads the output back, with controls
before translation, without a Dispatch and for a refused output.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Dispatches that arrive before the offline translation no longer use up the lines kept for refusals at bind time. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
tedin7
left a comment
There was a problem hiding this comment.
Review of head aca6e895 (code read only; no Windows run by me).
What I checked
- Scope: the diff against main also carries merges of #1803, #1974 and #1975. The new code is the last two commits (8 files, +435/-9):
d3d12_compute_dispatch.inl, small hooks ind3d12_draw.inl/d3d12_xs_device.cpp/translated_sampler_bindings.h, the consumer record mode, a new check script, docs. - Dependencies: the body says "depends on #1803, #1974, #1975". #1803 and #1974 are CLOSED (not merged), #1975 is OPEN. So this cannot land as it is; the author says the merges must be redone before opening.
- Test design (
tests/startup_compute_dispatch_check.py): it has a negative control (before translation the Dispatch is refused with "no translation" and all 320 words keep the sentinel), a no-Dispatch control, and a swapped-descriptor refusal control, and compares all 320 output words with the fixture expectation. This is the shape a source-built regression test plus negative control should have. - Not provable by me: the test needs DXC and a Windows D3D12 adapter, so I could not run it or mutate the code under test on Linux.
- Windows results: the body reports the two new tests at
aca6e895(WARP and hardware), but the neighbour ctest run (177/178) was made at1e567a02, before the last log-only commit. I did not verify any of these numbers. - Startup: the body does not claim startup progress, and no game result is posted on this head. Nothing here is verified against the game.
Local commands run
git diff --check origin/main...HEAD(clean)python3 tests/docs_links_check.py(passed, 19 files, 465 links)python3 tests/bidi_controls_check.py(passed)
Open points for @R0Y00
- Whether to take the stacked #1803/#1974/#1975 work first, or this PR as one unit. I leave that choice to you.
- After the dependencies land, the branch needs a fresh Windows run on the final head.
AI-assisted; commands listed were executed locally.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Yes, please use that split. The recorder fix can go directly against |
…tch-translated # Conflicts: # docs/experiments.md
|
Thanks, @R0Y00 and @MasterDomino. The recorder fix and its CPU tests are in #2636; the Dispatch tests are separate. @NiiRoZz, are you already working on the three slot-35 Dispatch checks? If not, I can send a test-only commit for you to cherry-pick after the recorder fix lands on AI-assisted (GPT-6.2-sol). Tests ran locally with synthetic inputs. |
|
The separate slot 35 recorder fix #2636 is on |
|
Preview executable run for this stack, ahead of the trim. It covers the current #2490 head Setup (Windows 11 build 26300; AMD Radeon RX 9070 XT, driver 32.0.32029.2010; Release):
Reading:
I'll repeat this matched pair on the trimmed head once #1974 and #1975 have landed. AI-assisted; commands listed were executed locally. |
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
@NiiRoZz: the prerequisites have all landed. #1803 is on What's still needed before it lands:
AI-assisted. |
|
Both prerequisites are now on |
tedin7
left a comment
There was a problem hiding this comment.
Review of head 206749e4 (code and fixture tests only).
Result: no merge from this review. The merge stays with @MasterDomino or @R0Y00. This change claims to move startup forward, and the matched title run on the exact head is still pending. We have no title to run it here.
What I checked:
- The diff against
mainis now only the compute delta (8 files, +496/-9). The snapshot copies of #1803, #1974 and #1975 are gone. publish_compute_requestnow returns the key. Every refusal path returns 0, so a refused request leaves no key on the wrapper.list_dispatchcallsdispatch_translatedfirst. The desktop decision of #1974 is untouched for every pipeline that is not a slot 67 placeholder.list_compute_rootnow clearscompute_srv_boundand setscompute_root_has_arguments, so a root change drops stale state.- The fixture covers
dispatch,dispatch-noneanddispatch-swapped(output descriptor without unordered access), so the refusal path has a control that must fail.
Still missing, as @MasterDomino listed above:
- @chasegrindy's three slot 35 Dispatch controls (fenced nonzero-index readback with swapped descriptors, root change and back, ordinary view heap change).
- A slot 86 desktop compute PSO case in
startup_compute_dispatch_*, to show the translated path leaves it alone. - The matched executable run on this exact head.
Commands run on Linux in a worktree at this head:
git diff --check origin/main...HEAD(clean)python3 tests/docs_links_check.py(19 files, 507 links)python3 tests/bidi_controls_check.py(clean)python3 tests/startup_compute_dispatch_check.pyprints usage only: it needs the Windows-built consumer anddxc. I did not run the mutations.
The head is 3 commits behind main. No Win2025 run was done for this review.
AI-assisted; commands listed were executed locally.
|
@chasegrindy, the recorder fix (#2636) is on Once the controls are on this branch, I'll rebuild that exact head, rerun the slot-35 and refusal mutants on the RX 9070 XT, and repeat the matched title pair. For the comparison I'll report the first refusal, the first allocation failure, the last visible output and the forwarded keys, per @R0Y00. AI-assisted. |
|
@NiiRoZz: @chasegrindy's slot 35 Dispatch controls are open as a test-only PR into this branch, NiiRoZz#1. I verified them on the RX 9070 XT and WARP (2/2, plus 275 neighbour tests passed), and all six slot 35 mutants are now caught, including the four that survived every earlier fixture. The details are in that thread. What's left on this PR:
AI-assisted. |
|
@NiiRoZz @MasterDomino #2532 was squash-merged into Before anything is closed: is the slot 35 Dispatch controls PR into this branch (NiiRoZz#1) still needed? If so, it could go as a small follow-up against Thanks for the work on this stack. AI-assisted; commands listed were executed locally. |
|
Thanks, @tedin7. I checked Yes, NiiRoZz#1 is still needed. @R0Y00 made those three slot 35 Dispatch controls a condition for this code landing, and @R0Y00, for the record: #2532 merged the translated Dispatch stack before three gates set for #2470/#2490 were met:
I'll run the matched title pair now on AI-assisted; commands listed were executed locally. |
|
@MasterDomino Cannot run Win2025 tests on |
|
@R0Y00, here's the matched run you asked for, on the code that actually landed: #2532 ( Setup (Windows 11 build 26300; AMD Radeon RX 9070 XT, driver 32.0.32029.2010; Release):
Frames presented at matched times:
Reading:
Still open: the slot 35 Dispatch controls (NiiRoZz#1, to be retargeted against AI-assisted; commands listed were executed locally. |
|
Follow-up on the frame-rate difference: two places in
Two ways to confirm it: a pair with the untranslated keys' retries backed off (or the lock taken only once a key is ready), or a short CPU profile around a run. I can do either on the RX 9070 XT if that helps. @NiiRoZz, since this is your code now on AI-assisted. |
|
Thanks for the matched run on landed #2532. Please start with a short CPU profile on the same warmed build and fixed input. Capture the time in the Dispatch refusal path, waiting for the shared graphics/compute lock, and manifest stat/open work separately. If the profile implicates manifest polling, try a second matched run changing only the retry interval. Record refused and forwarded calls, cache readiness, and presents at matching times. A source-built retry fixture should still show that a manifest published after an initial miss is picked up. Keep the census export as a diagnostic while collecting this evidence. The current counts establish that two keys forwarded and that the two runs ended at similar times; the slowdown's cause is still open. |
|
@R0Y00 @NiiRoZz, here's the profile of landed #2532 ( Method. A kernel sampling profile needs elevation here, so I used a local-only instrumented build of
Both runs used the same warmed cache snapshot, the same scripted input, the same 32 GiB cap with
Frames presented at matching times:
Reading:
Possible directions (for @NiiRoZz):
I can run the matched pair again on a fix. AI-assisted; commands listed were executed locally. |
|
The measurements support a focused per-key retry change. The 1 s run spent 29.6 of its 30.8 seconds holding the Dispatch lock inside manifest loads. The 10 s run cut that to 3.4 of 4.7 seconds, with the same number of forwarded keys. The startup presentation counts still vary, so please keep that separate. @NiiRoZz, start with a bounded per-key backoff after repeated misses, keeping the first retry prompt. Leave the lock redesign as a separate change. Extend the existing startup_compute_live_retry fixture so a manifest published after a miss becomes usable on the same pipeline, and use a controllable clock or an isolated schedule test to check both reduced polling and reset after success. MasterDomino can then rerun the matched pair. |
Depends on #1803, #1974 (both closed for now by their author to shorten the test queue, to be reopened) and #1975. This branch contains merges of those three, so the diff here includes them until they land; the new code is the last two commits.
What / Why
A device slot 67 compute pipeline is a placeholder: its request is published and translated offline
(
stage csmanifest andcs_6_0bytecode), but nothing ran the result. Command-list slot 14 refused everyDispatch with such a pipeline bound. This change runs the translated program for the narrowest case: raw buffer
inputs and outputs named by hardware buffer descriptors in the compute descriptor tables, with entry values from
compute root constants. Everything else is refused with one logged reason and records nothing on the desktop
list.
Change
publish_compute_requestreturns the request key; the slot 67 wrapper keeps it together with the rootsignature wrapper its description names.
src/startup_stubs/d3d12_compute_dispatch.inl:x2w-manifest 2/stage cs: acceptsgroup,ud,udsrc i rootconst p w,srv i buf table p b,uav i table p b; any other line leaves the pipeline untranslated with one loggedreason. An absent manifest is retried once per second, as for draws.
create_translated_root, which gains an optional UAV range after the SRV rangein the same table (graphics callers are unchanged).
dispatch_translated, called first inlist_dispatch: resolves every view before recording anything(inputs through
indirect_table_buffer; outputs must be placed buffers that alias the caller's memory, allowunordered access, start in COMMON and are not also an input), then states, descriptors in the draw heap ring,
constants from the recorded compute root constants,
Dispatch, a UAV barrier per output, and the title'sdesktop compute root and upload SRVs restored. The desktop-pipeline decision of startup: implement command-list slot 14 Dispatch (Part of #870) #1974 is untouched and still
handles every pipeline that is not a slot 67 placeholder.
x2w-render compute dispatches: translated <n>, refused <n>, no translation <n>.tests/startup_stream_consumer.cpp:slot67 ... dispatch|dispatch-none|dispatch-swappedrecords the heap,pipeline, root, constants, table and Dispatch on a stand-in list and writes the output words read from the
aliased memory.
docs/experiments.md: section "Translated compute Dispatch".Tests
Commit under test:
aca6e895(local; the neighbour run below was made at1e567a02, before a log-only follow-up, andthe two new tests were rerun at this commit). Windows 11 build 26300. Debug layer enabled in the new tests
(
X2W_D3D12_DEBUG=1); its messages are drained into the log at the Dispatch and after the queue's execute, andnone is an error or corruption message. No probe showed that a wrong state would be reported there.
startup_compute_dispatch_warp: Passed. Microsoft Basic Render Driver, driver 10.0.26100.10068.startup_compute_dispatch_hardware: Passed. NVIDIA GeForce RTX 5090, driver 32.0.16.2135.Each run checks, on one cache: before translation the Dispatch is refused with "no translation" and all 320
output words keep the sentinel (negative control: the test fails if nothing translated is dispatched); after
gfx2hlsl.py --pendingall 320 words equal the fixture's expectation; with no Dispatch recorded the output isuntouched; with the two descriptors exchanged the Dispatch is refused with one reason, the output is untouched
and the input is unchanged.
178 selected: 177 passed, 0 failed, 1 capability skip (
startup_logical_view_warp: the adapter accepts thedescriptor count directly, so that test has nothing to check; unrelated to this change). Before the change the
same build passed 162 of 162 on the narrower filter without the last three alternatives.
Limits
Merged dependency snapshots: feat: record compute root signature and descriptor tables (list slots 33 and 35) #1803
9c87260b, startup: implement command-list slot 14 Dispatch (Part of #870) #19747307c2f1, startup: implement command-list slots 37 and 39 root constants and views (Part of #870) #1975033f40cd. startup: implement command-list slots 37 and 39 root constants and views (Part of #870) #1975 has since moved to9828b5d8(its merge onto this branch's startup: implement command-list slot 14 Dispatch (Part of #870) #1974 merge is conflict-free bygit merge-tree); feat: record compute root signature and descriptor tables (list slots 33 and 35) #1803 and startup: implement command-list slot 14 Dispatch (Part of #870) #1974 areclosed upstream for now. Redo the startup: implement command-list slots 37 and 39 root constants and views (Part of #870) #1975 merge before opening.
On an adapter where the placed output buffer cannot alias the caller's memory, the hardware test fails
instead of skipping.
One source-built gfx1013 fixture program. No title run; nothing here establishes full-game startup.
Not dispatched: programs with textures, samplers, root views, entry values that are not root constants, no
entry values, no inputs or no outputs; outputs in memory that is not an aliased placed buffer; descriptors that
are view tokens; ExecuteIndirect dispatches.
The slot numbers and argument layouts are those the stand-in already uses; the fixture proves the stand-in is
self-consistent, not the console ABI.
git diff --checkclean; LF in the index.🤖 Generated with Claude Code