Skip to content

startup: read translated compute inputs that live only in title memory from a snapshot - #2862

Merged
R0Y00 merged 7 commits into
R0Y00:mainfrom
tedin7:c18-upstream-snapshot
Nov 28, 2026
Merged

R0Y00 merged 7 commits into
R0Y00:mainfrom
tedin7:c18-upstream-snapshot

Conversation

@tedin7

@tedin7 tedin7 commented Nov 26, 2026 •

Copy link
Copy Markdown
Collaborator

Part of #870
Fixes #2860

What this unblocks: translated compute dispatches whose input buffers were written by the title (placed buffers that do not alias title memory) and dispatches with an unbound input run instead of being refused, also in a long run.

Change

Runtime only (d3d12_draw.inl, d3d12_xs_device.cpp, upload_reservation.h), plus a docs paragraph and test modes:

  • X2W_TRANSLATED_TITLE_INPUT_SNAPSHOT=1 (opt-in): an input in a placed buffer that does not alias title memory is read from a GPU copy this list made, else from a snapshot of at most 16 MiB copied from title memory at the dispatch.
  • Snapshots have a pool of their own, built like the shared upload ring of fix(startup): reuse upload ring chunks after GPU completion #2849: 128 MiB in chunks of 16 MiB, a chunk is reused once no recording can submit its bytes and every queue that used it has finished, and a recording holds the chunks it used. Its chunks are numbered after the ring's in the same recording mask and per-queue table, so the two pools cannot collide. Draw and texture uploads cannot use up the snapshots' pool, and a long run is not stopped by it filling up: with snapshots in the shared ring, a long run reported on this PR hit snapshot ring reservation refused: no unused capacity (report), and a pool that is never reused fills up over time. A reservation the pool cannot serve logs x2w-draw snapshot pool reservation refused: no unused capacity.
  • An all-zero compute input descriptor is an unbound buffer and binds 16 zero bytes (taken from the snapshot pool). An empty range with any non-zero word stays refused.
  • The log names the source of each key's first input; the render totals count GPU copies and snapshots.

Verification

Linux (executed locally):

  • git diff --check origin/main...HEAD: clean
  • cmake -S . -B <dir> -DDXC_EXECUTABLE=/bin/true: configure rc 0
  • tests/upload_reservation_check.cpp (new check_snapshot_pool: pool numbering, holds and discard in both pools, per-queue completion of a snapshot chunk, reuse of a finished unheld chunk) built with g++ and run: passes
  • x86_64-w64-mingw32-g++ -fsyntax-only -std=c++20 on d3d12_xs_device.cpp: no error in the changed code (the MinGW headers stop on MSVC-only constructs that origin/main has too)

Win2025 (Windows Server 2025, Build 26100, MSVC 14.44.35207, D3D12 WARP) at 73b2d0ff73921cce81188d3e11cda6064ac3de87:

  • ctest --preset dev -R '^(startup_compute_dispatch_input_|upload_reservation$)' --no-tests=error --output-on-failure: 3/3 passed (startup_compute_dispatch_input_warp, startup_compute_dispatch_input_hardware, upload_reservation)
  • ctest --preset release -R '^(startup_compute_dispatch_input_|upload_reservation$)' --no-tests=error --output-on-failure: 3/3 passed
  • Mutant (snapshot pool never recycled), dev: startup_compute_dispatch_input_warp and _hardware fail with AssertionError: dispatch-input-snapshot-long: consumer exit 85 after x2w-draw snapshot pool reservation refused: no unused capacity; upload_reservation passes.

Tests: startup_compute_dispatch_input keeps dispatch-input-snapshot (off: refused; on: all 320 words match; zero title memory runs on zeros) and dispatch-input-null, and adds dispatch-input-snapshot-long: 48 frames of dispatches whose 8 MiB title-memory input is snapshotted each frame with the queue completed between frames (384 MiB in all, three times the pool). Every frame must translate and give the first frame's words, the last frame must match the CPU reference on the D3D12 adapter, and no reservation may be refused.

Real-hardware testing: @Makto94 - thanks for the help.

Source: Microsoft D3D12 documentation (placed resources, upload heaps, raw buffer SRVs).

