Exercise the card-memory comparison on a hardware D3D12 adapter #1086

Manually merged
github merged 1 commit from github-bot/gh-1086 into main 2026-11-29 08:21:29 +00:00 AGit
Owner

@⁠ghptc on GitHub · 2026-11-28 13:00 UTC · original
ghptc:test/hardware-card-compare → main · +16 −24 · 1 files · 1 commits · merged 2026-11-29 08:16 UTC

The existing card-compare regression opens WARP and returns when WARP is unavailable. On systems with only a hardware D3D12 adapter this leaves the store/compare sequence untested. The indirect test harness also called D3DCompile directly, bypassing compiler selection used for project helpers.

Keep the existing WARP entry point, share its assertions with an explicitly enabled hardware test and use the project's host helper compiler in the harness. The new test fails visibly if it cannot open a hardware adapter as DXGI adapter zero. It submits synthetic buffers to the card, waits for completion and checks changes, saved hashes and a change back. This patch changes only test code.

cargo test --release --locked -p victory-gpu --lib indirect::tests::hardware_card_compare_stores_the_hash_it_made_when_told -- --exact --ignored

The isolated main-based branch passed on an RTX 5070 under VKD3D-Proton with Microsoft FXC. The combined build with #925 also passed with Proton's built-in FXC and app-local DXC. With the built-in FXC alone the exact helper source fails on RWByteAddressBuffer.Load4 at compute compilation. The combined build also passed the existing host_list_batches test. A native Windows run remains outstanding.

**@⁠ghptc** on GitHub · 2026-11-28 13:00 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1086) `ghptc:test/hardware-card-compare` → `main` · +16 −24 · 1 files · 1 commits · merged 2026-11-29 08:16 UTC The existing card-compare regression opens WARP and returns when WARP is unavailable. On systems with only a hardware D3D12 adapter this leaves the store/compare sequence untested. The indirect test harness also called D3DCompile directly, bypassing compiler selection used for project helpers. Keep the existing WARP entry point, share its assertions with an explicitly enabled hardware test and use the project's host helper compiler in the harness. The new test fails visibly if it cannot open a hardware adapter as DXGI adapter zero. It submits synthetic buffers to the card, waits for completion and checks changes, saved hashes and a change back. This patch changes only test code. ```text cargo test --release --locked -p victory-gpu --lib indirect::tests::hardware_card_compare_stores_the_hash_it_made_when_told -- --exact --ignored ``` The isolated main-based branch passed on an RTX 5070 under VKD3D-Proton with Microsoft FXC. The combined build with #925 also passed with Proton's built-in FXC and app-local DXC. With the built-in FXC alone the exact helper source fails on RWByteAddressBuffer.Load4 at compute compilation. The combined build also passed the existing host_list_batches test. A native Windows run remains outstanding.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-28 14:32:46 +00:00
Author
Owner

@⁠ghptc on GitHub · 2026-11-28 13:23 UTC · original

Windows Clippy reported the same two diagnostics on this PR and its exact upstream base, 63b902f: let_and_return in shader emission and manual_is_multiple_of in the shadow worker. With #957 applied locally to 9bd0928, both locked workspace Clippy checks passed for Windows MSVC on Rust 1.98.1, including --all-features, with -D warnings. Upstream CI log

**@⁠ghptc** on GitHub · 2026-11-28 13:23 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1086#issuecomment-7239896499) Windows Clippy reported the same two diagnostics on this PR and its exact upstream base, `63b902f`: `let_and_return` in shader emission and `manual_is_multiple_of` in the shadow worker. With #957 applied locally to `9bd0928`, both locked workspace Clippy checks passed for Windows MSVC on Rust 1.98.1, including `--all-features`, with `-D warnings`. [Upstream CI log](https://github.com/trustno1-coder/VIctory-NVIDIA/actions/runs/46104876336/job/140855261577)
Author
Owner

