Add a synthetic D3D12 wave64 regression for independently looping waves #3178

Open
carlosmegino wants to merge 3 commits from upstream-pr/3180 into main
carlosmegino commented 2026-11-26 11:20:03 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by carlosmegino on 2026-11-26T11:20:03Z.


Refs #2688.

Summary

Add an opt-in, synthetic D3D12 readback test for a 128-thread group with two logical wave64s. The waves use different EXEC masks and loop counts, keep their LDS regions separate, elect lanes in opposite halves, and read the other wave's counter after a group barrier. A 64-thread group serves as the control. The CPU oracle checks seven UAVs at every logical lane and also checks their canaries.

The LDS loop is adapted from PiloteCode's GPL-3.0 fixture in fxceless/victory-fork#854. The PR adds the test and a resource-state adjustment in the test host.

Validation

On an RTX 5070 Ti, the main emitter requests a physical wave64 PSO for the 64-thread case. The 128-thread case runs but returns 0 instead of 40 in UAV 2, lane 0. The only upstream change between the tested 842b0cb and this PR's base 63bcca4 is a README update. This draft records the expected failures so a later backend patch can demonstrate both cases turning green.

With the paired backend and the separate selection fix, both group sizes matched all seven CPU outputs per lane. Canaries stayed intact and D3D12 GPU-based validation reported zero warnings or errors.

Run on a wave32 GPU with Windows Graphics Tools and the DXIL validator:

cargo test -p victory-shader --locked --lib wave64_2688_group -- --ignored --nocapture --test-threads=1
<!-- greyfinch-sync:Marvisak/VIctory:issue:5509082516 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3180). Originally posted by [carlosmegino](https://github.com/carlosmegino) on 2026-11-26T11:20:03Z. --- Refs #2688. ## Summary Add an opt-in, synthetic D3D12 readback test for a 128-thread group with two logical wave64s. The waves use different EXEC masks and loop counts, keep their LDS regions separate, elect lanes in opposite halves, and read the other wave's counter after a group barrier. A 64-thread group serves as the control. The CPU oracle checks seven UAVs at every logical lane and also checks their canaries. The LDS loop is adapted from PiloteCode's GPL-3.0 fixture in fxceless/victory-fork#854. The PR adds the test and a resource-state adjustment in the test host. ## Validation On an RTX 5070 Ti, the main emitter requests a physical wave64 PSO for the 64-thread case. The 128-thread case runs but returns 0 instead of 40 in UAV 2, lane 0. The only upstream change between the tested `842b0cb` and this PR's base `63bcca4` is a README update. This draft records the expected failures so a later backend patch can demonstrate both cases turning green. With the paired backend and the separate selection fix, both group sizes matched all seven CPU outputs per lane. Canaries stayed intact and D3D12 GPU-based validation reported zero warnings or errors. Run on a wave32 GPU with Windows Graphics Tools and the DXIL validator: ```powershell cargo test -p victory-shader --locked --lib wave64_2688_group -- --ignored --nocapture --test-threads=1 ```
Dukestar69 commented 2026-11-26 12:11:12 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Dukestar69 on 2026-11-26T12:11:12Z.

Review: COMMENTED


Checked against origin/main (63bcca4) on Windows 11 + RTX 5090:

  • cargo clippy -p victory-shader --all-targets -- -D warnings: clean.
  • cargo xtask policy: 192 files ok.
  • cargo test -p victory-shader --lib wave64_group_tests::: compiles cleanly (2 ignored by default). Running with --ignored requires Windows Graphics Tools (D3D12GetDebugInterface returned 0x887A002D DXGI_ERROR_SDK_COMPONENT_MISSING on this host), so I am leaving a comment rather than an approval since the ignored GPU assertions could not be executed here.

Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).

<!-- greyfinch-sync:Marvisak/VIctory:review:6073907867 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3180#pullrequestreview-6073907867). Originally posted by [Dukestar69](https://github.com/Dukestar69) on 2026-11-26T12:11:12Z. **Review:** COMMENTED --- Checked against `origin/main` (`63bcca4`) on Windows 11 + RTX 5090: - `cargo clippy -p victory-shader --all-targets -- -D warnings`: clean. - `cargo xtask policy`: 192 files ok. - `cargo test -p victory-shader --lib wave64_group_tests::`: compiles cleanly (2 ignored by default). Running with `--ignored` requires Windows Graphics Tools (`D3D12GetDebugInterface` returned `0x887A002D` `DXGI_ERROR_SDK_COMPONENT_MISSING` on this host), so I am leaving a comment rather than an approval since the ignored GPU assertions could not be executed here. Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
carlosmegino commented 2026-11-26 13:04:26 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by carlosmegino on 2026-11-26T12:14:11Z.


Thanks for the independent verification!

The ignored tests require Windows Graphics Tools because they enable the D3D12 debug layer and GPU-based validation.

Installing Graphics Tools under Windows Optional Features should resolve DXGI_ERROR_SDK_COMPONENT_MISSING.

I appreciate you checking the compilation, Clippy and asset policy on a separate NVIDIA system.

If you have the opportunity to run the GPU assertions on your RTX 5090, that would provide a valuable independent hardware result.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7191741665 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3180#issuecomment-7191741665). Originally posted by [carlosmegino](https://github.com/carlosmegino) on 2026-11-26T12:14:11Z. --- Thanks for the independent verification! The ignored tests require Windows Graphics Tools because they enable the D3D12 debug layer and GPU-based validation. Installing Graphics Tools under Windows Optional Features should resolve DXGI_ERROR_SDK_COMPONENT_MISSING. I appreciate you checking the compilation, Clippy and asset policy on a separate NVIDIA system. If you have the opportunity to run the GPU assertions on your RTX 5090, that would provide a valuable independent hardware result.
upipibi commented 2026-11-26 20:05:17 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by upipibi on 2026-11-26T20:05:17Z.


Independent hardware run of the ignored tests on 827057a (main 63bcca4 only for the shared tests: the two ignored tests are added by this PR, so they do not exist on main and ran on the PR head only): RTX 3070 8 GB (Ampere, wave32 only), driver 616.56, Windows 11, rustc 1.98.1, Windows Graphics Tools and dxil.dll present.

cargo test -p victory-shader --locked --lib wave64_2688_group -- --ignored --nocapture --test-threads=1, one run:

test result on the PR head
wave64_2688_group_128 fails: UAV 2, lane 0 reads 0 instead of 40
wave64_2688_group_64 fails at pipeline creation; the debug layer reports "Shader wants wave lane count of 64 but maximum wave lane count for device is 32"

Both are the expected failures your description records on the RTX 5070 Ti: the 64-thread case's main emitter asks for a physical wave64 PSO, which a 32-lane-only driver refuses, and the 128-thread case returns 0 instead of 40. So Ampere shows the same two failures. The debug layer logged that one error and no warnings; GPU-based validation logged nothing. The non-ignored wave64 tests pass on both trees (5 each). No driver resets.

AI-assisted (Claude Code, Claude Sonnet 5.5 ran the tests; Claude Opus 5.5 checked and posted).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7202281143 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3180#issuecomment-7202281143). Originally posted by [upipibi](https://github.com/upipibi) on 2026-11-26T20:05:17Z. --- Independent hardware run of the ignored tests on `827057a` (`main` `63bcca4` only for the shared tests: the two ignored tests are added by this PR, so they do not exist on `main` and ran on the PR head only): RTX 3070 8 GB (Ampere, wave32 only), driver 616.56, Windows 11, rustc 1.98.1, Windows Graphics Tools and `dxil.dll` present. `cargo test -p victory-shader --locked --lib wave64_2688_group -- --ignored --nocapture --test-threads=1`, one run: | test | result on the PR head | |---|---| | `wave64_2688_group_128` | fails: UAV 2, lane 0 reads 0 instead of 40 | | `wave64_2688_group_64` | fails at pipeline creation; the debug layer reports "Shader wants wave lane count of 64 but maximum wave lane count for device is 32" | Both are the expected failures your description records on the RTX 5070 Ti: the 64-thread case's main emitter asks for a physical wave64 PSO, which a 32-lane-only driver refuses, and the 128-thread case returns 0 instead of 40. So Ampere shows the same two failures. The debug layer logged that one error and no warnings; GPU-based validation logged nothing. The non-ignored `wave64` tests pass on both trees (5 each). No driver resets. AI-assisted (Claude Code, Claude Sonnet 5.5 ran the tests; Claude Opus 5.5 checked and posted).
kilolimaVI commented 2026-11-26 21:31:03 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by kilolimaVI on 2026-11-26T21:31:03Z.