…y from a snapshot, and bind unbound inputs as zeros

A compute input in a placed buffer that does not alias title memory is a committed default buffer that holds zeros, so the bytes the title wrote exist only in title memory. With X2W_TRANSLATED_TITLE_INPUT_SNAPSHOT=1 (opt-in) the range (at most 16 MiB) is copied into a dedicated upload pool (128 MiB) so draw and texture uploads cannot starve it. A compute input whose four descriptor words are all zero is an unbound buffer: it reads zeros (16 bytes) instead of refusing the dispatch; an empty range with any non-zero word is still refused. The log names the source of each input and the render totals count GPU copies and snapshots.
@tedin7
tedin7 marked this pull request as ready for review November 26, 2026 14:52
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-26T20:46:31.917087Z 73b2d0f Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d9fbfc86a3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/experiments.md Resolved
@tedin7

tedin7 commented Nov 26, 2026

Copy link
Copy Markdown
Collaborator Author

Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit 4322d76f155c1878da11b3b3e2dee195b1886bfe:

  • Debug (ctest --preset dev -R 'startup_compute_dispatch_input' --parallel 2 --no-tests=error --output-on-failure): 2/2 passed (startup_compute_dispatch_input_warp, startup_compute_dispatch_input_hardware)
  • Release (ctest --preset release -R 'startup_compute_dispatch_input' --parallel 2 --no-tests=error --output-on-failure): 2/2 passed (same two tests)

AI-assisted; commands listed were executed locally.

@KelboLive KelboLive left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work on this. The approach is sound:

  1. Dual upload pools (snapshot 128 MiB vs draw/texture 256 MiB) correctly prevents snapshots from starving draw uploads

  2. Resolution order is correct: GPU copy (from X2W_TRANSLATED_INDIRECT_COPY_RANGES) -> snapshot -> refusal. The fallback chain is safe and the 16 MiB cap on snapshots is reasonable

  3. Null descriptor handling: correctly produces 16 bytes of zeros for all-zero descriptor words, matching hardware behavior. The readable_window check before ring_copy is the right guard

  4. indirect_table_buffer API expansion: added allow_title_snapshot parameter cleanly propagated from record_translated_dispatch

  5. Tracking counters: atomic counters with snapshot KiB tracking gives good observability

Minor notes:

  • The InputSource source field in IndirectBufferView is a clear 4-value enum. When this stabilizes consider a typed enum (similar to NullCause) rather than int, but not urgent
  • The 128 MiB / 256 MiB split is hardcoded. If title pressure shows the pool balance needs tuning, make the split configurable. Not needed today

Looks good to merge. This unblocks #2860 and forms a solid foundation for the upload ring reuse work in #2847.

@Leyukaka

Copy link
Copy Markdown
Collaborator

A run report for this PR, combined with #2902, on a local capture (counts only). The build and the run were done in an offline Windows Sandbox:

