Skip to content

Tests: cover BC1 writes to scattered physical pages - #760

Open
gabrielsteglich wants to merge 1 commit into
xcl-dev:mainfrom
gabrielsteglich:test/bc1-physical-page-destinations
Open

gabrielsteglich wants to merge 1 commit into
xcl-dev:mainfrom
gabrielsteglich:test/bc1-physical-page-destinations

Conversation

@gabrielsteglich

@gabrielsteglich gabrielsteglich commented Nov 24, 2026 •

Copy link
Copy Markdown

Adds a synthetic regression test for BCPack BC1 requests that write to scattered physical pages. This revision is based directly on main at 930e8b4, which includes the decoder from #905 (67a3735).

What is in it

  • In crates/xcl/src/hle/dstorage.rs, reuse the synthetic bc1-16-1.bin fixture and compare the queue's 128-byte output with a linear decode. The successful request crosses a 64 KiB page boundary and resolves its second page after enqueue. The truncated request returns E_DECOMPRESSION, with the failure destination and guard bytes intact.
  • Run the two BC1 queue tests under the same test lock so the existing exact counter assertions stay deterministic.

Tested

  • Windows 11 Pro build 26300, Core i9-13900K, GeForce RTX 3090 (621.01), Rust 1.97.0, and DXC 1.9.2602.17, Release.
  • cargo build --release --locked --workspace and cargo test --release --locked --workspace --no-fail-fast -- --test-threads=4 --show-output completed successfully. On 9ee0cd3, Cargo reported 752 passed, 0 failed, and 41 ignored. Both BC1 queue tests passed, as did the GPU compute readback.
  • Four tests reported SKIPPED. Two require native wave64 and two require the D3D12 debug layer. Optional sample-data tests were disabled.

Regression run

scripts/smoke.ps1 ran the same retail title offline for 60 seconds per build with fresh title profiles and separate XCL DXIL caches. These runs check startup. The synthetic test exercises physical-page BC1 writes.

main

xcl-smoke v1
commit: 930e8b49c1c2ec683d22c724a398b39111cd0e56
gpu: NVIDIA GeForce RTX 3090
title: retail
seconds: 60
exit: 0x0
frames shown: 1181 (PresentX 1181)
presents per 2 s (last 3): 36 38 36
device removals: 0
crashes: 0
peak commit: 11316 MB

PR head

xcl-smoke v1
commit: 9ee0cd33e97a9ca6e5c96df9da246cbd916453c1
gpu: NVIDIA GeForce RTX 3090
title: retail
seconds: 60
exit: 0x0
frames shown: 1160 (PresentX 1160)
presents per 2 s (last 3): 36 15 32
device removals: 0
crashes: 0
peak commit: 11490 MB

Not tested

  • In-game BC1 texture fidelity, gameplay, other GPU vendors, and optional sample-data tests.

AI use

  • OpenAI's coding agent with GPT-6 assisted with adapting and reviewing the test and running validation. The commands ran locally on the hardware listed above.

@MesshM

MesshM commented Nov 24, 2026

Copy link
Copy Markdown

Test run of cb1de0f460a4bfe04f45b46d73e669dfa62eb173 on AMD RDNA4. I merged it onto current main 6025201 locally (clean merge), so the tree tested includes the stack under it (#273, #208).

Tested

  • AMD Radeon RX 9060 XT 16 GB (RDNA4), driver 32.0.32029.2010; Ryzen 7 5700X, 64 GB RAM, Windows 11 Pro build 26200, Rust 1.100.0 stable-x86_64-pc-windows-msvc, debug
  • cargo build --workspace + cargo test --workspace -- --test-threads=4 on the merge: 713 passed, 0 failed, 41 ignored, exit code 0; xcl lib tests 672 passed, 0 failed, 21 ignored
  • 0 SKIPPED; bcpack_bc1_requests_into_scattered_physical_pages passes.

Review: Test-only on top of #273; I reviewed the top commit only.

Not tested: no retail title or regression run (I have no unpacked game), no XCL_SAMPLE_* tests, release build; the PR's head on its old base was not run, only its merge onto main.

Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code.

@upipibi upipibi mentioned this pull request Nov 24, 2026
@ivall

ivall commented Nov 24, 2026

Copy link
Copy Markdown
Collaborator

#273 is superseded by #905 (merged in 67a3735), so this branch's base and fixture (bc1-16-1.bc1) are gone. The physical-page destination path with a BCPack request is still not covered by a test: if you want to keep this, rebase it onto main – #208's lane fixtures are in tests/data/bcpack, or a BC1 stream that the decoder takes can be built from them – and it can go in as a test-only PR.

Use a synthetic lane fixture from main and compare queue output across noncontiguous pages with a linear decode. Exercise a late page entry and verify that truncated input leaves the failure destination intact. Serialize the BC1 queue tests so the existing exact counter checks still hold.

Assisted-by: OpenAI coding agent (GPT-6)
@gabrielsteglich
gabrielsteglich force-pushed the test/bc1-physical-page-destinations branch from cb1de0f to 9ee0cd3 Compare November 24, 2026 15:20
@gabrielsteglich

Copy link
Copy Markdown
Author

Thanks for the guidance, @ivall. I rebased the physical-page BC1 test onto main with the decoder from #905. The updated head is 9ee0cd3. The workspace suite reported 752 passed and 0 failed on the RTX 3090 test machine, and both 60-second smoke runs exited cleanly. I updated the PR description with the results. The description check passed, and the Windows CI run is awaiting maintainer approval.

@JJAutoCompare

Copy link
Copy Markdown

Empirical test report (9ee0cd3)

Commit 9ee0cd33e97a9ca6e5c96df9da246cbd916453c1 from PR #760.

Hardware / environment

  • Windows build 26200, x64, AMD CPU (family 23, model 113, stepping 0). The focused run used XCL_ADAPTER=NONE_CPU_ONLY and RUST_TEST_NOCAPTURE=1 outside the Arc harness.
  • Rust 1.100.0 (0ef1bc386 2026-11-09), DXC 1.9.2609.5 (01b62ad47), unoptimized test profile with debug info and incremental compilation disabled.

Commands and results

  • cargo test --workspace --no-run compiled the workspace test binaries and exited 0.
  • cargo test -p xcl --lib hle::dstorage::tests::bcpack_bc1_requests_ exited 0 with 2 passed, 0 failed, 0 ignored, and 0 skipped. The filter selected both BC1 queue tests affected by the PR. Rust's test harness filtered out 727 other tests.

Observed behavior

  • The scattered-page test completed both requests. The valid synthetic BC1 stream returned S_OK and matched the linear decode across the two noncontiguous destination pages, including the page-table entry supplied after enqueue and before submit.
  • The truncated stream returned E_DECOMPRESSION. The five-page comparison verified that all bytes outside the valid request's two write ranges retained their 0xCD sentinel, including the truncated request's destinations.
  • The virtual-destination queue test passed its status, byte-range, and request-counter assertions with XCL_SAMPLE_BCPACK unset.

Not tested

  • The full GPU workspace suite and game smoke runs were omitted. The focused run used synthetic inputs and did not exercise retail BCPack samples.

AI use

Verified with T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high). Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against pr760-focused.log and published.

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