Ran the two ignored tests on AMD: Windows 11, Radeon 780M (RDNA3), Graphics Tools installed, toolchain 1.98.1.

Both panic at wave64_group_tests.rs:216, assert_eq!((caps.WaveLaneCountMin, caps.WaveLaneCountMax), (32, 32)): this adapter reports (32, 64), as RDNA does. So they need a 32-lane-only host (NVIDIA, Intel), which matches the ignore reason, but on an AMD card they read as failures rather than "not this host". Returning early with a note when WaveLaneCountMax != 32 would make --ignored runs on mixed hardware clean. Before that point (debug layer, device creation) everything worked here.

AI-assisted (Claude).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7203801561 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3180#issuecomment-7203801561). Originally posted by [kilolimaVI](https://github.com/kilolimaVI) on 2026-11-26T21:31:03Z. --- Ran the two ignored tests on AMD: Windows 11, Radeon 780M (RDNA3), Graphics Tools installed, toolchain 1.98.1. Both panic at `wave64_group_tests.rs:216`, `assert_eq!((caps.WaveLaneCountMin, caps.WaveLaneCountMax), (32, 32))`: this adapter reports (32, 64), as RDNA does. So they need a 32-lane-only host (NVIDIA, Intel), which matches the ignore reason, but on an AMD card they read as failures rather than "not this host". Returning early with a note when `WaveLaneCountMax != 32` would make `--ignored` runs on mixed hardware clean. Before that point (debug layer, device creation) everything worked here. AI-assisted (Claude).
fuzeofficlal commented 2026-11-26 22:08:19 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-26T22:08:19Z.

Review: CHANGES_REQUESTED


Verified on 827057a6:

  • cargo xtask policy: 192 files ok.
  • cargo clippy --locked -p victory-shader --all-targets -- -D warnings (default and --all-features): clean.
  • Default emit::wave64_group_tests:: emit::tests:: under VICTORY_WARP=0 and VICTORY_WARP=1: 17 passed, 0 failed, 2 ignored.
  • Running the ignored tests on an RTX 5090 (Wave32 (32, 32), D3D12 Graphics Tools, and dxil.dll present) with -- --ignored --test-threads=1 emit::wave64_group_tests::: 0 passed, 2 failed:
    • wave64_2688_group_64 (wave64_group_tests.rs:226): ID3D12Device::CreateComputeShader: Shader wants wave lane count of 64 but maximum wave lane count for device is 32.
    • wave64_2688_group_128 (wave64_group_tests.rs:251): UAV 2, thread 0 got 0, expected 40.

The #[cfg(test)] change in crates/victory-shader/src/emit/host.rs:1706 (D3D12_RESOURCE_STATE_COMMON with implicit state promotion) looks good, and the synthetic Wave64 math/oracle is clear, but several items need attention before landing:

  1. Both ignored tests fail on 63bcca43 even on a Wave32 RTX 5090: If these are intended as a known-red regression for #2688 prior to a compiler fix, the #[ignore] reason should state that explicitly rather than implying they only need a Wave32 GPU + Graphics Tools + DXIL validator.
  2. Module ordering (crates/victory-shader/src/emit/mod.rs:222): rustfmt --edition 2024 --check fails because mod wave64_group_tests; needs to be ordered alphabetically after mod wave;.
  3. Guest LDS wait order (crates/victory-shader/src/emit/wave64_group_tests.rs:97, 100): The 128-thread guest issues s_barrier without a preceding s_waitcnt lgkmcnt(0) before reading the peer wave's LDS counter, and the 64-thread path copies v5 to v7 before the first explicit s_waitcnt.
  4. Test harness isolation & adapter gating (wave64_group_tests.rs:190-220, 264): Enabling SetEnableGPUBasedValidation(true) via Once can trigger device removal if another test created a device first (--include-ignored), Host::new(false) respects VICTORY_WARP=1 and hard-panics on non-(32, 32) adapters instead of skipping, and running both tests without ONE_AT_A_TIME risks concurrent hardware dispatches.
<!-- greyfinch-sync:Marvisak/VIctory:review:6080999487 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3180#pullrequestreview-6080999487). Originally posted by [fuzeofficlal](https://github.com/fuzeofficlal) on 2026-11-26T22:08:19Z. **Review:** CHANGES_REQUESTED --- Verified on `827057a6`: - `cargo xtask policy`: `192 files ok`. - `cargo clippy --locked -p victory-shader --all-targets -- -D warnings` (default and `--all-features`): clean. - Default `emit::wave64_group_tests:: emit::tests::` under `VICTORY_WARP=0` and `VICTORY_WARP=1`: **17 passed, 0 failed, 2 ignored**. - Running the ignored tests on an RTX 5090 (Wave32 `(32, 32)`, D3D12 Graphics Tools, and `dxil.dll` present) with `-- --ignored --test-threads=1 emit::wave64_group_tests::`: **0 passed, 2 failed**: - `wave64_2688_group_64` (`wave64_group_tests.rs:226`): `ID3D12Device::CreateComputeShader: Shader wants wave lane count of 64 but maximum wave lane count for device is 32.` - `wave64_2688_group_128` (`wave64_group_tests.rs:251`): `UAV 2, thread 0` got `0`, expected `40`. The `#[cfg(test)]` change in `crates/victory-shader/src/emit/host.rs:1706` (`D3D12_RESOURCE_STATE_COMMON` with implicit state promotion) looks good, and the synthetic Wave64 math/oracle is clear, but several items need attention before landing: 1. **Both ignored tests fail on `63bcca43` even on a Wave32 RTX 5090**: If these are intended as a known-red regression for `#2688` prior to a compiler fix, the `#[ignore]` reason should state that explicitly rather than implying they only need a Wave32 GPU + Graphics Tools + DXIL validator. 2. **Module ordering (`crates/victory-shader/src/emit/mod.rs:222`)**: `rustfmt --edition 2024 --check` fails because `mod wave64_group_tests;` needs to be ordered alphabetically after `mod wave;`. 3. **Guest LDS wait order (`crates/victory-shader/src/emit/wave64_group_tests.rs:97, 100`)**: The 128-thread guest issues `s_barrier` without a preceding `s_waitcnt lgkmcnt(0)` before reading the peer wave's LDS counter, and the 64-thread path copies `v5` to `v7` before the first explicit `s_waitcnt`. 4. **Test harness isolation & adapter gating (`wave64_group_tests.rs:190-220, 264`)**: Enabling `SetEnableGPUBasedValidation(true)` via `Once` can trigger device removal if another test created a device first (`--include-ignored`), `Host::new(false)` respects `VICTORY_WARP=1` and hard-panics on non-`(32, 32)` adapters instead of skipping, and running both tests without `ONE_AT_A_TIME` risks concurrent hardware dispatches.
carlosmegino commented 2026-11-26 22:27:49 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by carlosmegino on 2026-11-26T22:27:49Z.


@fuzeofficlal — response to observation 1 (known-red regressions), addressed in 1625d1c.

Both ignore reasons now explicitly say known regression: fails until #2688 is fixed, followed by the hardware/tool requirements.

Rechecked the original head 827057a6 before editing; upstream main remains 63bcca43c6a00a758510398fa43096ce7e4f7df0. With that main emitter and the revised synthetic fixture:

  • 64 threads: PSO creation fails with D3D12's “Shader wants wave lane count of 64 but maximum wave lane count for device is 32.”
  • 128 threads: all seven UAVs are checked. UAV 2/thread 0 is 0 instead of 40; UAV 3/thread 0 is 0 instead of 20. Each has 128 mismatches. The other five UAVs match, all 56 canaries remain intact, and D3D12 reports zero warnings/errors.

The separate local paired-backend control is a9ef792f6d516ee6200f4fedeb061a25153d48fd, including the masked-first-lane selection correction. I copied this PR's revised fixture into that checkout; its only API adaptation is emit_with(..., Options { wave32_only: host::wave32_only(&host.device), ..Default::default() }) instead of main's emit(...). Guest instructions and CPU oracle are identical between controls. Both tests pass there: 448 and 896 lane values checked, respectively, 56 canaries each, zero D3D12 warnings/errors. This backend remains outside the PR.

Hardware: Windows, RTX 5070 Ti, driver 621.01, rustc 1.98.1, wave lanes (32,32), Graphics Tools and DXIL validator available. Reproduction:

$env:VICTORY_WARP='0'
cargo test -p victory-shader --locked --lib wave64_2688_group -- --ignored --nocapture

Only synthetic resources were used.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7204700203 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3180#issuecomment-7204700203). Originally posted by [carlosmegino](https://github.com/carlosmegino) on 2026-11-26T22:27:49Z. --- @fuzeofficlal — response to observation 1 (known-red regressions), addressed in [1625d1c](https://github.com/carlosmegino/VIctory/commit/1625d1c686adc74e986d578b47aa6364b672b8d6). Both ignore reasons now explicitly say `known regression: fails until #2688 is fixed`, followed by the hardware/tool requirements. Rechecked the original head `827057a6` before editing; upstream main remains `63bcca43c6a00a758510398fa43096ce7e4f7df0`. With that main emitter and the revised synthetic fixture: - 64 threads: PSO creation fails with D3D12's “Shader wants wave lane count of 64 but maximum wave lane count for device is 32.” - 128 threads: all seven UAVs are checked. UAV 2/thread 0 is 0 instead of 40; UAV 3/thread 0 is 0 instead of 20. Each has 128 mismatches. The other five UAVs match, all 56 canaries remain intact, and D3D12 reports zero warnings/errors. The separate local paired-backend control is `a9ef792f6d516ee6200f4fedeb061a25153d48fd`, including the masked-first-lane selection correction. I copied this PR's revised fixture into that checkout; its only API adaptation is `emit_with(..., Options { wave32_only: host::wave32_only(&host.device), ..Default::default() })` instead of main's `emit(...)`. Guest instructions and CPU oracle are identical between controls. Both tests pass there: 448 and 896 lane values checked, respectively, 56 canaries each, zero D3D12 warnings/errors. This backend remains outside the PR. Hardware: Windows, RTX 5070 Ti, driver 621.01, rustc 1.98.1, wave lanes (32,32), Graphics Tools and DXIL validator available. Reproduction: ```powershell $env:VICTORY_WARP='0' cargo test -p victory-shader --locked --lib wave64_2688_group -- --ignored --nocapture ``` Only synthetic resources were used.
carlosmegino commented 2026-11-26 22:27:50 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by carlosmegino on 2026-11-26T22:27:50Z.


@fuzeofficlal — response to observation 2 (module ordering / formatting), addressed in 1625d1c.

wave64_group_tests now follows wave; rustfmt also orders bvh_tests before census_tests. Formatting was restricted to the PR's three existing files, with child traversal disabled:

rustfmt --edition 2024 --config skip_children=true --check crates/victory-shader/src/emit/mod.rs crates/victory-shader/src/emit/host.rs crates/victory-shader/src/emit/wave64_group_tests.rs
cargo clippy --workspace --all-targets --locked -- -D warnings
cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
cargo xtask policy

All exit 0; policy reports 192 files ok. The changes to host.rs in this follow-up are formatting only. No compiler changes or optimizations are included.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7204700444 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3180#issuecomment-7204700444). Originally posted by [carlosmegino](https://github.com/carlosmegino) on 2026-11-26T22:27:50Z. --- @fuzeofficlal — response to observation 2 (module ordering / formatting), addressed in [1625d1c](https://github.com/carlosmegino/VIctory/commit/1625d1c686adc74e986d578b47aa6364b672b8d6). `wave64_group_tests` now follows `wave`; rustfmt also orders `bvh_tests` before `census_tests`. Formatting was restricted to the PR's three existing files, with child traversal disabled: ```powershell rustfmt --edition 2024 --config skip_children=true --check crates/victory-shader/src/emit/mod.rs crates/victory-shader/src/emit/host.rs crates/victory-shader/src/emit/wave64_group_tests.rs cargo clippy --workspace --all-targets --locked -- -D warnings cargo clippy --workspace --all-targets --all-features --locked -- -D warnings cargo xtask policy ``` All exit 0; policy reports `192 files ok`. The changes to host.rs in this follow-up are formatting only. No compiler changes or optimizations are included.
carlosmegino commented 2026-11-26 22:27:51 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by carlosmegino on 2026-11-26T22:27:51Z.


@fuzeofficlal — response to observation 3 (guest LDS ordering), addressed in 1625d1c.

The guest now waits with s_waitcnt lgkmcnt(0) after counter initialization, after each atomic iteration before narrowing EXEC, after reading its own counter, between the per-lane LDS write and opposite-half read, immediately before the group barrier, and after the peer-counter read. Descriptor loads retain their waits before buffer stores. Thus the 64-thread copy consumes a completed v5, and the 128-thread peer read follows completed LDS work plus the barrier.

The loop branch displacement is calculated from its label instead of hard-coded. The new CPU-only decode audit checks LDS/SMEM completion waits, barrier ordering, complete instruction boundaries, and the loop target for both group sizes:

cargo test -p victory-shader --locked --lib guest_lds_dependencies_and_branches -- --nocapture

Result: 1 passed. Both branches are at byte 92 and target byte 64: -32 bytes from the following PC, i.e. -8 dwords (0xBF89FFF8).

The CPU oracle is unchanged. The revised programs still reproduce both main defects and both pass the separate paired-backend control described above.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7204700661 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3180#issuecomment-7204700661). Originally posted by [carlosmegino](https://github.com/carlosmegino) on 2026-11-26T22:27:51Z. --- @fuzeofficlal — response to observation 3 (guest LDS ordering), addressed in [1625d1c](https://github.com/carlosmegino/VIctory/commit/1625d1c686adc74e986d578b47aa6364b672b8d6). The guest now waits with `s_waitcnt lgkmcnt(0)` after counter initialization, after each atomic iteration before narrowing EXEC, after reading its own counter, between the per-lane LDS write and opposite-half read, immediately before the group barrier, and after the peer-counter read. Descriptor loads retain their waits before buffer stores. Thus the 64-thread copy consumes a completed v5, and the 128-thread peer read follows completed LDS work plus the barrier. The loop branch displacement is calculated from its label instead of hard-coded. The new CPU-only decode audit checks LDS/SMEM completion waits, barrier ordering, complete instruction boundaries, and the loop target for both group sizes: ```powershell cargo test -p victory-shader --locked --lib guest_lds_dependencies_and_branches -- --nocapture ``` Result: 1 passed. Both branches are at byte 92 and target byte 64: -32 bytes from the following PC, i.e. -8 dwords (`0xBF89FFF8`). The CPU oracle is unchanged. The revised programs still reproduce both main defects and both pass the separate paired-backend control described above.
carlosmegino commented 2026-11-26 22:27:52 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by carlosmegino on 2026-11-26T22:27:52Z.


@fuzeofficlal — response to observation 4 (GBV isolation, adapter gating, serialization), addressed in 1625d1c.

Each ignored test launches a fresh copy of its test executable with --exact <its-own-name> --ignored --nocapture --test-threads=1. Only that test runs in the child, which enables the debug layer and GPU-based validation before its first Host/device. The parent holds the existing valu_tests::ONE_AT_A_TIME mutex for the child's entire lifetime. Child launch errors, nonzero exit codes, and crashes fail the parent test.

The child inherits VICTORY_WARP; device creation and feature-query errors remain failures. Only unsupported wave capabilities produce an explicit SKIP. Translation, validator loading/validation, PSO creation, dispatch/readback, canary mismatches, and D3D12 warnings/errors remain failures. A negative control with VICTORY_DXIL pointing to a nonexistent DLL exits 101 in both child and parent, without a skip.

Concurrent relevant-suite command (also checked with --all-features):

cargo test -p victory-shader --locked --lib -- emit::tests:: emit::wave64_group_tests:: --include-ignored --nocapture

With WARP=0: main yields 18 passed / the 2 expected regression failures; paired control yields 20 passed. With WARP=1: both yield 20 harness passes, including 2 explicitly reported capability skips. Without --include-ignored, both configurations yield 18 passed / 2 ignored.

