Skip to content

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

Merged
ivall merged 1 commit into
xcl-dev:mainfrom
brandostrong:subobject-table-test
Nov 25, 2026
Merged

ivall merged 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

@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.

@Toons29

Toons29 commented Nov 25, 2026 •

Copy link
Copy Markdown

Regression run of 17d22c18 on the retail title, for this PR's Regression run section. Both blocks are from scripts/smoke.ps1 as printed, not edited: main on cbc296ab, this PR on its head commit with no uncommitted changes, same title and time.

xcl-smoke v1
commit: cbc296ab65a2661a61e3e2da109134bcd5319f60
gpu: AMD Radeon RX 9070
title: 34df7c50
seconds: 60
exit: 0x0
frames shown: 1623 (PresentX 1623)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14648 MB
xcl-smoke v1
commit: 17d22c1817ff3a7f5f546e15696d9834e04b1e37
gpu: AMD Radeon RX 9070
title: 34df7c50
seconds: 60
exit: 0x0
frames shown: 1630 (PresentX 1630)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14624 MB

Against the limits in CONTRIBUTING.md: 100 % of main's frames, 100 % of its peak commit, no crash, no device removal.

AMD Radeon RX 9070 (RDNA4, driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 build 26300, Rust 1.100.0, cargo build --release -p xcl, 60 s, XCL_NETWORK=0. This is a regression check only: it does not show whether the run reaches the code this PR changes.

AI use: Claude Code (Claude Opus 5.5) built both trees and ran scripts/smoke.ps1; I checked the blocks before posting.

@DavidM1911

Copy link
Copy Markdown
Contributor

Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

Thanks!

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>
@throny throny added the goal:world-load Bears on the retail title getting past world loading label Nov 25, 2026
@throny

throny commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator

Two contributors checked independently and found that #2374 solves the same problem in a different way: #1607, group D106. You may want to compare them with the other author and agree on one, or say in the PR why both are needed.

This is a hint from the community triage in #1607, not a maintainer decision.

AI use: Claude Code (Claude Opus 5.5), posted by a script from the #1607 table.

@ivall ivall added the test-only A maintainer reviewed the diff: tests only, no smoke run needed for this revision (CONTRIBUTING.md) label Nov 25, 2026
@ivall
ivall merged commit 44eb541 into xcl-dev:main Nov 25, 2026
3 of 4 checks passed
@ivall

ivall commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator

Merging: pins the stream subobject sizes to the PC headers.

Tested on AMD RDNA4 (native wave64), Windows, DXC 1.8.2502.11, debug, main 2898511 with 27 test PRs merged locally, this one included: the whole suite 3 times, 1419 passed, 2 failed, 46 ignored each time (fuzz_validate_and_gpu_1 and _3, which fail the same way on main); hle::d3d12x on 16 threads 5 times, no failure.

AI use: Claude Code (Claude Opus 5.5) reviewed and tested this and wrote the comment on the maintainer's behalf.

@DavidM1911

Copy link
Copy Markdown
Contributor

Re-verification on RTX 3060 Ti (Windows 11), new head merged with current main:

Thanks!

— Devin

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

Labels

goal:world-load Bears on the retail title getting past world loading test-only A maintainer reviewed the diff: tests only, no smoke run needed for this revision (CONTRIBUTING.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants