Skip to content

tests: drive native slot 14 Dispatch through the stand-in - #1

Merged
tedin7 merged 1 commit into
tedin7:x2w-frontier-slot14-dispatchfrom
MasterDomino:test/1974-native-dispatch-fixture
Nov 26, 2026
Merged

tedin7 merged 1 commit into
tedin7:x2w-frontier-slot14-dispatchfrom
MasterDomino:test/1974-native-dispatch-fixture

Conversation

@MasterDomino

Copy link
Copy Markdown

Follow-up for R0Y00#1974, offered into its branch. This adds the device-level fixture for command-list slot 14 (Dispatch) that I asked for in my review there. R0Y00#1974's production code is unchanged. @tedin7, take it, adapt it or drop it as you prefer: R0Y00#1974 stays your PR.

What it does

tests/startup_list_dispatch_native.cpp creates a guest device on a desktop adapter through D3D12XboxCreateDevice. It drives the stand-in's command-list slots 86 (compute pipeline stream), 25, 33, 43, 148, 14, 9 and 139, with the D3D12 debug layer when it's installed.

  • Refused cases: each must write exactly one x2w-render Dispatch(x, y, z) refused: <reason> line, with the expected reason, to X2W_TRAP_LOG. The cases are:
    • a root SRV that was never set;
    • a rejected (foreign) or misaligned slot 43 replacement after a valid one;
    • a root changed and changed back without a new slot 43;
    • a pipeline built against another root;
    • a root with a descriptor table;
    • a root with a static sampler;
    • an unset root SRV with zero groups;
    • 65536 groups;
    • a Dispatch on the closed list;
    • a Dispatch after Reset with no new bindings.
  • Forwarded cases must write no line. Around each slot 14 call the fixture records a pipeline-statistics query on the underlying desktop list: CSInvocations must be 4 per group when forwarded and 0 when refused. The fully bound call is recorded alone and counted first, so a slot 14 that records nothing fails on its count.
  • Execution: all three recordings are executed to a fence, and the debug layer must report no error.
  • Control: startup_list_dispatch_native_skip_srv_warp_control drops slot 43 from the first forwarded case and must report it as refused.

The root-SRV roots have no UAV, so the shader writes nothing. The fixture shows that the desktop Dispatch is recorded and runs, not what a shader reads through the SRV.

The "Startup list Dispatch" section in the docs gets the reproduction command. It also gets a corrected sentence on which compute root-argument slots have handlers: slot 35 records tables without setting them, and 37, 39, 41 and 45 have none.

Negative controls (one-line changes to d3d12_xs_device.cpp, WARP and hardware)

change result
refusal branch never taken fails: root SRV never set: expected exactly ... refused: a compute root SRV is not bound, got 0 Dispatch line(s)
slot 33 doesn't clear compute_srv_bound fails: root changed and changed back: ... got 0 Dispatch line(s)
rejected slot 43 doesn't clear its bit fails: rejected replacement after a valid root SRV: ... got 0 Dispatch line(s)
compute_root_has_arguments = false fails: the table root logs a compute root SRV is not bound instead of compute root arguments are not forwarded
root_matches_pipeline = true fails: no refusal line, and debug-layer message 953 (root signature doesn't match the PSO)
slot 14 registration removed fails: bound: CSInvocations 0, expected 24

These are the six mutants that passed every existing test in my R0Y00#1974 review.

Test

Environment: Windows 11 build 26300; WARP 10.0.26100.9818; AMD Radeon RX 9070 XT, driver 32.0.32029.2010; debug layer enabled.

cmake --build --preset dev --target startup_list_dispatch_check startup_list_dispatch_native
ctest --preset dev --no-tests=error -R "^startup_list_dispatch" -V
  • New tests: startup_list_dispatch_native_warp, _hardware and _skip_srv_warp_control pass 3/3, and also over 20 repeats in a row. With the existing header tests that's 9/9.
  • Neighbours: ctest --preset dev --no-tests=error -j 4 -R '^(startup_list_dispatch.*|startup_indirect_.*|startup_compute_root|startup_stubs|startup_command_list_slot_names|startup_list_resubmit.*|desktop_root_signature|cpu_shim_compute.*|d3d12x_compute_list.*)$' gives 95/95, no skips.
  • Checks: git diff --check, tests/docs_links_check.py and tests/bidi_controls_check.py are clean.

🤖 Generated with Claude Code

startup_list_dispatch_native creates a guest device on a desktop
adapter (WARP or hardware, debug layer on when installed) and drives
command-list slots 86, 25, 33, 43, 148, 14, 9 and 139 of the stand-in.
Each refused case must write exactly one
"x2w-render Dispatch(x, y, z) refused: <reason>" line, with the
expected reason, to X2W_TRAP_LOG:

- a root SRV never set;
- a rejected (foreign address) or misaligned slot 43 replacement after
  a valid one;
- a root changed and changed back without a new slot 43;
- a pipeline built against another root;
- a root with a descriptor table, and a root with a static sampler;
- an unset root SRV with zero groups;
- 65536 groups on X;
- a Dispatch on the closed list;
- a Dispatch after Reset without new bindings.

A forwarded case must write no line. The fixture wraps a
pipeline-statistics query around every slot 14 call on an open list,
recorded on the underlying desktop list: CSInvocations must be 4 per
group when forwarded and 0 when refused. The fully bound call is
recorded alone and read back first, so a slot 14 that records nothing
fails on its count. All three recordings are executed to a fence and
the debug layer must report no error.

The skip_srv control drops slot 43 from the first forwarded case and
must report it as refused. Each of these one-line changes to
d3d12_xs_device.cpp makes the WARP and hardware tests fail: the
refusal branch never taken, compute_srv_bound not cleared by slot 33,
the bit not cleared by a rejected slot 43, compute_root_has_arguments
forced false, root_matches_pipeline forced true, and the slot 14
registration removed.

The docs section now names the device fixture and corrects the
sentence on which compute root-argument slots have handlers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 25, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 0215124b-db81-46ab-9149-a2b028da7d93

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@tedin7
tedin7 merged commit 5fc59d8 into tedin7:x2w-frontier-slot14-dispatch Nov 26, 2026
tedin7 pushed a commit that referenced this pull request Nov 26, 2026
…0Y00#2821)

The forced-wave64 column said only "Passed, 64 lanes"; the NVIDIA rows that
report a range carry it, and the AMD rows do not. This adds the measured
32-64 range from a source build at 49f53ae and one evidence link to it,
keeping the existing links together on the same row (same adapter, driver
already cited once).

Refs #1

Co-authored-by: panam <panam@local>
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.

2 participants