For completeness, the full shader suite is not clean on this host: a heap-direct texture test exits with 0xC0000005, and four other synthetic tests fail under WARP. I reproduced that individual crash and all four failures on the unmodified original PR head 827057a6. They are outside these regressions; I have kept their results separate and made no unrelated fixes.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7204700878 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3180#issuecomment-7204700878). Originally posted by [carlosmegino](https://github.com/carlosmegino) on 2026-11-26T22:27:52Z. --- @fuzeofficlal — response to observation 4 (GBV isolation, adapter gating, serialization), addressed in [1625d1c](https://github.com/carlosmegino/VIctory/commit/1625d1c686adc74e986d578b47aa6364b672b8d6). Each ignored test launches a fresh copy of its test executable with `--exact <its-own-name> --ignored --nocapture --test-threads=1`. Only that test runs in the child, which enables the debug layer and GPU-based validation before its first Host/device. The parent holds the existing `valu_tests::ONE_AT_A_TIME` mutex for the child's entire lifetime. Child launch errors, nonzero exit codes, and crashes fail the parent test. The child inherits `VICTORY_WARP`; device creation and feature-query errors remain failures. Only unsupported wave capabilities produce an explicit `SKIP`. Translation, validator loading/validation, PSO creation, dispatch/readback, canary mismatches, and D3D12 warnings/errors remain failures. A negative control with `VICTORY_DXIL` pointing to a nonexistent DLL exits 101 in both child and parent, without a skip. Concurrent relevant-suite command (also checked with `--all-features`): ```powershell cargo test -p victory-shader --locked --lib -- emit::tests:: emit::wave64_group_tests:: --include-ignored --nocapture ``` With WARP=0: main yields 18 passed / the 2 expected regression failures; paired control yields 20 passed. With WARP=1: both yield 20 harness passes, including 2 explicitly reported capability skips. Without `--include-ignored`, both configurations yield 18 passed / 2 ignored. For completeness, the full shader suite is not clean on this host: a heap-direct texture test exits with 0xC0000005, and four other synthetic tests fail under WARP. I reproduced that individual crash and all four failures on the unmodified original PR head `827057a6`. They are outside these regressions; I have kept their results separate and made no unrelated fixes.
carlosmegino commented 2026-11-26 22:27:53 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by carlosmegino on 2026-11-26T22:27:53Z.


@kilolimaVI — addressed your adapter-capability observation in 1625d1c.

The hard assertion is replaced by an explicit capability gate: execution requires WaveOps and exactly (WaveLaneCountMin, WaveLaneCountMax) == (32,32). A device reporting (32,64), like your Radeon 780M, returns with a SKIP message containing the actual capabilities and VICTORY_WARP value. It does not attempt translation or dispatch.

I verified the unsupported-device path locally with VICTORY_WARP=1: both tests explicitly print SKIP ... WaveOps=true, lanes=(4, 4), VICTORY_WARP=Some("1"), including under --include-ignored. I do not have a (32,64) AMD adapter here, so that exact hardware case is covered by the predicate rather than a claimed AMD run.

With VICTORY_WARP=0, the RTX 5070 Ti reports (32,32) and both tests execute: they retain the expected main failures and both pass the paired backend. Initialization, translation, validation and execution errors are not turned into skips.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7204701095 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3180#issuecomment-7204701095). Originally posted by [carlosmegino](https://github.com/carlosmegino) on 2026-11-26T22:27:53Z. --- @kilolimaVI — addressed your adapter-capability observation in [1625d1c](https://github.com/carlosmegino/VIctory/commit/1625d1c686adc74e986d578b47aa6364b672b8d6). The hard assertion is replaced by an explicit capability gate: execution requires WaveOps and exactly `(WaveLaneCountMin, WaveLaneCountMax) == (32,32)`. A device reporting (32,64), like your Radeon 780M, returns with a `SKIP` message containing the actual capabilities and VICTORY_WARP value. It does not attempt translation or dispatch. I verified the unsupported-device path locally with `VICTORY_WARP=1`: both tests explicitly print `SKIP ... WaveOps=true, lanes=(4, 4), VICTORY_WARP=Some("1")`, including under `--include-ignored`. I do not have a (32,64) AMD adapter here, so that exact hardware case is covered by the predicate rather than a claimed AMD run. With `VICTORY_WARP=0`, the RTX 5070 Ti reports (32,32) and both tests execute: they retain the expected main failures and both pass the paired backend. Initialization, translation, validation and execution errors are not turned into skips.
fuzeofficlal commented 2026-11-26 22:47:13 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-26T22:47:13Z.

Review: APPROVED


1625d1c6 resolves all blockers from the previous review:

  • crates/victory-shader/src/emit/mod.rs now orders bvh_tests, census_tests, and wave64_group_tests alphabetically, and rustfmt --edition 2024 --check passes cleanly on the modified host.rs and wave64_group_tests.rs files.
  • crates/victory-shader/src/emit/wave64_group_tests.rs places WAIT_LGKM (s_waitcnt lgkmcnt(0)) after DS/SMEM producers and right before s_barrier, covered by the new guest_lds_dependencies_and_branches unit test.
  • ONE_AT_A_TIME + child-process isolation (VICTORY_WAVE64_2688_CHILD) enables GPU-based validation before first device creation and cleanly skips non-exclusively-Wave32 devices (SKIP ... lanes=(4, 4) under VICTORY_WARP=1, passing 2/2).
  • Default cargo test passes 18/18 (2 ignored) on both VICTORY_WARP=0 and VICTORY_WARP=1, and --ignored on RTX 5090 (exclusively wave32) cleanly reproduces the tracked #2688 failures (128: UAV 2/3 zeroed with D3D12 warnings/errors: []; 64: rejected at PSO creation for wanting Wave64 on max wave 32).

Approving. (Non-blocking follow-up idea: host::dispatch currently lacks a fence timeout and u64::MAX device-removed diagnostic check compared to the draw path.)

<!-- greyfinch-sync:Marvisak/VIctory:review:6081236830 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3180#pullrequestreview-6081236830). Originally posted by [fuzeofficlal](https://github.com/fuzeofficlal) on 2026-11-26T22:47:13Z. **Review:** APPROVED --- `1625d1c6` resolves all blockers from the previous review: - `crates/victory-shader/src/emit/mod.rs` now orders `bvh_tests`, `census_tests`, and `wave64_group_tests` alphabetically, and `rustfmt --edition 2024 --check` passes cleanly on the modified `host.rs` and `wave64_group_tests.rs` files. - `crates/victory-shader/src/emit/wave64_group_tests.rs` places `WAIT_LGKM` (`s_waitcnt lgkmcnt(0)`) after DS/SMEM producers and right before `s_barrier`, covered by the new `guest_lds_dependencies_and_branches` unit test. - `ONE_AT_A_TIME` + child-process isolation (`VICTORY_WAVE64_2688_CHILD`) enables GPU-based validation before first device creation and cleanly skips non-exclusively-Wave32 devices (`SKIP ... lanes=(4, 4)` under `VICTORY_WARP=1`, passing 2/2). - Default `cargo test` passes 18/18 (2 ignored) on both `VICTORY_WARP=0` and `VICTORY_WARP=1`, and `--ignored` on RTX 5090 (`exclusively wave32`) cleanly reproduces the tracked `#2688` failures (`128`: `UAV 2/3` zeroed with `D3D12 warnings/errors: []`; `64`: rejected at PSO creation for wanting Wave64 on max wave 32). Approving. (Non-blocking follow-up idea: `host::dispatch` currently lacks a fence timeout and `u64::MAX` device-removed diagnostic check compared to the draw path.)
upipibi commented 2026-11-26 23:48:30 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by upipibi on 2026-11-26T23:48:30Z.


Independent re-run on the new head 1625d1c6 (earlier run was at 827057a; main 63bcca43 as control). RTX 3070 8 GB (Ampere, wave32 only, reports lanes (32,32)), driver 616.56, Windows 11, rustc 1.98.1, Graphics Tools and dxil.dll present.

Gating: on this (32,32) card the new gate does not skip. Both ignored tests execute (each in its own child process, "exclusively wave32, GPU-based validation enabled before first device"), and fail as the description says. No SKIP line appeared.

Ignored tests, head, one run: cargo test -p victory-shader --locked --lib wave64_2688_group -- --ignored --nocapture --test-threads=1

  • wave64_2688_group_128: UAV 2 thread 0 got 0, expected 40 (128 mismatches); UAV 3 thread 0 got 0, expected 20 (128 mismatches); UAVs 0, 1, 4, 5, 6: 0 mismatches; all 8 canaries per UAV intact; D3D12 warnings/errors: []. Child exits 101, parent panics at wave64_group_tests.rs:274.
  • wave64_2688_group_64: compute PSO "The parameter is incorrect."; debug layer: "CreateComputeShader: Shader wants wave lane count of 64 but maximum wave lane count for device is 32".
  • Result: test result: FAILED. 0 passed; 2 failed; 0 ignored.

