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

Closed
github-bot wants to merge 1 commit from gh-pr/2019/head into gh-pr/2019/base
Owner

@⁠DenRakEiw on GitHub · 2026-11-25 03:14 UTC · original
fix/diff-tests-gpu-lock → main · +12 −0 · 3 files · 1 commits · closed without merging

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

**@⁠DenRakEiw** on GitHub · 2026-11-25 03:14 UTC · [original](https://github.com/Marvisak/VIctory/pull/2019) `fix/diff-tests-gpu-lock` → `main` · +12 −0 · 3 files · 1 commits · closed without merging 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).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:51:47 +00:00
github-bot closed this pull request 2026-11-26 04:51:47 +00:00
Author
Owner

@⁠jeremygold02 on GitHub · 2026-11-25 03:28 UTC · original

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.

**@⁠jeremygold02** on GitHub · 2026-11-25 03:28 UTC · [original](https://github.com/Marvisak/VIctory/pull/2019#issuecomment-7151943813) **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://git.gtahub.st/github/Marvisak--VIctory/issues/1882) 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.
Author
Owner

@⁠Calvix2k on GitHub · 2026-11-25 03:40 UTC · original

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.

**@⁠Calvix2k** on GitHub · 2026-11-25 03:40 UTC · [original](https://github.com/Marvisak/VIctory/pull/2019#issuecomment-7152139898) 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.
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 09:17 UTC · original · edited 2026-11-25 15:52 UTC

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

**@⁠Marvisak** on GitHub · 2026-11-25 09:17 UTC · [original](https://github.com/Marvisak/VIctory/pull/2019#issuecomment-7158130887) · edited 2026-11-25 15:52 UTC <!-- 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)_
Author
Owner

@⁠sinan-cmyk on GitHub · 2026-11-25 09:50 UTC · original

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

**@⁠sinan-cmyk** on GitHub · 2026-11-25 09:50 UTC · [original](https://github.com/Marvisak/VIctory/pull/2019#issuecomment-7158883014) ### 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).
Author
Owner

@⁠DenRakEiw on GitHub · 2026-11-26 00:53 UTC · original

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

**@⁠DenRakEiw** on GitHub · 2026-11-26 00:53 UTC · [original](https://github.com/Marvisak/VIctory/pull/2019#issuecomment-7179224876) Closing this PR — stepping back from code contributions on this account. Feel free to reuse the approach if helpful.

Pull request closed

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/Marvisak--VIctory!2019
No description provided.