@⁠Exopus-0x65f7ad0 on GitHub · 2026-11-28 13:39 UTC · original

The native Windows run you mentioned as outstanding: RTX 5060 Ti 8 GB (Blackwell, 10de:2d04), Windows 11 26300, native D3D12, adapter zero being the NVIDIA card. 63b902f + this PR.

cargo test --release --locked -p victory-gpu --lib indirect::tests::hardware_card_compare_stores_the_hash_it_made_when_told -- --exact --ignored --nocapture → passed (0.58 s). The project's helper compiler compiled the harness fine on Windows; no FXC/DXC issue like the one under Proton.

**@⁠Exopus-0x65f7ad0** on GitHub · 2026-11-28 13:39 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1086#issuecomment-7240095508) The native Windows run you mentioned as outstanding: RTX 5060 Ti 8 GB (Blackwell, `10de:2d04`), Windows 11 26300, native D3D12, adapter zero being the NVIDIA card. `63b902f` + this PR. `cargo test --release --locked -p victory-gpu --lib indirect::tests::hardware_card_compare_stores_the_hash_it_made_when_told -- --exact --ignored --nocapture` → **passed** (0.58 s). The project's helper compiler compiled the harness fine on Windows; no FXC/DXC issue like the one under Proton.
Author
Owner

@⁠ghptc on GitHub · 2026-11-28 13:43 UTC · original

@⁠Exopus-0x65f7ad0

The native Windows run you mentioned as outstanding: RTX 5060 Ti 8 GB (Blackwell, 10de:2d04), Windows 11 26300, native D3D12, adapter zero being the NVIDIA card. 63b902f + this PR.

cargo test --release --locked -p victory-gpu --lib indirect::tests::hardware_card_compare_stores_the_hash_it_made_when_told -- --exact --ignored --nocapture → passed (0.58 s). The project's helper compiler compiled the harness fine on Windows; no FXC/DXC issue like the one under Proton.

Thanks for running the native Windows validation! This is exactly the coverage that was missing. Great to see the hardware regression passing on another Blackwell GPU with native D3D12. Really appreciate your help!

**@⁠ghptc** on GitHub · 2026-11-28 13:43 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1086#issuecomment-7240145572) @⁠Exopus-0x65f7ad0 > The native Windows run you mentioned as outstanding: RTX 5060 Ti 8 GB (Blackwell, `10de:2d04`), Windows 11 26300, native D3D12, adapter zero being the NVIDIA card. `63b902f` + this PR. > > `cargo test --release --locked -p victory-gpu --lib indirect::tests::hardware_card_compare_stores_the_hash_it_made_when_told -- --exact --ignored --nocapture` → **passed** (0.58 s). The project's helper compiler compiled the harness fine on Windows; no FXC/DXC issue like the one under Proton. Thanks for running the native Windows validation! This is exactly the coverage that was missing. Great to see the hardware regression passing on another Blackwell GPU with native D3D12. Really appreciate your help!
Author
Owner

@⁠upipibi on GitHub · 2026-11-29 02:35 UTC · original

Test report for #1086 (head 9bd09288), merged --no-ff onto main d585f883. This is a native Windows run on RTX 30.
Synthetic tests only: no title run, no game files.

Setup: RTX 3070, driver 616.56, Windows 11 (10.0.26100), native D3D12, rustc 1.98.1.

indirect::tests::hardware_card_compare_stores_the_hash_it_made_when_told (--exact --ignored): 3/3 pass.
indirect::tests::warp_card_compare_stores_the_hash_it_made_when_told: 3/3 pass.

Both reach the device: they send synthetic buffers to the card, wait for the fence, and check the changes, saved
hashes and the change back.

Which adapter ran: the hardware test takes DXGI adapter zero (EnumAdapters(0)), and its only check is that the
adapter is not software. I added a temporary print (not committed) of the adapter the harness took, plus a list of
the adapters in DXGI order. Adapter 0 is the RTX 3070, and all three hardware runs ran on it.

