Shaders: honor WARP-only mode in paired tests #2225

Open
github-bot wants to merge 3 commits from github-bot/gh-2225 into main AGit
Owner

@⁠andrewpozdnakov7-jpg on GitHub · 2026-11-25 08:20 UTC · original
andrewpozdnakov7-jpg:test/honor-warp-only-in-shader-tests → main · +53 −36 · 12 files · 3 commits · open

Change

Paired shader tests now use one adapter selector. With VICTORY_WARP=1, they run the WARP case once. Without the override, they keep both cases and try the hardware adapter first.

Previously the hardware case created WARP when the override was set. The explicit-LOD gather test then used WARP's native gather as its hardware reference, even though the test already accounts for the different rounding on WARP.

Verification

Same gather fixture on 940d32f69b22265690a0b5a15d6ded572ba33baf, with WARP forced. Before, the hardware comparison failed at lane 4. After, WARP executes and both translated gather paths match the expected footprint for all 32 records.

Full shader suite: 244 passed / 3 failed / 3 ignored before, 245 passed / 2 failed / 3 ignored after. The pre-existing lane-permute and edge-flagged mesh tests still fail on this WARP runtime. Strict shader Clippy and staged asset policy passed.

AI-assisted with Codex.

**@⁠andrewpozdnakov7-jpg** on GitHub · 2026-11-25 08:20 UTC · [original](https://github.com/Marvisak/VIctory/pull/2225) `andrewpozdnakov7-jpg:test/honor-warp-only-in-shader-tests` → `main` · +53 −36 · 12 files · 3 commits · open ## Change Paired shader tests now use one adapter selector. With `VICTORY_WARP=1`, they run the WARP case once. Without the override, they keep both cases and try the hardware adapter first. Previously the hardware case created WARP when the override was set. The explicit-LOD gather test then used WARP's native gather as its hardware reference, even though the test already accounts for the different rounding on WARP. ## Verification Same gather fixture on `940d32f69b22265690a0b5a15d6ded572ba33baf`, with WARP forced. Before, the hardware comparison failed at lane 4. After, WARP executes and both translated gather paths match the expected footprint for all 32 records. Full shader suite: 244 passed / 3 failed / 3 ignored before, 245 passed / 2 failed / 3 ignored after. The pre-existing lane-permute and edge-flagged mesh tests still fail on this WARP runtime. Strict shader Clippy and staged asset policy passed. AI-assisted with Codex.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:59:01 +00:00
Author
Owner

@⁠andrewpozdnakov7-jpg on GitHub · 2026-11-25 08:27 UTC · original · edited 2026-11-25 08:31 UTC

I checked the remaining lane-permute failure separately. Native DXC HLSL with [WaveSize(32)] and WaveReadLaneAt(1000 + lane, (13 * lane + 5) & 31) reproduces it in the app-local WARP 1.0.22 / Agility 1.620.2 setup. All 32 variable-index reads differed from the expected lane. For example, the request for lane 5 returned 1017 instead of 1005. Applying the same ballot mask produced the same 32 output words as the translated fixture.

A native constant-index broadcast of lane 5 returned 1005, and selecting among 32 constant-index broadcasts returned the expected result for every lane. This isolates the remaining failure to the variable-index WARP shuffle seen by the existing test.

If you reuse the test changes or the native control in another commit, please preserve the original Git author. If you fold them into your own commit, please add:

Co-authored-by: andrewpozdnakov7-jpg [email protected]

**@⁠andrewpozdnakov7-jpg** on GitHub · 2026-11-25 08:27 UTC · [original](https://github.com/Marvisak/VIctory/pull/2225#issuecomment-7157044248) · edited 2026-11-25 08:31 UTC I checked the remaining lane-permute failure separately. Native DXC HLSL with `[WaveSize(32)]` and `WaveReadLaneAt(1000 + lane, (13 * lane + 5) & 31)` reproduces it in the app-local WARP 1.0.22 / Agility 1.620.2 setup. All 32 variable-index reads differed from the expected lane. For example, the request for lane 5 returned 1017 instead of 1005. Applying the same ballot mask produced the same 32 output words as the translated fixture. A native constant-index broadcast of lane 5 returned 1005, and selecting among 32 constant-index broadcasts returned the expected result for every lane. This isolates the remaining failure to the variable-index WARP shuffle seen by the existing test. If you reuse the test changes or the native control in another commit, please preserve the original Git author. If you fold them into your own commit, please add: Co-authored-by: andrewpozdnakov7-jpg <[email protected]>
Author
Owner

@⁠kotekompotek on GitHub · 2026-11-25 09:21 UTC · original

Checked the env semantics: warp_forced() matches Host::new exactly (v == "1"), so the selector can't diverge — new(false) under VICTORY_WARP=1 does build a second WARP device, making the "hardware" arm run WARP against WARP. Filtering that arm out is the right fix, and routing every paired test through one test_backends() keeps the policy in one place.

**@⁠kotekompotek** on GitHub · 2026-11-25 09:21 UTC · [original](https://github.com/Marvisak/VIctory/pull/2225#issuecomment-7158227985) Checked the env semantics: `warp_forced()` matches `Host::new` exactly (`v == "1"`), so the selector can't diverge — `new(false)` under `VICTORY_WARP=1` does build a second WARP device, making the "hardware" arm run WARP against WARP. Filtering that arm out is the right fix, and routing every paired test through one `test_backends()` keeps the policy in one place.
Author
Owner

@⁠sinan-cmyk on GitHub · 2026-11-25 10:43 UTC · original

Offline measurement on a retail dump

Result: no count change against main.

I merged head b3a68698 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 10:43 UTC · [original](https://github.com/Marvisak/VIctory/pull/2225#issuecomment-7160076484) ### Offline measurement on a retail dump **Result: no count change against `main`.** I merged head b3a68698 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

@⁠Marvisak on GitHub · 2026-11-25 13:30 UTC · original · edited 2026-11-26 04:22 UTC

Automated triage for the maintainers.

Merge candidate. Thanks for the follow-up. d239815 switches the paired-backend loops main gained to Host::test_backends() (crosslane, memory, stride, synthetic, VALU, waterfall, BVH, diff, flow and mod tests, check in semantics_tests.rs, and the FMad probe); merged with main, the literal [("hardware", false), ("warp", true)] now appears only inside test_backends (emit/host.rs), and warp_forced() is shared with Host::new, so VICTORY_WARP=1 no longer runs WARP under the "hardware" label.

CI: passing.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 13:30 UTC · [original](https://github.com/Marvisak/VIctory/pull/2225#issuecomment-7163873366) · edited 2026-11-26 04:22 UTC <!-- victory-triage v1 head=d23981587aacc1fe0d90fbe0378584a13e37dcba verdict=merge-candidate at=2026-11-26T04:22:40Z --> Automated triage for the maintainers. **Merge candidate.** Thanks for the follow-up. `d239815` switches the paired-backend loops `main` gained to `Host::test_backends()` (crosslane, memory, stride, synthetic, VALU, waterfall, BVH, diff, flow and mod tests, `check` in `semantics_tests.rs`, and the FMad probe); merged with `main`, the literal `[("hardware", false), ("warp", true)]` now appears only inside `test_backends` (`emit/host.rs`), and `warp_forced()` is shared with `Host::new`, so `VICTORY_WARP=1` no longer runs WARP under the "hardware" label. CI: passing. --- _Generated by [Claude Code](https://claude.ai/code)_
Author
Owner

@⁠andrewpozdnakov7-jpg on GitHub · 2026-11-25 21:47 UTC · original

I resolved the emit/host.rs merge conflict introduced by #244 in cd5f91f. The branch keeps the original authored commit b3a6869 and the shared WARP device and lock from upstream.

With VICTORY_WARP=1, the same gather fixture fails on 61bfc77 in the hardware-labelled lane 4 comparison in six runs. It passes on cd5f91f in all six. The serial shader suite moved from 271 passed / 5 failed / 3 ignored to 273 passed / 3 failed / 3 ignored. The remaining failures were present on the same upstream base: two WARP lane-permute cases and the edge-flagged triangle case. Strict shader Clippy with and without host support and asset policy passed.

Please preserve the Git author if moving the test changes. If they are folded into another commit, please retain this trailer.

Co-authored-by: andrewpozdnakov7-jpg [email protected]

AI-assisted with Codex. Synthetic shader fixtures on Windows/WARP.

**@⁠andrewpozdnakov7-jpg** on GitHub · 2026-11-25 21:47 UTC · [original](https://github.com/Marvisak/VIctory/pull/2225#issuecomment-7175539738) I resolved the `emit/host.rs` merge conflict introduced by #244 in [cd5f91f](https://github.com/andrewpozdnakov7-jpg/VIctory/commit/cd5f91f014748d80bb84399a6110b31754c5e744). The branch keeps the original authored commit `b3a6869` and the shared WARP device and lock from upstream. With `VICTORY_WARP=1`, the same gather fixture fails on `61bfc77` in the hardware-labelled lane 4 comparison in six runs. It passes on `cd5f91f` in all six. The serial shader suite moved from 271 passed / 5 failed / 3 ignored to 273 passed / 3 failed / 3 ignored. The remaining failures were present on the same upstream base: two WARP lane-permute cases and the edge-flagged triangle case. Strict shader Clippy with and without host support and asset policy passed. Please preserve the Git author if moving the test changes. If they are folded into another commit, please retain this trailer. Co-authored-by: andrewpozdnakov7-jpg <[email protected]> AI-assisted with Codex. Synthetic shader fixtures on Windows/WARP.
Author
Owner

@⁠andrewpozdnakov7-jpg on GitHub · 2026-11-26 03:09 UTC · original

I checked how this branch composes with #2997. The exact #2225 head cd5f91f and #2997 head 92bfec2 merge cleanly on upstream 63bcca4.

Using the same app-local WARP, DXIL validator configuration, and serial shader test command, #2997 alone gives 300 passed, 2 failed, and 3 ignored. The combination gives 301 passed, 1 failed, and 3 ignored. The explicit-LOD gather test is the added pass, and both permutation checks still pass. The existing edge-flagged mesh triangle test reports 0 of 256 lit pixels on both trees with this WARP build.

Please keep my Git author if you move the paired-backend fix. If you fold it into another commit, please include:

Co-authored-by: andrewpozdnakov7-jpg [email protected]

AI-assisted with Codex. Synthetic shader fixtures.

**@⁠andrewpozdnakov7-jpg** on GitHub · 2026-11-26 03:09 UTC · [original](https://github.com/Marvisak/VIctory/pull/2225#issuecomment-7181449643) I checked how this branch composes with #2997. The exact #2225 head `cd5f91f` and #2997 head `92bfec2` merge cleanly on upstream `63bcca4`. Using the same app-local WARP, DXIL validator configuration, and serial shader test command, #2997 alone gives 300 passed, 2 failed, and 3 ignored. The combination gives 301 passed, 1 failed, and 3 ignored. The explicit-LOD gather test is the added pass, and both permutation checks still pass. The existing edge-flagged mesh triangle test reports 0 of 256 lit pixels on both trees with this WARP build. Please keep my Git author if you move the paired-backend fix. If you fold it into another commit, please include: Co-authored-by: andrewpozdnakov7-jpg <[email protected]> AI-assisted with Codex. Synthetic shader fixtures.
Author
Owner

@⁠andrewpozdnakov7-jpg on GitHub · 2026-11-26 03:53 UTC · original

I merged current main 63bcca4 into d239815. I switched the eight remaining paired loops in crosslane, memory, stride, and synthetic tests to Host::test_backends(). Both VALU loops named in the review use the helper on the merged tree. The FMad probe now uses the same helper so forced WARP cannot run under its hardware label either.

With VICTORY_WARP=1 on Windows, the D16 probe requested two hardware-labelled cases plus two WARP cases before and only the two WARP cases after. The FMad probe went from one case with each label to one WARP case. With the override unset, both probes still attempt both backends. The serial app-local WARP run moved from 298 passed / 4 failed / 3 ignored to 299 passed / 3 failed / 3 ignored. The divergent lane-permute test now passes. The two remaining lane-permute failures and the edge-flagged triangle failure were present on the input tree. Strict shader Clippy and asset policy passed.

Please preserve my Git author if you move these test changes. If you fold them into another commit, please include:

Co-authored-by: andrewpozdnakov7-jpg [email protected]

AI-assisted with Codex. Synthetic Windows/WARP tests.

**@⁠andrewpozdnakov7-jpg** on GitHub · 2026-11-26 03:53 UTC · [original](https://github.com/Marvisak/VIctory/pull/2225#issuecomment-7182108467) I merged current main `63bcca4` into [d239815](https://github.com/andrewpozdnakov7-jpg/VIctory/commit/d23981587aacc1fe0d90fbe0378584a13e37dcba). I switched the eight remaining paired loops in crosslane, memory, stride, and synthetic tests to `Host::test_backends()`. Both VALU loops named in the review use the helper on the merged tree. The FMad probe now uses the same helper so forced WARP cannot run under its hardware label either. With VICTORY_WARP=1 on Windows, the D16 probe requested two hardware-labelled cases plus two WARP cases before and only the two WARP cases after. The FMad probe went from one case with each label to one WARP case. With the override unset, both probes still attempt both backends. The serial app-local WARP run moved from 298 passed / 4 failed / 3 ignored to 299 passed / 3 failed / 3 ignored. The divergent lane-permute test now passes. The two remaining lane-permute failures and the edge-flagged triangle failure were present on the input tree. Strict shader Clippy and asset policy passed. Please preserve my Git author if you move these test changes. If you fold them into another commit, please include: Co-authored-by: andrewpozdnakov7-jpg <[email protected]> AI-assisted with Codex. Synthetic Windows/WARP tests.
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2225/head:github-bot/gh-2225'
git switch 'github-bot/gh-2225'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2225'
git switch 'github-bot/gh-2225'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2225'
git switch 'github-bot/gh-2225'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2225'
git switch 'main'
git merge --squash 'github-bot/gh-2225'
git switch 'main'
git merge --ff-only 'github-bot/gh-2225'
git switch 'main'
git merge 'github-bot/gh-2225'
git push origin 'main'
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!2225
No description provided.