test(victory-gpu): verify the fallback for an R8 view of A8 #330

Merged
mauroalvare merged 4 commits from upstream-pr/330 into main 2026-11-27 19:38:44 +00:00
mauroalvare commented 2026-11-26 03:37:42 +00:00 (Migrated from github.com)

Imported from LooperSalty/AnyXboxX. Originally posted by mauroalvare on 2026-11-26T03:37:42Z.


Vice-Tay

Vice-Tay already keeps A8_UNORM outside the R8_TYPELESS family. The GPU regression checks the descriptor path end to end. A compatible alpha view returned the stored alpha value and the rejected R8 view returned zero on the RTX 5070 Ti.

DXGI format support

Earlier Neptune description

Change

Neptune's format-family table treated A8_UNORM as part of R8_TYPELESS. The shader-view materializer matched an R8_UNORM request to an A8_UNORM texture and substituted the alpha format. A shader then read alpha from the slot that should have received the incompatible-view fallback.

Keep A8_UNORM in its own family so the existing D3D12 view check rejects that pairing and emits a null SRV. This is in the resource and descriptor path of the Neptune runtime built by tools/lancer_victory.ps1. Microsoft lists casting within the bit layout as unavailable for A8_UNORM, and specifies zero reads from a null SRV. Format support at feature level 12.0 · CreateShaderResourceView

The change adapts AnoHunted's format-family fix from VIctory. The commit trailer and THIRD_PARTY.md record the source and licence. VIctory source commit

Verification

Base c4c93bdc413191a9dc909998d2d53080a3f0c880 and fix 9d50884cf96bc5fe7e3ec6f0743f1897a57b996c. For the baseline, add the GPU test file, its module declaration, and the family-boundary unit test from this PR. Run from third_party/victory, with VICTORY_D3D12_WARP unset for NVIDIA or set to 1 for WARP.

cargo test --locked --offline -p victory-gpu --lib --features diagnostics descriptor::host::alpha_view_tests::red_view_on_alpha_texture_reads_zero -- --exact --nocapture --test-threads=1
Adapter Base cross-view read Fixed cross-view read Compatible A8 control
GeForce RTX 5070 Ti, driver 621.40 0.2509804, accepted as format 65 0, rejected and null 0.2509804 on both revisions
WARP, Microsoft Basic Render Driver 0.2509804, accepted as format 65 0, rejected and null 0.2509804 on both revisions

The baseline readback assertion failed on each adapter. The fix reported 1 passed; 0 failed; 0 ignored with actual GPU readback on each.

  • cargo test --locked --offline -p victory-gpu --lib --features diagnostics resource::tests::alpha_format_stands_outside_the_red_typeless_family -- --exact --test-threads=1 failed on the base with family 60 for A8_UNORM. It passed with the fix.
  • cargo test --locked --offline -p victory-gpu --lib --features diagnostics -- --test-threads=1 reported 198 passed, 3 failed, 3 ignored. The matching main baseline had 196 passed, 3 failed, 3 ignored. The same assertions failed in spans_say_the_next_start_and_the_lowest_level_viewed, warp_card_fetch_copies_flagged_pieces_to_their_slots, and warp_card_patch_writes_the_masked_bytes_and_no_others.
  • cargo test --locked --offline -p victory-loader --test load_probe reported 2 passed.
  • cargo build --locked --offline --release -p victory passed.
  • cargo xtask policy reported asset policy: 200 files ok.
  • cargo build --release --locked --offline --manifest-path rust/Cargo.toml passed. cargo test --release --locked --offline --manifest-path rust/Cargo.toml reported 12 passed in total.
  • python -m ruff check --select W605,F,E9 PrototypeScarlett tests tools reported All checks passed!.
  • python -m pytest -rs with ANYXBOXX_REQUIRE_RUNTIME=1 on Python 3.13.15 reported 1665 passed in 77.14s (0:01:17) with no skips.

Oracle and test data

The fixture clears one texel of a synthetic A8_UNORM texture to alpha 64/255. It materializes a matching A8 view and a cross-family R8 request, then reads the alpha channel from both descriptor slots in one dispatch. An accepted baseline slot is checked for coercion to A8 before submission. The matching view identifies the initialized texel and the cross-family slot exercises the existing null SRV fallback.

Checklist

  • One change to alpha format-family handling.
  • The regression fails on the base and passes on the fix.
  • The commands and adapter results are recorded above.
  • Synthetic test input and third-party attribution verified.

AI assistance was used for investigation, implementation, and verification with OpenAI Codex.

