Skip to content

Tests: verify heap-window GPU equivalence and graphics validation - #2408

Open
emusynths wants to merge 1 commit into
xcl-dev:mainfrom
emusynths:heap_windows_correctness_tests
Open

emusynths wants to merge 1 commit into
xcl-dev:mainfrom
emusynths:heap_windows_correctness_tests

Conversation

@emusynths

Copy link
Copy Markdown

Adds GPU output-equivalence and multi-stage validation tests for XCL_HEAP_WINDOWS=1 across both the HLSL and direct DXIL paths. Part of #2088 (Workstream 5 correctness gates); test-only and orthogonal to #1695, #1743, and #2383.

What is in it

  • crates/xcl/src/gpu/recomp/heap_window_tests.rs:
    • gpu_heap_windows_divergent_lanes_match_switch_form: executes divergent per-lane window indexing (NonUniformResourceIndex: window 0, window 1, and out-of-UMA aliasing w0 in the same wave) for loads, stores, and 32-bit atomics, verifying bit-for-bit agreement across HLSL switch, HLSL heap, direct DXIL switch, and direct DXIL heap.
    • gpu_heap_windows_64bit_atomics_match_switch_form: executes GLOBAL_ATOMIC_ADD_X2 (carrying across the 32-bit boundary) and GLOBAL_ATOMIC_CMPSWAP_X2 in window 1 plus out-of-UMA 64-bit atomics across all four variants (skips via skip_test if AtomicInt64OnDescriptorHeapResourceSupported is unsupported).
    • heap_windows_graphics_stages_validate: validates 4- and 16-window HEAP_WINDOWS shaders across VS, PS, and MS in both direct DXIL and HLSL+DXC (GS is covered separately in Recompiler: load direct DXIL geometry ES inputs from the heap window #2383).

Tested

  • Hardware: NVIDIA GeForce RTX 5090 32 GB (driver 621.01, wave32-only), Ryzen 9 5950X, 64 GB RAM, Windows x64, rustc 1.100.0 (0ef1bc386 2026-11-09), DXC 1.9.2609.5, debug.
  • cargo test -p xcl --lib heap_window_tests: 4 passed, 0 failed, 0 ignored (default and with XCL_HEAP_WINDOWS=1).
  • cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4: 1287 passed, 5 failed, 46 ignored.
    • The 5 failures are pre-existing on main 50a9fde on this adapter/DXC: gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_0..3 (CreateComputePipelineState: 0x8007000E) and gpu::recomp::lower_dxil::tests::a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier.
    • SKIPPED: wave64-only GPU tests (no wave64 on RTX 5090), per-lane f16 refused tests, heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows in default run), pso_measurement_compiles_an_exact_synthetic_record (Developer Mode off).

Not tested

  • AMD / Intel GPUs and native wave64 hardware.
  • Retail title runtime run (test-only diff; no runtime code changed).

AI use

  • Antigravity with Gemini 4 Neon: wrote the tests and PR description, and ran the test suite. I reviewed the diff and results.

…l-dev#2088)

Add correctness-gate tests for XCL_HEAP_WINDOWS=1 in heap_window_tests.rs:
- divergent per-lane window indexing (NonUniformResourceIndex: w0, w1, OOB)
  comparing HLSL switch/heap and direct DXIL switch/heap bit-for-bit on GPU,
- 64-bit atomics (GLOBAL_ATOMIC_ADD_X2 carry, GLOBAL_ATOMIC_CMPSWAP_X2, OOB),
- 4- and 16-window HEAP_WINDOWS validation across VS, PS, and MS stages.

Assisted-by: Antigravity (Gemini 4 Neon)
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.

1 participant