Skip to content

Tests: pin the pipeline stream subobject table to the PC headers - #2006

Open
brandostrong wants to merge 1 commit into
xcl-dev:mainfrom
brandostrong:subobject-table-test
Open

brandostrong wants to merge 1 commit into
xcl-dev:mainfrom
brandostrong:subobject-table-test

Conversation

@brandostrong

Copy link
Copy Markdown
Contributor

The stream reader's payload table (subobject_payload) had no test: a wrong size or alignment silently mis-parses every pipeline stream. This pins each known type to the windows crate's constant and the header struct's own size and alignment, and pins that 23 is unknown — the console's mesh numbering puts AS there and mesh at 24 (the PC's AS), the shape real.rs takes as a mesh-only pipeline. Part of the validation line claimed on #1269.

What is in it

  • crates/xcl/src/hle/d3d12x/null.rs (#[cfg(test)] only): the_stream_subobject_table_matches_the_pc_headers (28 pinned entries) and subobject_23_is_unknown — no runtime change

Tested

  • RTX 4090, i9-13900K, 32 GB RAM, Windows 11 26200, cargo 1.100.0, debug
  • cargo build --workspace + cargo test --workspace -- --test-threads=4 on 4ba1964: 988 passed, 0 failed, 45 ignored; 22 SKIPPED, all adapter limits of this wave32 card
  • the table test passes against windows 0.62.2 as pinned in Cargo.lock

Not tested

  • AMD / RADV; older Windows SDK header revisions (the test pins the crate the workspace builds with)
  • (the diff is #[cfg(test)]-only; a test-only label would waive the smoke check per CONTRIBUTING item 3)

AI use

  • Claude Code, Claude Opus 5.5: wrote the tests and this description, and ran the suite; the user reviewed the diff.

🤖 Generated with Claude Code

The stream reader's payload table (subobject_payload) had no test: a wrong
size or alignment silently mis-parses every pipeline stream. Pin each known
type to the windows crate's constant and the header struct's own size and
alignment, and pin that 23 is unknown - the console's mesh numbering puts AS
there and mesh at 24 (the PC's AS), the shape real.rs takes as a mesh-only
pipeline. Part of the validation line claimed on xcl-dev#1269.

Co-Authored-By: Claude Code <noreply@anthropic.com>
@futurepro62

futurepro62 commented Nov 25, 2026 •

Copy link
Copy Markdown

Full-suite run, since this PR has no test report yet. Tested exact head 4ba1964 (on its base 62265d3).

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 621.40, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, DXC + dxil.dll 1.9.2602.17 (Windows SDK 10.0.26100), debug, D3D12 debug layer installed.
  • cargo build --workspace, then XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::const_and_null_mask_operands_agree_with_hlsl_on_the_gpu --skip gpu::dxil::fuzz_tests: 978 passed, 0 failed, 43 ignored. SKIPPED (no wave64): a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu, a_per_lane_2d_or_3d_group_runs_on_the_gpu, coalesced_guarded_runs_agree_with_the_hlsl_path_on_the_gpu, cross_lane_reads_agree_with_the_hlsl_path_on_the_gpu, gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware, the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu.
  • The new tests ran and passed: the_stream_subobject_table_matches_the_pc_headers, subobject_23_is_unknown.
  • Same head on the AMD Radeon integrated GPU (iGPU) of the Ryzen 7 9800X3D (RDNA2, XCL_ADAPTER=radeon), cargo test --workspace -- --test-threads=4 --skip gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1: 987 passed, 0 failed, 45 ignored. SKIPPED: f16_programs_on_the_gpu (f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its gpu: direct RDNA2 -> DXIL backend (no HLSL / DXC), behind XCL_DIRECT_DXIL #1426 semantics differ from the console's))), f16_programs_on_the_gpu (f16 arithmetic, wave64, per-lane form: refused (unsupported V_MUL_F16 (its gpu: direct RDNA2 -> DXIL backend (no HLSL / DXC), behind XCL_DIRECT_DXIL #1426 semantics differ from the console's))), f16_programs_on_the_gpu (f16 packed, wave32, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its gpu: direct RDNA2 -> DXIL backend (no HLSL / DXC), behind XCL_DIRECT_DXIL #1426 semantics differ from the console's))), f16_programs_on_the_gpu (f16 packed, wave64, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its gpu: direct RDNA2 -> DXIL backend (no HLSL / DXC), behind XCL_DIRECT_DXIL #1426 semantics differ from the console's))), f32_programs_on_the_gpu (f32 conversions, wave32, per-lane form: refused (unsupported V_CVT_F16_F32 (its gpu: direct RDNA2 -> DXIL backend (no HLSL / DXC), behind XCL_DIRECT_DXIL #1426 semantics differ from the console's))), f32_programs_on_the_gpu (f32 conversions, wave64, per-lane form: refused (unsupported V_CVT_F16_F32 (its gpu: direct RDNA2 -> DXIL backend (no HLSL / DXC), behind XCL_DIRECT_DXIL #1426 semantics differ from the console's))), heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows).
  • --skip leaves out tests that fail on main 7994cd1 too, not because of this PR. On NVIDIA: heap_window_out_of_memory_falls_back_to_the_switch_form (Tests: heap_window_out_of_memory_falls_back_to_the_switch_form fails under XCL_REQUIRE_GPU=mesh (opt-in skip counted as missing coverage) #1651), the four gpu::recomp::lower_dxil::tests::*_programs_on_the_gpu tests and const_and_null_mask_operands_agree_with_hlsl_on_the_gpu (follow-up on #1651) fail because runner::skip_test turns their skips into failures under XCL_REQUIRE_GPU=mesh, and gpu::dxil::fuzz_tests seeds 70, 545, 1019 and 1507 fail CreateComputePipelineState with E_OUTOFMEMORY on this card (drivers 616.64 and 621.40). On AMD: fuzz_validate_and_gpu_1 fails on seed 540 (res[833] 0x7 vs CPU 0x6). The AMD run does not set XCL_REQUIRE_GPU.

Not tested

  • a release build, a game (test run only).

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.

@raylitebull

Copy link
Copy Markdown
Member

Code review on 4ba1964:

  • the_stream_subobject_table_matches_the_pc_headers and subobject_23_is_unknown in crates/xcl/src/hle/d3d12x/null.rs cleanly pin subobject_payload sizes and alignments directly against the windows crate D3D12 definitions, and Build and test (Windows, no GPU) is green.

Remaining before merge:

  1. Fix the failing PR description check.
  2. An AMD verification pass on 4ba1964.

@JJAutoCompare

Copy link
Copy Markdown

Empirical verification — PR #2006 (4ba19645164a5cc2493103e45a9f5efa18d81be4)

Tested clean detached PR head 4ba19645164a5cc2493103e45a9f5efa18d81be4 on STOR-WINLAB.

Environment

  • Windows 11 Enterprise Evaluation build 26200.9974, AMD Ryzen 7 3800X, Intel Arc A770 16 GiB (driver 32.0.101.9175, wave range 8–32, DoublePrecisionFloatShaderOps=0, d3d12SDKLayers.dll absent).
  • rustc 1.100.0 (0ef1bc386 2026-11-09) (CARGO_INCREMENTAL=0, debug info 0). Standalone DXC/DXIL 1.9.2609.5 was on PATH; the test title logged Windows SDK DXC 1.9.2602.17 (21d28f72).

Tested

  • cargo build --workspace and cargo test --workspace --no-run exited 0 outside the GPU lock.
  • Focused PR tests:
    • cargo test -p xcl --lib the_stream_subobject_table_matches_the_pc_headers -- --nocapture: 1 passed, 0 failed, 0 ignored.
    • cargo test -p xcl --lib subobject_23_is_unknown -- --nocapture: 1 passed, 0 failed, 0 ignored.
    • Both also passed in the full workspace suite.
  • cargo test --workspace --no-fail-fast -- --test-threads=4 (under Invoke-ArcTest.ps1, exited 101): 963 passed, 25 failed, 45 ignored across 20 test binaries, with 22 visible SKIPPED lines (excluded from coverage; libtest pass counts include early returns).
    • Failures (25): 24 in xcl --lib shader/DXIL tests (20 CreateComputePipelineState 0x80070057 + 4 shader output assertions) and 1 in e2e (test_title_runs_and_game_folder_is_untouched, RSSetDepthBiasX Split wave64: masks read only lane by lane stay in their half #94). All unrelated to this test-only PR (no parent baseline run).
    • Skips (22 visible lines): 17 wave64 unavailable, 3 refused wave32 f16 per-lane lowerings, 1 driver-cache disable unavailable, 1 heap-window fallback unavailable; debug-layer early return captured outside the 22 lines.

Not tested

  • Retail Xbox title runs, D3D12 debug-layer validation, non-Arc adapters, and forcing standalone DXC via XCL_DXC_DIR.

AI use

  • T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high) ran the build and verification. Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against pr2006-suite.log and published this report.

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.

4 participants