Non-ignored, head, 3 runs of cargo test -p victory-shader --locked --lib wave64 -- --test-threads=1 --nocapture: each test result: ok. 6 passed; 0 failed; 2 ignored; 0 measured; 300 filtered out. This includes guest_lds_dependencies_and_branches (both sizes: "branch 92 -> 64 (-32 bytes from next PC), all LDS/SMEM producers waited, barrier audited"). The ignore reason now reads "known regression: fails until #2688 is fixed; requires exclusively wave32, Graphics Tools, and DXIL validator". The two existing wave64_permutes_* tests print "no pipeline for a wave of 64; skipped" and pass, as before.

Control on main 63bcca43: the same ignored command runs 0 tests (they are added by the PR). Negative control: I copied the PR's wave64_group_tests.rs and its mod line into main (without the host.rs/mod.rs changes). It compiled with 0 errors (so there is no compile-error code to report). The two ignored tests on that tree fail identically to the head: UAV 2 thread 0 0 vs 40, UAV 3 thread 0 0 vs 20 (128 mismatches each, canaries intact, no D3D12 messages), and the 64-thread PSO rejection with the same debug-layer message. So on this card the failures come from the main emitter, not from the PR's host changes.

Lib suites, cargo test -p victory-shader --locked --lib -- --test-threads=1: on both trees the process aborts at emit::memory_tests::heap_direct_texture_reads_mark_their_heap_index with 0xC0000005 STATUS_ACCESS_VIOLATION (the crash you mention; it is in main too). Re-run with --skip heap_direct_texture_reads_mark_their_heap_index, once each:

  • head: test result: FAILED. 299 passed; 3 failed; 5 ignored; 0 measured; 1 filtered out; finished in 289.69s
  • main: test result: FAILED. 298 passed; 3 failed; 3 ignored; 0 measured; 1 filtered out; finished in 356.55s
  • The same 3 fail on both trees: stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride, stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros, synthetic_tests::gathers_at_a_level_match_the_hardware. The difference (+1 passed, +2 ignored) is exactly the PR's new tests.

Changed since 827057a: the 128-thread case now also reports UAV 3 (0 vs 20) mismatches, where the earlier run listed only UAV 2 (the first mismatch); the 64-thread case is unchanged; the debug layer and GPU-based validation again reported no warnings or errors beyond the PSO one; the ignored tests now run in isolated child processes; one more non-ignored test passes (6 vs 5 in the wave64 filter). No driver resets.

Not run: a (32,64) AMD adapter, so the SKIP path for it is untested here. No game files used.

AI-assisted (Claude Code, Claude Sonnet 5.5 ran the tests; Claude Opus 5.5 checked and posted).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7205878661 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3180#issuecomment-7205878661). Originally posted by [upipibi](https://github.com/upipibi) on 2026-11-26T23:48:30Z. --- Independent re-run on the new head `1625d1c6` (earlier run was at `827057a`; `main` `63bcca43` as control). RTX 3070 8 GB (Ampere, wave32 only, reports lanes (32,32)), driver 616.56, Windows 11, rustc 1.98.1, Graphics Tools and `dxil.dll` present. Gating: on this (32,32) card the new gate does not skip. Both ignored tests execute (each in its own child process, "exclusively wave32, GPU-based validation enabled before first device"), and fail as the description says. No `SKIP` line appeared. Ignored tests, head, one run: `cargo test -p victory-shader --locked --lib wave64_2688_group -- --ignored --nocapture --test-threads=1` - `wave64_2688_group_128`: UAV 2 thread 0 got 0, expected 40 (128 mismatches); UAV 3 thread 0 got 0, expected 20 (128 mismatches); UAVs 0, 1, 4, 5, 6: 0 mismatches; all 8 canaries per UAV intact; `D3D12 warnings/errors: []`. Child exits 101, parent panics at `wave64_group_tests.rs:274`. - `wave64_2688_group_64`: compute PSO "The parameter is incorrect."; debug layer: "CreateComputeShader: Shader wants wave lane count of 64 but maximum wave lane count for device is 32". - Result: `test result: FAILED. 0 passed; 2 failed; 0 ignored`. Non-ignored, head, 3 runs of `cargo test -p victory-shader --locked --lib wave64 -- --test-threads=1 --nocapture`: each `test result: ok. 6 passed; 0 failed; 2 ignored; 0 measured; 300 filtered out`. This includes `guest_lds_dependencies_and_branches` (both sizes: "branch 92 -> 64 (-32 bytes from next PC), all LDS/SMEM producers waited, barrier audited"). The ignore reason now reads "known regression: fails until #2688 is fixed; requires exclusively wave32, Graphics Tools, and DXIL validator". The two existing `wave64_permutes_*` tests print "no pipeline for a wave of 64; skipped" and pass, as before. Control on `main` `63bcca43`: the same ignored command runs 0 tests (they are added by the PR). Negative control: I copied the PR's `wave64_group_tests.rs` and its `mod` line into `main` (without the host.rs/mod.rs changes). It compiled with 0 errors (so there is no compile-error code to report). The two ignored tests on that tree fail identically to the head: UAV 2 thread 0 0 vs 40, UAV 3 thread 0 0 vs 20 (128 mismatches each, canaries intact, no D3D12 messages), and the 64-thread PSO rejection with the same debug-layer message. So on this card the failures come from the main emitter, not from the PR's host changes. Lib suites, `cargo test -p victory-shader --locked --lib -- --test-threads=1`: on both trees the process aborts at `emit::memory_tests::heap_direct_texture_reads_mark_their_heap_index` with 0xC0000005 STATUS_ACCESS_VIOLATION (the crash you mention; it is in `main` too). Re-run with `--skip heap_direct_texture_reads_mark_their_heap_index`, once each: - head: `test result: FAILED. 299 passed; 3 failed; 5 ignored; 0 measured; 1 filtered out; finished in 289.69s` - main: `test result: FAILED. 298 passed; 3 failed; 3 ignored; 0 measured; 1 filtered out; finished in 356.55s` - The same 3 fail on both trees: `stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride`, `stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros`, `synthetic_tests::gathers_at_a_level_match_the_hardware`. The difference (+1 passed, +2 ignored) is exactly the PR's new tests. Changed since `827057a`: the 128-thread case now also reports UAV 3 (0 vs 20) mismatches, where the earlier run listed only UAV 2 (the first mismatch); the 64-thread case is unchanged; the debug layer and GPU-based validation again reported no warnings or errors beyond the PSO one; the ignored tests now run in isolated child processes; one more non-ignored test passes (6 vs 5 in the `wave64` filter). No driver resets. Not run: a (32,64) AMD adapter, so the SKIP path for it is untested here. No game files used. AI-assisted (Claude Code, Claude Sonnet 5.5 ran the tests; Claude Opus 5.5 checked and posted).
Dathinel commented 2026-11-27 02:21:35 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Dathinel on 2026-11-27T02:21:35Z.


The independent-wave fixture also exposed a useful boundary on our RTX 3050 Laptop (4 GB): try 96 threads, where the second guest wave has only its lower 32 lanes. Its second election can have empty EXEC. Seeding the expected lane-0 result with 11 makes it distinguishable from cleared memory. In an instrumented control, substituting 7 for the unwritten upper slot returned 7 instead of 11 at thread 64. The same injection passed after the translator supplied zero for the missing half.

On our fork we also extended the CPU/readback comparison to 256 threads, alternating the elected half across four guest waves and keeping each wave's LDS counter separate. Both cases passed there. This was a synthetic follow-up on a different translator revision, not a rerun of this PR head. 96-thread fixture · Four-wave fixture

Thanks for documenting the explicit guest LDS waits and the isolated validation process in the updated fixture. AI-assisted hardware investigation.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7208053720 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3180#issuecomment-7208053720). Originally posted by [Dathinel](https://github.com/Dathinel) on 2026-11-27T02:21:35Z. --- The independent-wave fixture also exposed a useful boundary on our RTX 3050 Laptop (4 GB): try **96 threads**, where the second guest wave has only its lower 32 lanes. Its second election can have empty EXEC. Seeding the expected lane-0 result with 11 makes it distinguishable from cleared memory. In an instrumented control, substituting 7 for the unwritten upper slot returned 7 instead of 11 at thread 64. The same injection passed after the translator supplied zero for the missing half. On our fork we also extended the CPU/readback comparison to **256 threads**, alternating the elected half across four guest waves and keeping each wave's LDS counter separate. Both cases passed there. This was a synthetic follow-up on a different translator revision, not a rerun of this PR head. [96-thread fixture](https://github.com/Dathinel/victory-4gb/commit/561503d) · [Four-wave fixture](https://github.com/Dathinel/victory-4gb/commit/6622a0c) Thanks for documenting the explicit guest LDS waits and the isolated validation process in the updated fixture. AI-assisted hardware investigation.
kilolimaVI commented 2026-11-27 11:25:09 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by kilolimaVI on 2026-11-27T11:25:09Z.


