Skip to content

tests: cover slot 35 table selection and invalidation at Dispatch - #1

Open
chasegrindy wants to merge 1 commit into
NiiRoZz:startup/compute-dispatch-translatedfrom
chasegrindy:test/slot35-dispatch-controls
Open

chasegrindy wants to merge 1 commit into
NiiRoZz:startup/compute-dispatch-translatedfrom
chasegrindy:test/slot35-dispatch-controls

Conversation

@chasegrindy

Copy link
Copy Markdown

Test-only follow-up to R0Y00/Xbox2Windows#2470, targeting NiiRoZz:startup/compute-dispatch-translated. The recorder fix (R0Y00#2636) is already in this base.

The fixture checks the fenced readback from descriptor index 2 with a swapped decoy at index 0. It also switches the compute root and back, then separately switches ordinary heaps. Both cases restore the constants without rebinding slot 35 and require the exact missing-table refusal and an untouched 320-word output.

Release on 206749e454407bd271019d667cf46507894617a8: 9/9 CTests, no skips, including RX 7900 XTX and WARP.

cmake --build <build> --config Release --target startup_stream_consumer offscreen_check startup_compute_root startup_logical_view_table_check
$env:XBOX2WINDOWS_ADAPTER = 'AMD Radeon RX 7900 XTX'
ctest --test-dir <build> -C Release --no-tests=error -j 1 -R '^startup_(compute_dispatch_(warp|hardware)|compute_root|logical_view_table|compute_translate_(requests|e2e_(warp|hardware)|e2e_wrong_group_(warp|hardware)))$' -V

AI-assisted (GPT). Tests ran locally on synthetic inputs.

@MasterDomino

Copy link
Copy Markdown

Verified at 580cda56. It's one test-only commit directly on R0Y00#2470's head 206749e4, merges onto it without conflict, and keeps @chasegrindy's authorship.

Environment: Windows 11 build 26300, dev preset; AMD Radeon RX 9070 XT (driver 32.0.32029.2010) and WARP 10.0.26100.9818. The debug layer was enabled, with no error or corruption messages in the new cases.

  • ctest --preset dev --no-tests=error -j1 -R '^startup_compute_dispatch_(warp|hardware)$' -V: 2/2 passed, no skips. On both adapters:
    • dispatch-table-root-changed and dispatch-table-heap-changed give the exact "a table descriptor is not bound" refusal, with all 320 sentinel words unchanged;
    • dispatch-table-offset (index 2, with the swapped pair at index 0) matches the CPU reference in all 320 words.
  • Neighbour filter (startup_list_dispatch|startup_compute|startup_root_constant|startup_gfx2hlsl_compute|startup_indirect|era_heap|desktop_root_signature|startup_stream|docs_links|startup_draw|startup_logical): 275 passed, 0 failed. There were two capability skips, startup_logical_view_(warp|hardware), because the adapter accepts the full heap directly.
  • Checks: git diff --check, tests/docs_links_check.py and tests/bidi_controls_check.py are clean.

Mutants: each is a one-line change, rebuilt and run on both adapters. Each one failed both tests, and the restored build passed again.

mutant caught by
slot 35 table resolves to the heap start (offset dropped) dispatch-table-offset: 288 words differ
set_signature doesn't clear on a different root dispatch-table-root-changed: 288 words written
ComputeTables::clear() does nothing dispatch-table-root-changed: 288 words written
set_view_heap never clears dispatch-table-heap-changed: 288 words written
slot 32 set_view_heap call removed dispatch-table-heap-changed: 288 words written
compute heap selection back to the oversized-only rule dispatch-table-heap-changed: 288 words written

The first four survived every fixture before this. That covers @R0Y00's slot 35 requirement for R0Y00#2470, so this is ready for @NiiRoZz to merge into startup/compute-dispatch-translated.

Minor, not blocking: the fixture docstring still says "Four runs share one cache", which was already stale before this PR.

AI-assisted; commands listed were executed locally.

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