<!-- greyfinch-sync:LooperSalty/AnyXboxX:issue:5503537813 --> Imported from [LooperSalty/AnyXboxX](https://github.com/LooperSalty/AnyXboxX/pull/330). Originally posted by [mauroalvare](https://github.com/mauroalvare) on 2026-11-26T03:37:42Z. --- ## Vice-Tay Vice-Tay already keeps `A8_UNORM` outside the `R8_TYPELESS` family. The GPU regression checks the descriptor path end to end. A compatible alpha view returned the stored alpha value and the rejected R8 view returned zero on the RTX 5070 Ti. [DXGI format support](https://learn.microsoft.com/en-us/windows/win32/direct3ddxgi/hardware-support-for-direct3d-12-0-formats) <details> <summary>Earlier Neptune description</summary> ## Change Neptune's format-family table treated `A8_UNORM` as part of `R8_TYPELESS`. The shader-view materializer matched an `R8_UNORM` request to an `A8_UNORM` texture and substituted the alpha format. A shader then read alpha from the slot that should have received the incompatible-view fallback. Keep `A8_UNORM` in its own family so the existing D3D12 view check rejects that pairing and emits a null SRV. This is in the resource and descriptor path of the Neptune runtime built by `tools/lancer_victory.ps1`. Microsoft lists casting within the bit layout as unavailable for `A8_UNORM`, and specifies zero reads from a null SRV. [Format support at feature level 12.0](https://learn.microsoft.com/en-us/windows/win32/direct3ddxgi/hardware-support-for-direct3d-12-0-formats) · [CreateShaderResourceView](https://learn.microsoft.com/en-us/windows/win32/api/d3d12/nf-d3d12-id3d12device-createshaderresourceview) The change adapts AnoHunted's format-family fix from VIctory. The commit trailer and `THIRD_PARTY.md` record the source and licence. [VIctory source commit](https://github.com/Marvisak/VIctory/commit/97c8783f4a260996b602b75cabfe17568b1d1a26) ## Verification Base `c4c93bdc413191a9dc909998d2d53080a3f0c880` and fix `9d50884cf96bc5fe7e3ec6f0743f1897a57b996c`. For the baseline, add the GPU test file, its module declaration, and the family-boundary unit test from this PR. Run from `third_party/victory`, with `VICTORY_D3D12_WARP` unset for NVIDIA or set to `1` for WARP. ```powershell cargo test --locked --offline -p victory-gpu --lib --features diagnostics descriptor::host::alpha_view_tests::red_view_on_alpha_texture_reads_zero -- --exact --nocapture --test-threads=1 ``` | Adapter | Base cross-view read | Fixed cross-view read | Compatible A8 control | | --- | --- | --- | --- | | GeForce RTX 5070 Ti, driver 621.40 | `0.2509804`, accepted as format 65 | `0`, rejected and null | `0.2509804` on both revisions | | WARP, Microsoft Basic Render Driver | `0.2509804`, accepted as format 65 | `0`, rejected and null | `0.2509804` on both revisions | The baseline readback assertion failed on each adapter. The fix reported `1 passed; 0 failed; 0 ignored` with actual GPU readback on each. - `cargo test --locked --offline -p victory-gpu --lib --features diagnostics resource::tests::alpha_format_stands_outside_the_red_typeless_family -- --exact --test-threads=1` failed on the base with family 60 for `A8_UNORM`. It passed with the fix. - `cargo test --locked --offline -p victory-gpu --lib --features diagnostics -- --test-threads=1` reported 198 passed, 3 failed, 3 ignored. The matching `main` baseline had 196 passed, 3 failed, 3 ignored. The same assertions failed in `spans_say_the_next_start_and_the_lowest_level_viewed`, `warp_card_fetch_copies_flagged_pieces_to_their_slots`, and `warp_card_patch_writes_the_masked_bytes_and_no_others`. - `cargo test --locked --offline -p victory-loader --test load_probe` reported 2 passed. - `cargo build --locked --offline --release -p victory` passed. - `cargo xtask policy` reported `asset policy: 200 files ok`. - `cargo build --release --locked --offline --manifest-path rust/Cargo.toml` passed. `cargo test --release --locked --offline --manifest-path rust/Cargo.toml` reported 12 passed in total. - `python -m ruff check --select W605,F,E9 PrototypeScarlett tests tools` reported `All checks passed!`. - `python -m pytest -rs` with `ANYXBOXX_REQUIRE_RUNTIME=1` on Python 3.13.15 reported `1665 passed in 77.14s (0:01:17)` with no skips. ## Oracle and test data The fixture clears one texel of a synthetic `A8_UNORM` texture to alpha `64/255`. It materializes a matching A8 view and a cross-family R8 request, then reads the alpha channel from both descriptor slots in one dispatch. An accepted baseline slot is checked for coercion to A8 before submission. The matching view identifies the initialized texel and the cross-family slot exercises the existing null SRV fallback. ## Checklist - [x] One change to alpha format-family handling. - [x] The regression fails on the base and passes on the fix. - [x] The commands and adapter results are recorded above. - [x] Synthetic test input and third-party attribution verified. AI assistance was used for investigation, implementation, and verification with OpenAI Codex. </details>
LooperSalty commented 2026-11-27 13:03:15 +00:00 (Migrated from github.com)

Imported from LooperSalty/AnyXboxX. Originally posted by LooperSalty on 2026-11-27T13:03:15Z.


Rebase on current main (fa6b209e) is needed: recent merges into main now conflict with this PR. Please rebase and push so the PR can be reviewed again.

<!-- greyfinch-sync:LooperSalty/AnyXboxX:comment:7218999156 --> Imported from [LooperSalty/AnyXboxX](https://github.com/LooperSalty/AnyXboxX/pull/330#issuecomment-7218999156). Originally posted by [LooperSalty](https://github.com/LooperSalty) on 2026-11-27T13:03:15Z. --- Rebase on current main (fa6b209e) is needed: recent merges into main now conflict with this PR. Please rebase and push so the PR can be reviewed again.
mauroalvare commented 2026-11-27 17:02:15 +00:00 (Migrated from github.com)

Imported from LooperSalty/AnyXboxX. Originally posted by mauroalvare on 2026-11-27T17:02:15Z.


Updated this PR to a4453083 and registered both GPU test modules. The A8/R8 view regression ran on the RTX 5070 Ti and passed.

<!-- greyfinch-sync:LooperSalty/AnyXboxX:comment:7223953713 --> Imported from [LooperSalty/AnyXboxX](https://github.com/LooperSalty/AnyXboxX/pull/330#issuecomment-7223953713). Originally posted by [mauroalvare](https://github.com/mauroalvare) on 2026-11-27T17:02:15Z. --- Updated this PR to `a4453083` and registered both GPU test modules. The A8/R8 view regression ran on the RTX 5070 Ti and passed.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
LooperSalty/AnyXboxX!330
No description provided.