@carlosmegino confirmed on the (32,64) AMD case you couldn't run: head 1625d1c, Windows 11, AMD Radeon 780M (RDNA3), Graphics Tools installed, toolchain 1.98.1.

cargo test -p victory-shader --lib --locked -- wave64_2688 --ignored --test-threads=1 --nocapture: both tests print SKIP ... requires exclusively wave32; WaveOps=true, lanes=(32, 64), VICTORY_WARP=None and pass (2 passed, 0 failed). Before 1625d1c both panicked at the lane assertion on this card.

AI-assisted (Claude).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7217050790 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3180#issuecomment-7217050790). Originally posted by [kilolimaVI](https://github.com/kilolimaVI) on 2026-11-27T11:25:09Z. --- @carlosmegino confirmed on the (32,64) AMD case you couldn't run: head 1625d1c, Windows 11, AMD Radeon 780M (RDNA3), Graphics Tools installed, toolchain 1.98.1. `cargo test -p victory-shader --lib --locked -- wave64_2688 --ignored --test-threads=1 --nocapture`: both tests print `SKIP ... requires exclusively wave32; WaveOps=true, lanes=(32, 64), VICTORY_WARP=None` and pass (2 passed, 0 failed). Before 1625d1c both panicked at the lane assertion on this card. AI-assisted (Claude).
pickles976 commented 2026-11-27 11:39:30 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by pickles976 on 2026-11-27T11:39:30Z.


@carlosmegino Could you publish/link a fetchable repository + exact commit for the paired-backend control a9ef792f6d516ee6200f4fedeb061a25153d48fd, including its masked-first-lane correction? The commit lookup in your public VIctory repo currently returns “No commit found”; I could not identify a public successful implementation from the linked fixture references. A synthetic-only patch/branch with its base would suffice—no game data needed.

We can verify on Linux/Wine11, RTX4060 Laptop32-lane GPU/16GiB RAM (diagnostic relaxed-vkd3d; not Windows debug-layer certification). Our exact #2633 706c006 admits all52 original builder PSOs, but strict real-GPU lane-loop consumers still fail: #439 control0/160 wrong versus #2633 14/160, including post-loop scalar state in the lane that never entered. Reproduction and source pointer: https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7217164469 . The independent firstlane oracle also exposes a shared scalar reconvergence defect. We are holding title promotion, not treating PSO admission as correctness.

Your legally waited seven-UAV fixture is directly relevant; the unavailable passing backend is the missing piece needed for an independent matched check. The 96/256-thread reports refer to different translator revisions, so I am not treating them as validation of that exact stack.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7217327296 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3180#issuecomment-7217327296). Originally posted by [pickles976](https://github.com/pickles976) on 2026-11-27T11:39:30Z. --- @carlosmegino Could you publish/link a fetchable repository + exact commit for the paired-backend control `a9ef792f6d516ee6200f4fedeb061a25153d48fd`, including its masked-first-lane correction? The commit lookup in your public VIctory repo currently returns “No commit found”; I could not identify a public successful implementation from the linked fixture references. A synthetic-only patch/branch with its base would suffice—no game data needed. We can verify on Linux/Wine11, RTX4060 Laptop32-lane GPU/16GiB RAM (diagnostic relaxed-vkd3d; not Windows debug-layer certification). Our exact #2633 `706c006` admits all52 original builder PSOs, but strict real-GPU lane-loop consumers still fail: #439 control0/160 wrong versus #2633 14/160, including post-loop scalar state in the lane that never entered. Reproduction and source pointer: https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7217164469 . The independent firstlane oracle also exposes a shared scalar reconvergence defect. We are holding title promotion, not treating PSO admission as correctness. Your legally waited seven-UAV fixture is directly relevant; the unavailable passing backend is the missing piece needed for an independent matched check. The 96/256-thread reports refer to different translator revisions, so I am not treating them as validation of that exact stack.
pickles976 commented 2026-11-27 13:57:09 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by pickles976 on 2026-11-27T13:57:09Z.


Wine/RTX 4060 verification at exact head a9ef792f6d516ee6200f4fedeb061a25153d48fd reaches an environment gate before either new GPU oracle can execute.

Configuration: Linux 6.17, Wine 11.0, NVIDIA RTX 4060 Laptop / 590.48.1, vkd3d-proton diagnostic build 2576c0b4adfae4a+, Rust 1.98.1 Windows MSVC target, dxgi.hideNvidiaGpu = False, 9 GiB/512 MiB systemd scope.

  • wave64_write_runtime_fixtures: 1/1 pass; both synthetic containers and CPU references exported.
  • The four ignored victory-shader GPU oracles: 0/4, first failure is D3D12GetDebugInterface → 0x887A002D (DXGI_ERROR_SDK_COMPONENT_MISSING); the shared Once then poisons the other three. No dispatch occurred.
  • wave64_runtime_selects_paired_compute_pipelines with --features diagnostics, VICTORY_D3D12_DEBUG=1, and VICTORY_D3D12_GBV=1: 0/1, fresh compile from this checkout and real RTX/vkd3d device creation, then ID3D12InfoQueue cast fails at line 29 with 0x80004002 (E_NOINTERFACE). No runtime translation/PSO/dispatch/readback occurred.

Evidence:

  • .compat-runtime/logs/verify-pr3180-paired-oracle-ignored-a9ef792-20261127T135427Z/
  • .compat-runtime/logs/verify-pr3180-fixture-export-a9ef792.log
  • .compat-runtime/logs/verify-pr3180-runtime-a9ef792-20261127T135615Z/

This is not a paired-backend correctness failure: the stock Windows Graphics Tools/InfoQueue contract is unavailable in this Wine/vkd3d environment. For cross-platform coverage, please consider keeping the seven-UAV/guard/runtime readback assertions runnable when the info queue is absent, while conditionally adding the no-warning assertion when ID3D12InfoQueue exists. I did not weaken the owner test or run a title from this unverified head.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7220146530 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3180#issuecomment-7220146530). Originally posted by [pickles976](https://github.com/pickles976) on 2026-11-27T13:57:09Z. --- Wine/RTX 4060 verification at exact head `a9ef792f6d516ee6200f4fedeb061a25153d48fd` reaches an environment gate before either new GPU oracle can execute. Configuration: Linux 6.17, Wine 11.0, NVIDIA RTX 4060 Laptop / 590.48.1, vkd3d-proton diagnostic build `2576c0b4adfae4a+`, Rust 1.98.1 Windows MSVC target, `dxgi.hideNvidiaGpu = False`, 9 GiB/512 MiB systemd scope. * `wave64_write_runtime_fixtures`: **1/1 pass**; both synthetic containers and CPU references exported. * The four ignored `victory-shader` GPU oracles: **0/4**, first failure is `D3D12GetDebugInterface` → `0x887A002D` (`DXGI_ERROR_SDK_COMPONENT_MISSING`); the shared `Once` then poisons the other three. No dispatch occurred. * `wave64_runtime_selects_paired_compute_pipelines` with `--features diagnostics`, `VICTORY_D3D12_DEBUG=1`, and `VICTORY_D3D12_GBV=1`: **0/1**, fresh compile from this checkout and real RTX/vkd3d device creation, then `ID3D12InfoQueue` cast fails at line 29 with `0x80004002` (`E_NOINTERFACE`). No runtime translation/PSO/dispatch/readback occurred. Evidence: * `.compat-runtime/logs/verify-pr3180-paired-oracle-ignored-a9ef792-20261127T135427Z/` * `.compat-runtime/logs/verify-pr3180-fixture-export-a9ef792.log` * `.compat-runtime/logs/verify-pr3180-runtime-a9ef792-20261127T135615Z/` This is not a paired-backend correctness failure: the stock Windows Graphics Tools/InfoQueue contract is unavailable in this Wine/vkd3d environment. For cross-platform coverage, please consider keeping the seven-UAV/guard/runtime readback assertions runnable when the info queue is absent, while conditionally adding the no-warning assertion when `ID3D12InfoQueue` exists. I did not weaken the owner test or run a title from this unverified head.
carlosmegino commented 2026-11-27 14:04:21 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by carlosmegino on 2026-11-27T14:04:21Z.