Without this PR (#2902 alone), the three compute pipelines that #2902 translates are all refused at Dispatch with an input is in a placed buffer that does not alias title memory. One is dispatched about once per presented frame, 17,378 refusals in that run; the other two are dispatched once each.

With this PR:

  • The log shows compute dispatches: translated 17407, refused 0, no translation 0.
  • In this run only the per-frame pipeline was dispatched, and its named input is a 2,704-byte snapshot.
  • The two other pipelines were dispatched once each in the earlier run described below, each with a 16-byte snapshot, and were translated.
  • Over the run, 34,814 inputs came from snapshots, 69,628 KiB in total.
  • The run kept 29.9 fps over 17,810 presented frames.

One difference from this PR as written: the merge with #2849 conflicted in reserve_upload_ring. I resolved it locally by keeping #2849's recycled upload ring and passing the snapshot flag through to it. Snapshots therefore shared that ring instead of the separate 128 MiB pool here.

In an earlier run of the same merge, the title went past its first screen:

  • Cumulative snapshots reached about 1.6 GiB after about 5.5 minutes.
  • Command-list recording dominated the frame time.
  • The shared ring also ran out (snapshot ring reservation refused: no unused capacity), which is what the separate pool is meant to avoid.

That run used the shared ring above, so it says nothing direct about the separate pool.

AI-assisted.

@tedin7

tedin7 commented Nov 26, 2026

Copy link
Copy Markdown
Collaborator Author

@Leyukaka thank you for this run report, and for testing this PR together with #2902 on top of current main.

Two things we take from it:

This PR currently conflicts with main in reserve_upload_ring after #2849. We have not pushed a resolution yet, and your report will shape it. The direction we are looking at is to keep snapshots in their own pool, built on #2849's design (chunks reused once the GPU has finished with them), instead of either the old never-reused pool or the shared ring. If we push it, the new head and a fresh Windows Server 2025 receipt will be posted here.

AI-assisted; commands listed were executed locally.

@tedin7
tedin7 marked this pull request as draft November 26, 2026 19:49
…ts get their own recycled pool

Main's shared upload ring (reused once no recording can submit a chunk and every queue that used it has finished) is kept as it
is. The snapshots take a second pool built the same way (128 MiB, chunks numbered after the ring's in the recording mask and the
per-queue table) instead of the shared ring or a never-reused one, so a long run is not stopped by a full pool; the long-run
case dispatches 384 MiB of snapshots over 48 frames.
… alias title memory, and asserts the snapshot log line
@tedin7

tedin7 commented Nov 26, 2026

Copy link
Copy Markdown
Collaborator Author

Stage-2 gate on the redesigned head (own recycled snapshot pool on top of #2849):

Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit 73b2d0ff73921cce81188d3e11cda6064ac3de87:

  • Debug (--preset dev):
    • Build (cmake --build --preset dev --target d3d12_xs_device_obj d3d12_xs_shim startup_stream_consumer upload_reservation_check -- -j 2): 32.15s (configure 0.00s)
    • Test (ctest --preset dev -R '^(startup_compute_dispatch_input_|upload_reservation$)' --parallel 2 --no-tests=error --output-on-failure): 3/3 passed (3.51s: startup_compute_dispatch_input_warp 3.05s, upload_reservation 0.08s, startup_compute_dispatch_input_hardware 3.26s)
  • Release /O2 (--preset release):
    • Build (cmake --build --preset release --target d3d12_xs_device_obj d3d12_xs_shim startup_stream_consumer upload_reservation_check -- -j 2): 61.48s (configure 0.00s)
    • Test (ctest --preset release -R '^(startup_compute_dispatch_input_|upload_reservation$)' --parallel 2 --no-tests=error --output-on-failure): 3/3 passed (2.24s: startup_compute_dispatch_input_hardware 2.06s, upload_reservation 0.01s, startup_compute_dispatch_input_warp 2.09s)

Mutant check (snapshot pool never recycled, dev): startup_compute_dispatch_input_warp and startup_compute_dispatch_input_hardware fail with AssertionError: dispatch-input-snapshot-long: consumer exit 85, after x2w-draw snapshot pool reservation refused: no unused capacity. So the long case does exercise recycling of the snapshot pool.

AI-assisted; commands listed were executed locally.

@pigalot pigalot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to review 73b2d0ff over current main 454fc0ed, but the trial merge (git merge --no-ff --no-commit) conflicts in four files:

  • src/startup_stubs/upload_reservation.h and tests/upload_reservation_check.cpp: #2949 (98e4a2ee, opt-in release of upload ring chunks at a fenced submit) is the only change to these files since the PR's base 6ee878d8. It changes the same chunk-reuse code the snapshot pool is built on, so the snapshot chunks probably need to follow the new fenced-release rule as well, not only a textual merge.
  • src/startup_stubs/d3d12_xs_device.cpp: main has since taken #2833, #2919, #3028 and #2920 in this file.
  • tests/startup_stream_consumer.cpp: main has since taken #2882, #2874, #2902 and #2953.

I'll review it once it is updated with main.

This reply was AI-assisted.

@tedin7

tedin7 commented Nov 27, 2026

Copy link
Copy Markdown
Collaborator Author

Updated with main: pushed 0823554c1, a merge commit. All four conflicts are resolved. As you suspected, the snapshot chunks now follow the fenced-release rule from #2949: one 40-slot tracking mask (ring bits 0-31, snapshot bits 32-39), per-queue fence values, and a resubmit is refused if either pool recycled a referenced chunk. upload_reservation_check.cpp gains cases for bit 39, two-queue fencing, and a snapshot-only recycle.

Not yet built or run on Windows after the merge.

Commands run locally: python3 tests/startup_stream_interface_check.py, docs_links_check.py, bidi_controls_check.py, mingw -fsyntax-only on tests/upload_reservation_check.cpp, cmake -S . -B <tmp> -DDXC_EXECUTABLE=/bin/true, public_guard.py.

AI-assisted; commands listed were executed locally.

@tedin7

tedin7 commented Nov 27, 2026

Copy link
Copy Markdown
Collaborator Author

Verification: head 0823554c1 after the main merge and the latest fixes.

Environment: Windows Server 2025 (build 26100), MSVC 14.44, D3D12 WARP and the hardware adapter, dev and release legs in parallel.

Commands (the same selection in both legs):

x2w_pipe.py win2025 2862 --force --regex '^(upload_reservation|startup_compute_dispatch.*|startup_slot67_indirect.*|startup_upload.*|startup_stream_(check|draw.*)|startup_frame_copy.*)$'
  dev:     cmake --build --preset dev --target auto (upload_reservation_check, startup_stream_consumer, d3d12_xs_shim, upload tests)
           ctest --preset dev -R '^(upload_reservation|startup_compute_dispatch.*|startup_slot67_indirect.*|startup_upload.*|startup_stream_(check|draw.*)|startup_frame_copy.*)$' --no-tests=error --output-on-failure
  release: cmake --build --preset release --target auto (upload_reservation_check, startup_stream_consumer, d3d12_xs_shim, upload tests)
           ctest --preset release -R '^(upload_reservation|startup_compute_dispatch.*|startup_slot67_indirect.*|startup_upload.*|startup_stream_(check|draw.*)|startup_frame_copy.*)$' --no-tests=error --output-on-failure

Result: 31/31 passed in both legs (2 native compute cases skipped by capability); includes upload_reservation and startup_compute_dispatch_input_{warp,hardware} with the 48-frame snapshot recycle case.

AI-assisted; commands listed were executed locally.

@tedin7

tedin7 commented Nov 27, 2026

Copy link
Copy Markdown
Collaborator Author

Updated with main again: pushed e5af9a667 (merge commit, two conflicts in d3d12_xs_device.cpp and tests/startup_stream_consumer.cpp, both sides kept; the snapshot pool still follows the fenced-release rule).

Verification:

  • Win2025 (Build 26100, MSVC 14.44), exact head e5af9a6: x2w_pipe.py win2025 2862 --regex '^(upload_reservation.*|startup_stream_consumer.*|startup_stream_draw.*)$' --force
  • Debug: ctest --preset dev 3/3 passed. Release /O2: 3/3 passed (upload_reservation, startup_stream_draw_warp and the stream consumer test).
  • Linux: cmake -S . -B <tmp> -DDXC_EXECUTABLE=/bin/true, public_guard.py.

AI-assisted; commands listed were executed locally.

@pigalot pigalot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed e5af9a66 merged over current main fad97f47. The merge is clean and git diff --cached --check is clean. The conflicts from my comment on 73b2d0ff are resolved.

What I traced.

  • Snapshot pool numbering: the snapshot pool's chunks are numbered from snapshot_chunk_base (= max_upload_chunks, 32). UploadChunkMask is now 64-bit, static_asserted against the 40 bits. The per-queue last_use and ReleasedUploadChunks::generation arrays are sized to all 40 bits. hold, reuse_upload_chunk, discard_upload_chunks, release_upload_chunks_at_submit and resubmitted_upload_chunks all go through base + index / upload_chunk_at. So a recording's mask, the queue fence table and the fenced-release rule from #2949 cover both pools, and the two pools can't collide. I found no 32-bit mask left: the resubmit log line is now %llx.
  • Budgets and statistics: the snapshot pool has its own budget (128 MiB) and never takes the release-at-submit growth path. The ring statistics and upload_ring_refusals count only the ring.
  • The snapshot path: it runs only for compute inputs (allow_title_snapshot), with X2W_TRANSLATED_TITLE_INPUT_SNAPSHOT=1, for a placed buffer that doesn't alias title memory. It comes after the GPU-copy proof and needs a range of at most 16 MiB. It refuses an unreadable range before ring_copy.
  • Null descriptors: an all-zero descriptor binds 16 zero bytes from the snapshot pool. Compute inputs go through descriptor-table raw SRVs with NumElements = bytes / 4, so reads past those 16 bytes also return zero. An empty range with any non-zero word is still refused.

What I ran. I did a full build in dev and release, then ran

ctest --test-dir out/build/<preset> --no-tests=error -j 4 -E '(_hardware$|startup_audio_)' -R '^(upload_reservation.*|startup_compute_dispatch.*|startup_slot67_indirect.*|startup_upload.*|startup_stream_(check|draw.*|consumer.*)|startup_frame_copy.*|startup_null.*|startup_indirect_translated.*|startup_compute_request.*)$'
# with X2W_TEST_DEBUG_LAYER=1, one at a time
ctest --test-dir out/build/<preset> --no-tests=error -j 1 -R '^(startup_compute_dispatch|startup_slot67_indirect|startup_upload|startup_stream_draw|startup_frame_copy|startup_null|startup_indirect_translated|startup_compute_request).*_hardware$'

The results were the same in both presets:

  • Without _hardware: 32 of 33 pass.
  • _hardware: 23 of 24 pass.
  • The two failures are startup_compute_dispatch_native_warp and _hardware (the native route left ['revision.txt'] in the cache). They're a pre-existing regression on main from #2820, not this PR. main's own Windows run on 14d56502 fails the same way; I reported it on #2820. This PR doesn't touch that test or the cache writer.
  • This PR's own tests pass in both presets and both adapters: upload_reservation, startup_compute_dispatch_input_{warp,hardware} (including both dispatch-input-snapshot-long modes) and the stream and null checks.

Mutants. For each, I rebuilt dev and ran upload_reservation, startup_compute_dispatch_input_warp, startup_stream_draw_warp and startup_null_cause_labels:

Mutant Result
snapshot chunks never reused killed (dispatch-input-snapshot-long: consumer exit 85 after snapshot pool reservation refused)
snapshot chunks numbered from 0 like the ring (base = 0 in reserve_upload_ring) killed (startup_compute_dispatch_input_warp)
snapshot_chunk_base = 0 in the header killed (upload_reservation)
the snapshot ignores X2W_TRANSLATED_TITLE_INPUT_SNAPSHOT killed (dispatch-input-copied: a refused Dispatch wrote the output)
all-zero descriptor refused as before killed (dispatch-input-null)
any empty range treated as null killed (dispatch-input-empty: a refused Dispatch wrote the output)
snapshot skips the readable_window check survives

Restored and rebuilt afterwards; git diff --quiet is clean.

Non-blocking.

  1. The unreadable-range refusal is unpinned. No case points a snapshot input at unmapped title memory. Without the check, ring_copy's plain memcpy would fault in the stand-in. A case with a freed range would pin an input range in title memory is not readable.
  2. The null-descriptor change is on by default. It isn't behind X2W_TRANSLATED_TITLE_INPUT_SNAPSHOT: dispatch-input-null runs without the flag, and the PR description says so. But the docs/experiments.md paragraph describes only the opt-in snapshot. One sentence there, saying that an all-zero compute input descriptor now binds 16 zero bytes by default, would help the next reader.

Verdict: approve on e5af9a66.

Environment: NVIDIA GeForce RTX 5090, driver 32.0.16.1088; D3D12 WARP; Windows 11 25H2 build 26200.9974; MSVC 19.52.37029; Python 3.12.10; debug layer on for the hardware runs.
CI: Build and test on Windows, Assemble and translate gfx1013 fixtures and Run platform-independent Python checks on Linux pass on e5af9a66.

This reply was AI-assisted.

@R0Y00

R0Y00 commented Nov 28, 2026

Copy link
Copy Markdown
Owner

The refreshed #3224 startup census puts this refusal first for 35 of the 45 keys that published a manifest (10,555 dispatches in run 74). That makes it worth retesting #2862 against those same keys. The receipt here is for source-built fixtures only.

I trial-merged e5af9a6 onto main 2d6dad1 (tree ab42ca48cd3164819cb09e68c53a9157d984d716). The only conflict is in tests/startup_stream_consumer.cpp. I kept main's indirect-pixel group counts and copied-output case, and this PR's long-run allocation, snapshot input initialization, and copied-input cases.

cmake --build <build> --target d3d12_xs_shim startup_stream_consumer upload_reservation_check
ctest --test-dir <build> --no-tests=error --output-on-failure -j 1 -R "^(upload_reservation|startup_compute_dispatch_(input_|output_)?(warp|hardware)|startup_slot67_indirect_dispatch_(warp|hardware))$"

Debug 9/9, Release /O2 9/9, no skips. Inbox WARP 10.0.26100.9818 and RTX 4060 Laptop (32.0.16.1656), Windows 11 26200.9974, D3D12 debug layer enabled for the input fixture. With the flag off the copied input was refused and the sentinel stayed intact. With it on, all 320 words matched, the zero-input control changed the output, and both 48-frame snapshot-reuse tests passed. The existing copied-output refusal and indirect graphics controls passed.

Please refresh this PR with the latest main, keeping both fixture edits. Once the head is updated, the useful runtime follow-up is a matched flag-off/on run using run 74's cache and an output reference for any newly accepted key.

Conflict resolved by keeping both sides:
- tests/startup_stream_consumer.cpp: main's dispatch-output-* and
  dispatch-indirect-pixel-* modes, with this branch's snapshot modes,
  long-run buffer size and null-descriptor case.
@pigalot

pigalot commented Nov 28, 2026

Copy link
Copy Markdown
Collaborator

I merged current main (fdb6faaa) into this branch as 4d417f02, a plain merge commit with no rebase or force-push. It was approved at e5af9a66, but it conflicted with main in tests/startup_stream_consumer.cpp.

Conflict. Both sides added dispatch_slot67 modes, and I kept both:

  • groups takes main's expression, with the dispatch-indirect-pixel-* cases.
  • The VirtualAlloc size keeps this branch's long-run size, 0x28000 + long_records * 4.
  • The third placed buffer is created for dispatch-input-copied, dispatch-input-snapshot, the long runs, dispatch-root-srv-copied and main's new dispatch-output-copied. It keeps this branch's long-run size and the snapshot memcpy.
  • The long-run loop now follows main's new submit() helper. A non-pixel mode signals fence value 1 there, so the loop's frames still start at 2.

What I ran on 4d417f02:

  • Built dev and release.
  • ctest --no-tests=error -j 4 -E '(_hardware$|startup_audio_)' -R '^(upload_reservation.*|startup_compute_dispatch.*|startup_slot67_indirect.*|startup_upload.*|startup_stream_(check|draw.*|consumer.*)|startup_frame_copy.*|startup_null.*|startup_indirect_translated.*|startup_compute_request.*)$' in each preset: 34 of 34 pass. That includes upload_reservation, startup_compute_dispatch_input_warp with both dispatch-input-snapshot-long modes, and main's output and pixel modes.
  • The matching _hardware tests, -j 1 with X2W_TEST_DEBUG_LAYER=1: 25 of 25 pass in each preset.
  • The full non-hardware suite in dev (-j 6 -E '(_hardware$|startup_audio_)'): 1999 of 1999 pass.

A different reviewer will re-review the merged head.

Environment: NVIDIA GeForce RTX 5090, driver 32.0.16.1088; D3D12 WARP; Windows 11 25H2 build 26200.9974; MSVC 19.52.37029; Python 3.12.10.

This reply was AI-assisted.

@R0Y00 R0Y00 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reviewed 4d417f02 and tested its integration with main 0fe4cebc (tree 910ad5a6). The conflict resolution keeps the new indirect-pixel group counts and copied-output case, and the long-run snapshot allocation and input initialization.

Debug and Release /O2 each passed 9/9, zero skips, with the shim, stream consumer and reservation test rebuilt:

ctest --test-dir <build> --no-tests=error --output-on-failure -j 1 -R '^(upload_reservation|startup_compute_dispatch_(input_|output_)?(warp|hardware)|startup_slot67_indirect_dispatch_(warp|hardware))$'

Windows 11 26200.9974, WARP 10.0.26100.9818 and RTX 4060 Laptop driver 32.0.16.1656. The input fixture requests the D3D12 debug layer. The source-built cases cover copied and zero input, flag-off refusal, 48-frame snapshot-pool reuse, and the adjacent copied-output and indirect paths. The remaining checkout is a matched opt-in startup run for the keys reported in #3224.

@R0Y00
R0Y00 merged commit 5033d2d into R0Y00:main Nov 28, 2026
5 checks passed

@pigalot pigalot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-reviewed 4d417f02 (the merge of main fdb6faaa into e5af9a66) integrated over the current main 0637fced (tree cbd79d55). The trial merge is clean and git diff --cached --check origin/main is clean. The earlier approval on e5af9a66 was from another session on this account; I didn't push this merge.

What I checked in the merge.

  • tests/startup_stream_consumer.cpp, the only file resolved by hand:
    • The groups expression takes main's dispatch-indirect-pixel-* cases.
    • The VirtualAlloc keeps this branch's long-run size, 0x28000 + long_records * 4.
    • The third placed buffer is created for this branch's snapshot and long modes and for main's dispatch-output-copied.
    • The long-run loop starts after main's submit(pixel ? 2 : 1), which signals fence 1 for a non-pixel mode, so its frames still wait on 2 to 48.
  • Runtime: this branch's runtime changes don't collide with main's newer compute-dispatch code.
    • The new allow_title_snapshot parameter of indirect_table_buffer goes last, with a default, and only the table-input call in record_translated_dispatch passes it.
    • The other callers, and main's output-descriptor refusals, keep their behaviour.
    • IndirectBufferView::source is appended after upload, so the existing five-field initialisers still mean the same.

What I ran. I did a full build in dev and release, then ran:

ctest --test-dir out/build/<preset> --no-tests=error -j 4 -E '(_hardware$|startup_audio_)' -R '^(upload_reservation.*|startup_compute_dispatch.*|startup_slot67_indirect.*|startup_upload.*|startup_stream_(check|draw.*|consumer.*)|startup_frame_copy.*|startup_null.*|startup_indirect_translated.*|startup_compute_request.*)$'
# X2W_TEST_DEBUG_LAYER=1, under the GPU lock
ctest --test-dir out/build/<preset> --no-tests=error -j 1 -R '^(startup_compute_dispatch|startup_slot67_indirect|startup_upload|startup_stream_draw|startup_frame_copy|startup_null|startup_indirect_translated|startup_compute_request).*_hardware$'
  • Without _hardware: 33 of 34 pass in Debug and Release /O2. startup_compute_dispatch_native_warp reports a capability skip (77).
  • _hardware: 25 of 25 pass in Debug and Release on the RTX 5090, with the debug layer on.
  • The full non-hardware suite in dev (-j 8 -E '(_hardware$|startup_audio_)'): 2000 tests.
    • 1941 pass.
    • 57 report capability skips.
    • pixel_aot_warp and pixel_aot_core_vector_warp timed out at -j 8; alone at -j 1 they pass in 18 s and 10 s.
    • The revision.txt failures from #2820 no longer appear on this main.

Mutants in the resolved tests/startup_stream_consumer.cpp. Each was applied alone, then startup_stream_consumer was rebuilt in dev and startup_compute_dispatch_{input,output}_warp run. The source was restored and rebuilt afterwards, with git diff --quiet clean and both tests passing again.

Mutant Result
third buffer not placed for main's dispatch-output-copied killed: dispatch-output-copied gets another refusal reason
long-run modes don't write their input into title memory killed: dispatch-input-snapshot-long reads other words

The earlier mutant table on e5af9a66 covers the runtime change. The merge doesn't touch it.

Verdict: approve on 4d417f02.

Environment: NVIDIA GeForce RTX 5090 driver 32.0.16.1088 and WARP 10.0.26100.9818, Windows 11 25H2 build 26200.9974, MSVC 19.52.37029, Python 3.12.10; debug layer on for the hardware runs.
CI: Build and test on Windows, Assemble and translate gfx1013 fixtures and Run platform-independent Python checks on Linux pass on 4d417f02.

This reply was AI-assisted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Part of #870

5 participants