On a machine where another card enumerates first, the test would run there without saying so. Printing the
adapter's name, or taking the one the host uses (victory_shader::emit::host::hardware_adapter), would show or
avoid that.

The WARP test opens WARP itself (EnumWarpAdapter), so it does not read VICTORY_D3D12_WARP. I ran it with
VICTORY_D3D12_WARP=1 --features diagnostics as well; the harness reported "Microsoft Basic Render Driver" in all
three runs.

Negative control: the PR changes only test code, so there is no fix to revert. Instead I made the card compare's
"compare, then store" mode (compare == 2) skip its store in CARD_COMPARE. The test fails on the RTX 3070 and on
WARP at indirect.rs:952: the change-back run still reports [0, 1, 0]. So the shared checks catch a compare that
does not store the hash it made.

cargo test -p victory-gpu --lib --locked

Run PR Main d585f883
default 589 passed, 0 failed, 45 ignored 589 passed, 0 failed, 44 ignored
--features diagnostics 643 passed, 0 failed, 45 ignored 643 passed, 0 failed, 44 ignored

The extra ignored test is the new hardware test. The suites ran with my temporary probe as one more ignored test;
it is subtracted here.

Not tested: the effect in a title.

Tested with the help of Claude Code (Claude Opus 5.5).

**@⁠upipibi** on GitHub · 2026-11-29 02:35 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1086#issuecomment-7249525607) Test report for #1086 (head 9bd09288), merged `--no-ff` onto main d585f883. This is a native Windows run on RTX 30. Synthetic tests only: no title run, no game files. **Setup:** RTX 3070, driver 616.56, Windows 11 (10.0.26100), native D3D12, rustc 1.98.1. **`indirect::tests::hardware_card_compare_stores_the_hash_it_made_when_told`** (`--exact --ignored`): 3/3 pass. **`indirect::tests::warp_card_compare_stores_the_hash_it_made_when_told`**: 3/3 pass. Both reach the device: they send synthetic buffers to the card, wait for the fence, and check the changes, saved hashes and the change back. Which adapter ran: the hardware test takes DXGI adapter zero (`EnumAdapters(0)`), and its only check is that the adapter is not software. I added a temporary print (not committed) of the adapter the harness took, plus a list of the adapters in DXGI order. Adapter 0 is the RTX 3070, and all three hardware runs ran on it. On a machine where another card enumerates first, the test would run there without saying so. Printing the adapter's name, or taking the one the host uses (`victory_shader::emit::host::hardware_adapter`), would show or avoid that. The WARP test opens WARP itself (`EnumWarpAdapter`), so it does not read `VICTORY_D3D12_WARP`. I ran it with `VICTORY_D3D12_WARP=1 --features diagnostics` as well; the harness reported "Microsoft Basic Render Driver" in all three runs. **Negative control:** the PR changes only test code, so there is no fix to revert. Instead I made the card compare's "compare, then store" mode (`compare == 2`) skip its store in `CARD_COMPARE`. The test fails on the RTX 3070 and on WARP at `indirect.rs:952`: the change-back run still reports `[0, 1, 0]`. So the shared checks catch a compare that does not store the hash it made. **`cargo test -p victory-gpu --lib --locked`** | Run | PR | Main d585f883 | |---|---|---| | default | 589 passed, 0 failed, 45 ignored | 589 passed, 0 failed, 44 ignored | | `--features diagnostics` | 643 passed, 0 failed, 45 ignored | 643 passed, 0 failed, 44 ignored | The extra ignored test is the new hardware test. The suites ran with my temporary probe as one more ignored test; it is subtracted here. Not tested: the effect in a title. *Tested with the help of Claude Code (Claude Opus 5.5).*
github manually merged commit 2132b626af into main 2026-11-29 08:21:29 +00:00
This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

Reference
github/trustno1-coder--VIctory-NVIDIA!1086
No description provided.