The exact synthetic paired control is now fetchable at carlosmegino/VIctory:codex/repro-paired-a9ef792, pinned to a9ef792f6d516ee6200f4fedeb061a25153d48fd. Exact control

@kilolimaVI, your Radeon 780M result confirms the capability gate on #3180 1625d1c. Could you confirm you can fetch the exact control? The existing GPU oracles require an exclusively Wave32 adapter, so a Radeon 780M skip remains a gate check. @pickles976, I recorded your successful fixture export and the Wine Graphics Tools / InfoQueue blocker separately from execution evidence.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7220297714 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3180#issuecomment-7220297714). Originally posted by [carlosmegino](https://github.com/carlosmegino) on 2026-11-27T14:04:21Z. --- The exact synthetic paired control is now fetchable at `carlosmegino/VIctory:codex/repro-paired-a9ef792`, pinned to `a9ef792f6d516ee6200f4fedeb061a25153d48fd`. [Exact control](https://github.com/carlosmegino/VIctory/commit/a9ef792f6d516ee6200f4fedeb061a25153d48fd) @kilolimaVI, your Radeon 780M result confirms the capability gate on #3180 `1625d1c`. Could you confirm you can fetch the exact control? The existing GPU oracles require an exclusively Wave32 adapter, so a Radeon 780M skip remains a gate check. @pickles976, I recorded your successful fixture export and the Wine Graphics Tools / InfoQueue blocker separately from execution evidence.
carlosmegino commented 2026-11-27 14:29:18 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by carlosmegino on 2026-11-27T14:29:18Z.


@pickles976 @kilolimaVI — the exact paired control is now public and anonymously fetchable. I have not substituted a later backend.

Exact provenance. The port is 842b0cb -> 6ecbbe8 -> 37966d8 -> a9ef792. 6ecbbe8 is a compute-only adaptation of PiloteCode/Pilote Production's GPL-3.0 #854 source 26600c6, preserving the co-author attribution. It contains the masked-first-lane route correction from de64bd5/805a455; the exact selection diff is public. 37966d8 contains the seven-UAV synthetic fixture; a9ef792 adds runtime dispatch/readback beyond PSO creation.

140958f and b3060be are different controls. 140958f228b31243588c36cd2edad09ada6702a2 merges our masked-first-lane correction into PiloteCode's wider fork. It is not the main-based compute-only port; its preference can swallow a paired refusal and fall back. b3060be56a0734ca7eb09b4479949d198656960b is a descendant of 140958f with later partial-group admission and tests. It is now separately fetchable on codex/archive-paired-b3060be, including the 140958f/805a455 history. The guide gives direct diff commands. Dathinel's 96/256 fixtures and later results keep their attribution and revision identity; they are not evidence for exact a9ef792. The later 741aa8e review is not used here.

The companion changes no original a9ef792 file except two appended test-module declarations. Its verification script checks all 194 originals. The legally waited guest() and CPU oracle() from this PR's exact 1625d1c are copied unchanged, with only test API/module/diagnostic adaptations. The original fixtures remain intact too. This is a test-only companion to the exact compiler, not an undocumented compiler replacement.

Linux/Wine commands (use your existing working Wine/vkd3d prefix, LLVM clang/lld, Rust 1.98.1, cargo-xwin and a Windows x64 DXIL validator):

git clone --single-branch --branch codex/repro-paired-a9ef792-kit https://github.com/carlosmegino/VIctory.git victory-a9ef-repro
cd victory-a9ef-repro
git switch --detach 2b5c107606a2d9632973e21b4a26022333730cef
git fetch origin 1625d1c686adc74e986d578b47aa6364b672b8d6
bash tools/verify-paired-repro.sh

rustup target add --toolchain 1.98.1 x86_64-pc-windows-msvc
export CARGO_TARGET_DIR="$PWD/target/paired-repro"
cargo xwin test --target x86_64-pc-windows-msvc --release --locked -p victory-shader --lib --no-run
set -- target/paired-repro/x86_64-pc-windows-msvc/release/deps/victory_shader-*.exe
test "$#" -eq 1
EXE="$1"
DXIL=/absolute/path/to/windows-x64/dxil.dll
export VICTORY_DXIL="$(winepath -w "$DXIL")"
OUT="$PWD/../a9ef-repro-evidence"
bash tools/run-paired-repro.sh "$EXE" "$OUT/contract" --wine --suite contract
bash tools/paired-repro-oracle.sh fetch "$OUT/consumers"
bash tools/run-paired-repro.sh "$EXE" "$OUT/consumers" --wine --suite consumers

--wine explicitly omits Windows Graphics Tools/InfoQueue/GBV, while retaining mandatory DXIL validation, physical-wave metadata, all lane values and canaries. It must not be reported as Windows debug-layer certification. Each selected test runs in a bounded separate process; unexpected SKIP/zero-test/incomplete outputs do not count as validation. No Linux/Wine execution is claimed by me; those are the independent reproduction commands.

New native Windows evidence, RTX 5070 Ti, driver 621.01, lanes (32,32), Rust 1.98.1:

  • The untouched a9ef792 original 64/128 tests both pass (448/896 lane values and 56 canaries per case, no D3D12/GBV warnings/errors).
  • The companion's waited 1625d1c 64/128 fixtures also pass, with physical group sizes 32/64 and required Wave32; the guest wait/branch audit passes.
  • The explicit no-debug 128 path passes on Windows, which is not a Wine/GBV claim.

The scalar findings remain real. On this exact compiler, unchanged #439 consumer instructions give 12/32 wrong in native Wave32/lane20, 0/64 wrong in paired Wave64/lane40 with the ordinary latch, and an emission refusal for the joined EXEC latch. I do not count the refused case as a readback or call this 0/160.

Lyrnc's ten unchanged firstlane_branch inputs all validate/create PSOs/dispatch but differ by 508/10,240 words from the pinned native gfx1036 oracle: 51 in v10 and 457 in v11. The trace shows no instruction EXEC guard on these first-lane sites, so the port's guarded-first-lane preference is bypassed and the ordinary 64-physical-thread form is selected. This is an observation about routing, not a demonstrated scalar-merge fix. The consumer runner intentionally returns failure and preserves the full outputs and independent comparison.

The diagnosis was coordinated under the existing NEW-354 claim on #1633 and with the #2633 owners. I am leaving scalar retention/phi/edge semantics with those owners, including Chippy01's newer claim, rather than opening a competing patch.

AMD exclusion recorded: thank you @kilolimaVI for the Radeon 780M RDNA3 run: at 1625d1c, both tests print SKIP ... WaveOps=true, lanes=(32,64), VICTORY_WARP=None and pass 2/2 instead of panicking. That validates the hardware exclusion path, not paired execution on AMD; this remains your independent hardware evidence.

Policy passes: exact a9ef792 194 files; b3060be 195; companion 200. New Rust files are rustfmt-clean. Clippy on the preserved historical source still reports the original misplaced SAFETY comment at wave64_group_tests.rs:203; no check was disabled and no green whole-tree Clippy/format claim is made. #3180's source head stays 1625d1c.

