Tests: cover BC1 writes to scattered physical pages #760

Open
github-bot wants to merge 1 commit from github-bot/gh-760 into main AGit
Owner

@⁠gabrielsteglich on GitHub · 2026-11-24 04:47 UTC · original
gabrielsteglich:test/bc1-physical-page-destinations → main · +89 −0 · 1 files · 1 commits · open

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.
**@⁠gabrielsteglich** on GitHub · 2026-11-24 04:47 UTC · [original](https://github.com/xcl-dev/xcl/pull/760) `gabrielsteglich:test/bc1-physical-page-destinations` → `main` · +89 −0 · 1 files · 1 commits · open 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.
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)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:31:34 +00:00
Author
Owner

@⁠MesshM on GitHub · 2026-11-24 05:15 UTC · original

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.

**@⁠MesshM** on GitHub · 2026-11-24 05:15 UTC · [original](https://github.com/xcl-dev/xcl/pull/760#issuecomment-7122783521) 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.
Author
Owner

@⁠ivall on GitHub · 2026-11-24 10:39 UTC · original

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

**@⁠ivall** on GitHub · 2026-11-24 10:39 UTC · [original](https://github.com/xcl-dev/xcl/pull/760#issuecomment-7129080164) #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.
Author
Owner

@⁠gabrielsteglich on GitHub · 2026-11-24 16:11 UTC · original

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.

**@⁠gabrielsteglich** on GitHub · 2026-11-24 16:11 UTC · [original](https://github.com/xcl-dev/xcl/pull/760#issuecomment-7137263328) 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.
Author
Owner

@⁠JJAutoCompare on GitHub · 2026-11-25 06:18 UTC · original

Empirical test report (9ee0cd33)

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.

**@⁠JJAutoCompare** on GitHub · 2026-11-25 06:18 UTC · [original](https://github.com/xcl-dev/xcl/pull/760#issuecomment-7154653475) ### Empirical test report (9ee0cd33) 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.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-25 11:16 UTC · original

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

  • cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)

Thanks!

**@⁠DavidM1911** on GitHub · 2026-11-25 11:16 UTC · [original](https://github.com/xcl-dev/xcl/pull/760#issuecomment-7160822789) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.) Thanks!
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/760/head:github-bot/gh-760'
git switch 'github-bot/gh-760'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-760'
git switch 'github-bot/gh-760'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-760'
git switch 'github-bot/gh-760'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-760'
git switch 'main'
git merge --squash 'github-bot/gh-760'
git switch 'main'
git merge --ff-only 'github-bot/gh-760'
git switch 'main'
git merge 'github-bot/gh-760'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.