Shader tests: serialize remaining Host::new tests with ONE_AT_A_TIME (#1882) #2017

Closed
DenRakEiw wants to merge 1 commit from upstream-pr/2019 into main
DenRakEiw commented 2026-11-25 03:14:11 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by DenRakEiw on 2026-11-25T03:14:11Z.


Related to #1882 (extending the shared ONE_AT_A_TIME lock rationale from #433 and @fiestorra's #1892).

Every other GPU test module in crates/victory-shader/src/emit/ (valu_tests, memory_tests, flow_tests, bvh_tests, semantics_tests, stride_tests, synthetic_tests, waterfall_tests) serializes Host::new / D3D12+WARP execution via valu_tests::ONE_AT_A_TIME, except for:

  • crates/victory-shader/src/emit/diff_tests.rs (all 5 Host::new call sites)
  • crates/victory-shader/src/emit/mod.rs (stub_pipeline_is_created)
  • crates/victory-shader/src/emit/rect.rs (rectangles_get_their_fourth_corner)

Taking ONE_AT_A_TIME in these remaining GPU test call sites ensures no two victory-shader tests create or drive D3D12/WARP devices concurrently during parallel cargo test --workspace runs. (Kept as Related to #1882 so #1882 remains open until the specific intermittent bitmap failure is reproduced/confirmed resolved.)

Verified locally on Windows 11 x64 (NVIDIA GeForce RTX 5090 + WARP, Rust 1.98.1 MSVC):

  • cargo test -p victory-shader --lib emit::diff_tests:: — 5 passed, 0 failed
  • cargo test -p victory-shader --lib stub_pipeline_is_created — 1 passed, 0 failed
  • cargo test -p victory-shader --lib emit::rect:: — 1 passed, 0 failed
  • cargo test -p victory-shader --lib emit::memory_tests:: — 3 passed, 0 failed
  • cargo clippy -p victory-shader --all-targets — 0 warnings
  • cargo xtask policy — ok (183 files ok)

AI-assisted (Gemini 4 Neon).

<!-- greyfinch-sync:Marvisak/VIctory:issue:6596351493 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2019). Originally posted by [DenRakEiw](https://github.com/DenRakEiw) on 2026-11-25T03:14:11Z. --- Related to #1882 (extending the shared `ONE_AT_A_TIME` lock rationale from #433 and @fiestorra's #1892). Every other GPU test module in `crates/victory-shader/src/emit/` (`valu_tests`, `memory_tests`, `flow_tests`, `bvh_tests`, `semantics_tests`, `stride_tests`, `synthetic_tests`, `waterfall_tests`) serializes `Host::new` / D3D12+WARP execution via `valu_tests::ONE_AT_A_TIME`, except for: - `crates/victory-shader/src/emit/diff_tests.rs` (all 5 `Host::new` call sites) - `crates/victory-shader/src/emit/mod.rs` (`stub_pipeline_is_created`) - `crates/victory-shader/src/emit/rect.rs` (`rectangles_get_their_fourth_corner`) Taking `ONE_AT_A_TIME` in these remaining GPU test call sites ensures no two `victory-shader` tests create or drive D3D12/WARP devices concurrently during parallel `cargo test --workspace` runs. (Kept as `Related to #1882` so #1882 remains open until the specific intermittent bitmap failure is reproduced/confirmed resolved.) Verified locally on Windows 11 x64 (NVIDIA GeForce RTX 5090 + WARP, Rust 1.98.1 MSVC): - `cargo test -p victory-shader --lib emit::diff_tests::` — 5 passed, 0 failed - `cargo test -p victory-shader --lib stub_pipeline_is_created` — 1 passed, 0 failed - `cargo test -p victory-shader --lib emit::rect::` — 1 passed, 0 failed - `cargo test -p victory-shader --lib emit::memory_tests::` — 3 passed, 0 failed - `cargo clippy -p victory-shader --all-targets` — 0 warnings - `cargo xtask policy` — ok (`183 files ok`) AI-assisted (Gemini 4 Neon).
catminou4 commented 2026-11-25 04:06:31 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-25T03:34:31Z.

Review: APPROVED


Tested locally: macOS arm64, rustc 1.98.1, PR head merged into main 940d32f69b, cargo test -p victory-shader --locked.

144 passed / 0 failed. Remaining Host::new tests serialized with ONE_AT_A_TIME — fixes the flaky parallel-host-init class; same theme as #1892's shared lock (GPU side).

<!-- greyfinch-sync:Marvisak/VIctory:review:6051470289 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2019#pullrequestreview-6051470289). Originally posted by [catminou4](https://github.com/catminou4) on 2026-11-25T03:34:31Z. **Review:** APPROVED --- Tested locally: macOS arm64, rustc 1.98.1, PR head merged into main 940d32f69b, `cargo test -p victory-shader --locked`. 144 passed / 0 failed. Remaining Host::new tests serialized with ONE_AT_A_TIME — fixes the flaky parallel-host-init class; same theme as #1892's shared lock (GPU side).
jeremygold02 commented 2026-11-25 04:06:53 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by jeremygold02 on 2026-11-25T03:28:14Z.


Triage verdict — Keep the broader test hardening; leave the flake open (2ce000e)

Evidence

  • #1892 by @fiestorra and this PR serialize the same three compiler-dependent differential tests. This PR also covers the other two differential host sites, the stub pipeline, and the rectangle test. It extends the shared lock from merged #433. #1991’s device capability checks are separate.

Checks and limits

  • The exact-head Windows check passed, and the author reports focused passes. Those results do not establish which tests caused the intermittent bitmap failure in #1882. Existing parallel controls did not reproduce it. I reviewed source and published checks without rerunning locally.

Next step

  • Prefer this broader lock coverage over merging both lock patches. Preserve #1892’s useful rationale for the shared lock and contributor credit, while treating the explanation for #1882 as a hypothesis. Keep #1882 open pending evidence from the affected parallel configuration.

This verification was AI-assisted.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7151943813 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2019#issuecomment-7151943813). Originally posted by [jeremygold02](https://github.com/jeremygold02) on 2026-11-25T03:28:14Z. --- **Triage verdict — Keep the broader test hardening; leave the flake open** (`2ce000e`) **Evidence** - #1892 by @fiestorra and this PR serialize the same three compiler-dependent differential tests. This PR also covers the other two differential host sites, the stub pipeline, and the rectangle test. It extends the shared lock from merged #433. #1991’s device capability checks are separate. **Checks and limits** - The [exact-head Windows check](https://github.com/Marvisak/VIctory/actions/runs/45538560987/job/138951128066) passed, and the author reports focused passes. Those results do not establish which tests caused the intermittent bitmap failure in #1882. [Existing parallel controls](https://github.com/Marvisak/VIctory/issues/1882#issuecomment-7149527992) did not reproduce it. I reviewed source and published checks without rerunning locally. **Next step** - Prefer this broader lock coverage over merging both lock patches. Preserve #1892’s useful rationale for the shared lock and contributor credit, while treating the explanation for #1882 as a hypothesis. Keep #1882 open pending evidence from the affected parallel configuration. This verification was AI-assisted.
Calvix2k commented 2026-11-25 04:07:01 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Calvix2k on 2026-11-25T03:40:38Z.


Verified on Windows 10 19045 (RX 7800 XT), your head 2ce000e plus the "skip the GPU suites a device cannot run" patch from #1991 (this host reports SM 6.5, so the probes would otherwise fail for an unrelated reason):

cargo test -p victory-shader --lib — 247 passed, 0 failed, 3 ignored, including the three tests you moved under ONE_AT_A_TIME (diff_tests, rect, stub_pipeline_is_created). The serialisation is the right fix for the shared-device flakiness; nothing else in the suite changed behavior.

One note: rect and stub_pipeline_is_created skip here (no SM 6.6 device), so the lock ordering is only exercised on a machine like CI's. If the intent is to cover them on ordinary hosts too, #1991's skip lands them as skips rather than silent passes.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7152139898 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2019#issuecomment-7152139898). Originally posted by [Calvix2k](https://github.com/Calvix2k) on 2026-11-25T03:40:38Z. --- Verified on Windows 10 19045 (RX 7800 XT), your head `2ce000e` plus the "skip the GPU suites a device cannot run" patch from #1991 (this host reports SM 6.5, so the probes would otherwise fail for an unrelated reason): `cargo test -p victory-shader --lib` — **247 passed, 0 failed, 3 ignored**, including the three tests you moved under `ONE_AT_A_TIME` (`diff_tests`, `rect`, `stub_pipeline_is_created`). The serialisation is the right fix for the shared-device flakiness; nothing else in the suite changed behavior. One note: `rect` and `stub_pipeline_is_created` skip here (no SM 6.6 device), so the lock ordering is only exercised on a machine like CI's. If the intent is to cover them on ordinary hosts too, #1991's skip lands them as skips rather than silent passes.
Marvisak commented 2026-11-25 10:07:34 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T09:17:25Z.


Automated triage for the maintainers.

This pull request no longer merges cleanly into main (conflicts in crates/victory-shader/src/emit/rect.rs). It will be reviewed once it is rebased onto the current main. The earlier verdict (merge-candidate) was for an older state of main.


Generated by Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:comment:7158130887 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2019#issuecomment-7158130887). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T09:17:25Z. --- <!-- victory-triage v1 head=2ce000eb727b554937b391dceea768ccdb270598 verdict=needs-rebase at=2026-11-25T15:52:33Z --> Automated triage for the maintainers. This pull request no longer merges cleanly into `main` (conflicts in `crates/victory-shader/src/emit/rect.rs`). It will be reviewed once it is rebased onto the current `main`. The earlier verdict (merge-candidate) was for an older state of `main`. --- _Generated by [Claude Code](https://claude.ai/code)_
sinan-cmyk commented 2026-11-25 10:07:50 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by sinan-cmyk on 2026-11-25T09:50:57Z.


Offline measurement on a retail dump

Result: no count change against main.

I merged head 2ce000eb onto main 940d32f (clean merge) and ran victory translate --validate --list on shaders.rpf (1.0.2.1), with dxil.dll 1.8.2502.11. I compared the result with main program by program (25,889 programs). Validated: 23,918 on main, 23,918 with this PR.

No program changes its failure reason. The count shows that the change rejects nothing on this data. It does not show whether the output is right.

No shader names or data are included, per the asset policy. AI-assisted (Claude Code).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7158883014 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2019#issuecomment-7158883014). Originally posted by [sinan-cmyk](https://github.com/sinan-cmyk) on 2026-11-25T09:50:57Z. --- ### Offline measurement on a retail dump **Result: no count change against `main`.** I merged head 2ce000eb onto `main` 940d32f (clean merge) and ran `victory translate --validate --list` on `shaders.rpf` (1.0.2.1), with dxil.dll 1.8.2502.11. I compared the result with `main` program by program (25,889 programs). Validated: 23,918 on `main`, 23,918 with this PR. No program changes its failure reason. The count shows that the change rejects nothing on this data. It does not show whether the output is right. No shader names or data are included, per the asset policy. AI-assisted (Claude Code).
upstream-sync closed this pull request 2026-11-26 01:02:43 +00:00
DenRakEiw commented 2026-11-26 01:04:17 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by DenRakEiw on 2026-11-26T00:53:53Z.


Closing this PR — stepping back from code contributions on this account. Feel free to reuse the approach if helpful.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7179224876 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2019#issuecomment-7179224876). Originally posted by [DenRakEiw](https://github.com/DenRakEiw) on 2026-11-26T00:53:53Z. --- Closing this PR — stepping back from code contributions on this account. Feel free to reuse the approach if helpful.

Pull request closed

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!2017
No description provided.