AI-assisted with OpenAI Codex. Only synthetic inputs/readbacks are in the reproduction material.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7220845274 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3180#issuecomment-7220845274). Originally posted by [carlosmegino](https://github.com/carlosmegino) on 2026-11-27T14:29:18Z. --- @pickles976 @kilolimaVI — the exact paired control is now public and anonymously fetchable. I have not substituted a later backend. - Repository: https://github.com/carlosmegino/VIctory - Exact original control: [a9ef792f6d516ee6200f4fedeb061a25153d48fd](https://github.com/carlosmegino/VIctory/commit/a9ef792f6d516ee6200f4fedeb061a25153d48fd), branch `codex/repro-paired-a9ef792`. - Original main base: [842b0cb76f8f5fa9289bd779783c51ec24d75302](https://github.com/carlosmegino/VIctory/commit/842b0cb76f8f5fa9289bd779783c51ec24d75302). - Test-only companion: [2b5c107606a2d9632973e21b4a26022333730cef](https://github.com/carlosmegino/VIctory/commit/2b5c107606a2d9632973e21b4a26022333730cef), branch `codex/repro-paired-a9ef792-kit`. - [Provenance, full reproduction commands, comparisons and limitations](https://github.com/carlosmegino/VIctory/blob/2b5c107606a2d9632973e21b4a26022333730cef/docs/paired-a9ef-reproduction.md). **Exact provenance.** The port is `842b0cb -> 6ecbbe8 -> 37966d8 -> a9ef792`. `6ecbbe8` is a compute-only adaptation of PiloteCode/Pilote Production's GPL-3.0 #854 source `26600c6`, preserving the co-author attribution. It contains the masked-first-lane route correction from `de64bd5`/`805a455`; [the exact selection diff is public](https://github.com/carlosmegino/VIctory/commit/6ecbbe833f2c5666d320ad4ec35a896b7c82f17a). `37966d8` contains the seven-UAV synthetic fixture; `a9ef792` adds runtime dispatch/readback beyond PSO creation. **140958f and b3060be are different controls.** `140958f228b31243588c36cd2edad09ada6702a2` merges our masked-first-lane correction into PiloteCode's wider fork. It is not the main-based compute-only port; its preference can swallow a paired refusal and fall back. `b3060be56a0734ca7eb09b4479949d198656960b` is a descendant of 140958f with later partial-group admission and tests. It is now separately fetchable on `codex/archive-paired-b3060be`, including the 140958f/805a455 history. The guide gives direct diff commands. Dathinel's 96/256 fixtures and later results keep their attribution and revision identity; they are not evidence for exact a9ef792. The later 741aa8e review is not used here. The companion changes no original a9ef792 file except two appended test-module declarations. Its verification script checks all 194 originals. The legally waited `guest()` and CPU `oracle()` from this PR's exact `1625d1c` are copied unchanged, with only test API/module/diagnostic adaptations. The original fixtures remain intact too. This is a test-only companion to the exact compiler, not an undocumented compiler replacement. **Linux/Wine commands** (use your existing working Wine/vkd3d prefix, LLVM clang/lld, Rust 1.98.1, cargo-xwin and a Windows x64 DXIL validator): ```sh git clone --single-branch --branch codex/repro-paired-a9ef792-kit https://github.com/carlosmegino/VIctory.git victory-a9ef-repro cd victory-a9ef-repro git switch --detach 2b5c107606a2d9632973e21b4a26022333730cef git fetch origin 1625d1c686adc74e986d578b47aa6364b672b8d6 bash tools/verify-paired-repro.sh rustup target add --toolchain 1.98.1 x86_64-pc-windows-msvc export CARGO_TARGET_DIR="$PWD/target/paired-repro" cargo xwin test --target x86_64-pc-windows-msvc --release --locked -p victory-shader --lib --no-run set -- target/paired-repro/x86_64-pc-windows-msvc/release/deps/victory_shader-*.exe test "$#" -eq 1 EXE="$1" DXIL=/absolute/path/to/windows-x64/dxil.dll export VICTORY_DXIL="$(winepath -w "$DXIL")" OUT="$PWD/../a9ef-repro-evidence" bash tools/run-paired-repro.sh "$EXE" "$OUT/contract" --wine --suite contract bash tools/paired-repro-oracle.sh fetch "$OUT/consumers" bash tools/run-paired-repro.sh "$EXE" "$OUT/consumers" --wine --suite consumers ``` `--wine` explicitly omits Windows Graphics Tools/InfoQueue/GBV, while retaining mandatory DXIL validation, physical-wave metadata, all lane values and canaries. It must not be reported as Windows debug-layer certification. Each selected test runs in a bounded separate process; unexpected SKIP/zero-test/incomplete outputs do not count as validation. No Linux/Wine execution is claimed by me; those are the independent reproduction commands. **New native Windows evidence**, RTX 5070 Ti, driver 621.01, lanes (32,32), Rust 1.98.1: - The untouched a9ef792 original 64/128 tests both pass (448/896 lane values and 56 canaries per case, no D3D12/GBV warnings/errors). - The companion's waited 1625d1c 64/128 fixtures also pass, with physical group sizes 32/64 and required Wave32; the guest wait/branch audit passes. - The explicit no-debug 128 path passes on Windows, which is not a Wine/GBV claim. **The scalar findings remain real.** On this exact compiler, unchanged #439 consumer instructions give 12/32 wrong in native Wave32/lane20, 0/64 wrong in paired Wave64/lane40 with the ordinary latch, and an emission refusal for the joined EXEC latch. I do not count the refused case as a readback or call this 0/160. Lyrnc's ten unchanged `firstlane_branch` inputs all validate/create PSOs/dispatch but differ by **508/10,240 words** from the pinned native gfx1036 oracle: 51 in v10 and 457 in v11. The trace shows no instruction EXEC guard on these first-lane sites, so the port's guarded-first-lane preference is bypassed and the ordinary 64-physical-thread form is selected. This is an observation about routing, not a demonstrated scalar-merge fix. The consumer runner intentionally returns failure and preserves the full outputs and independent comparison. The diagnosis was coordinated under the existing NEW-354 claim [on #1633](https://github.com/Marvisak/VIctory/issues/1633#issuecomment-7219530760) and [with the #2633 owners](https://github.com/Marvisak/VIctory/pull/2633#issuecomment-7219531743). I am leaving scalar retention/phi/edge semantics with those owners, including Chippy01's newer claim, rather than opening a competing patch. **AMD exclusion recorded:** thank you @kilolimaVI for [the Radeon 780M RDNA3 run](https://github.com/Marvisak/VIctory/pull/3180#issuecomment-7217050790): at 1625d1c, both tests print `SKIP ... WaveOps=true, lanes=(32,64), VICTORY_WARP=None` and pass 2/2 instead of panicking. That validates the hardware exclusion path, not paired execution on AMD; this remains your independent hardware evidence. Policy passes: exact a9ef792 194 files; b3060be 195; companion 200. New Rust files are rustfmt-clean. Clippy on the preserved historical source still reports the original misplaced SAFETY comment at `wave64_group_tests.rs:203`; no check was disabled and no green whole-tree Clippy/format claim is made. #3180's source head stays 1625d1c. AI-assisted with OpenAI Codex. Only synthetic inputs/readbacks are in the reproduction material.
kilolimaVI commented 2026-11-27 15:43:46 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by kilolimaVI on 2026-11-27T15:43:46Z.


@carlosmegino confirmed: anonymous fetch from https://github.com/carlosmegino/VIctory gives codex/repro-paired-a9ef792 = a9ef792, codex/repro-paired-a9ef792-kit = 2b5c107, and 842b0cb is an ancestor of a9ef792.

For completeness, on native Windows 11 with Graphics Tools (Radeon 780M, lanes (32,64)), cargo test -p victory-shader --lib --locked -- wave64 --ignored --nocapture --test-threads=1 at a9ef792 stops at the gates before any dispatch: wave64_auto_group_64, _128 and _128_with_xyz_ids at the (32, 32) assertion (wave64_group_tests.rs:212), wave64_native_compute_controls at wave32_only (:341), and wave64_write_runtime_fixtures wants VICTORY_TEST_WAVE64_DIR. So, as you say, this AMD host gives exclusion evidence only, not paired execution; 1625d1c's SKIP path is the right behaviour here.

AI-assisted (Claude).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7222410286 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3180#issuecomment-7222410286). Originally posted by [kilolimaVI](https://github.com/kilolimaVI) on 2026-11-27T15:43:46Z. --- @carlosmegino confirmed: anonymous fetch from https://github.com/carlosmegino/VIctory gives `codex/repro-paired-a9ef792` = a9ef792, `codex/repro-paired-a9ef792-kit` = 2b5c107, and 842b0cb is an ancestor of a9ef792. For completeness, on native Windows 11 with Graphics Tools (Radeon 780M, lanes (32,64)), `cargo test -p victory-shader --lib --locked -- wave64 --ignored --nocapture --test-threads=1` at a9ef792 stops at the gates before any dispatch: `wave64_auto_group_64`, `_128` and `_128_with_xyz_ids` at the `(32, 32)` assertion (`wave64_group_tests.rs:212`), `wave64_native_compute_controls` at `wave32_only` (`:341`), and `wave64_write_runtime_fixtures` wants `VICTORY_TEST_WAVE64_DIR`. So, as you say, this AMD host gives exclusion evidence only, not paired execution; 1625d1c's SKIP path is the right behaviour here. AI-assisted (Claude).
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/3180:upstream-pr/3180'
git switch 'upstream-pr/3180'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/3180'
git switch 'upstream-pr/3180'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/3180'
git switch 'upstream-pr/3180'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/3180'
git switch 'main'
git merge --squash 'upstream-pr/3180'
git switch 'main'
git merge --ff-only 'upstream-pr/3180'
git switch 'main'
git merge 'upstream-pr/3180'
git push origin 'main'
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
Marvisak/VIctory!3178
No description provided.