Shaders: honor WARP-only mode in paired tests #2225
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!2225
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2225"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@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 · openChange
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:27 UTC · original · edited 2026-11-25 08:31 UTC
I checked the remaining lane-permute failure separately. Native DXC HLSL with
[WaveSize(32)]andWaveReadLaneAt(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]
@kotekompotek on GitHub · 2026-11-25 09:21 UTC · original
Checked the env semantics:
warp_forced()matchesHost::newexactly (v == "1"), so the selector can't diverge —new(false)underVICTORY_WARP=1does 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 onetest_backends()keeps the policy in one place.@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
b3a68698ontomain940d32f(clean merge) and ranvictory translate --validate --listonshaders.rpf(1.0.2.1), with dxil.dll 1.8.2502.11. I compared the result withmainprogram by program (25,889 programs). Validated: 23,918 onmain, 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).
@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.
d239815switches the paired-backend loopsmaingained toHost::test_backends()(crosslane, memory, stride, synthetic, VALU, waterfall, BVH, diff, flow and mod tests,checkinsemantics_tests.rs, and the FMad probe); merged withmain, the literal[("hardware", false), ("warp", true)]now appears only insidetest_backends(emit/host.rs), andwarp_forced()is shared withHost::new, soVICTORY_WARP=1no longer runs WARP under the "hardware" label.CI: passing.
Generated by Claude Code
@andrewpozdnakov7-jpg on GitHub · 2026-11-25 21:47 UTC · original
I resolved the
emit/host.rsmerge conflict introduced by #244 in cd5f91f. The branch keeps the original authored commitb3a6869and the shared WARP device and lock from upstream.With
VICTORY_WARP=1, the same gather fixture fails on61bfc77in the hardware-labelled lane 4 comparison in six runs. It passes oncd5f91fin 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-26 03:09 UTC · original
I checked how this branch composes with #2997. The exact #2225 head
cd5f91fand #2997 head92bfec2merge cleanly on upstream63bcca4.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:53 UTC · original
I merged current main
63bcca4into d239815. I switched the eight remaining paired loops in crosslane, memory, stride, and synthetic tests toHost::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.
@DenRakEiw on GitHub · 2026-11-25 08:22 UTC · original · approved these changes
Verified locally merged onto
origin/main(940d32f, Windows 11 x64, NVIDIA GeForce RTX 5090 + WARP, Rust 1.98.1 MSVC):cargo test -p victory-shader --lib emit::memory_tests::— 3 passed, 0 failed on both RTX 5090 hardware andVICTORY_D3D12_WARP=1cargo clippy -p victory-shader --all-targets— 0 warningscargo xtask policy— ok (183 files ok)Clean
test_backends()helper honoring WARP-only mode across paired shader tests. Looks good.AI-assisted (Gemini 4 Neon).
@catminou4 on GitHub · 2026-11-25 08:48 UTC · original · approved these changes
WARP-only mode honored in paired shader tests. Tested locally: merged into main
940d32f69b,cargo test -p victory-shader --lockedon macOS arm64 — 144 passed, 0 failed, 2 ignored (Windows-gated hardware tests). Approving.@fuzeofficlal on GitHub · 2026-11-26 19:13 UTC · original · approved these changes
Verified locally merged onto
origin/main(63bcca43, Windows 11 x64, Rust 1.98.1 MSVC, RTX 5090 & WARP):VICTORY_WARP=0(hardware + WARP):hosts_that_do_not_fuse_are_named(1 passed, printshardware adapter fuses FMad: true),emit::waterfall_tests::(5 passed),emit::tests::(17 passed),emit::memory_tests::skipping pre-existingheap_direct_texture_reads_mark_their_heap_indexcrash (4 passed)VICTORY_WARP=1(WARP-only):hosts_that_do_not_fuse_are_named(1 passed, hardware arm skipped),emit::memory_tests::(5 passed),emit::waterfall_tests::(5 passed),emit::tests::(17 passed),emit::crosslane_tests::(5 passed),emit::bvh_tests::(14 passed),emit::flow_tests::(1 passed)cargo clippy --locked -p victory-shader --all-targets -- -D warnings(default and--all-features) — 0 warningscargo xtask policy— ok (191 files ok)Review notes
Host::test_backends()(#[cfg(test)]) cleanly filters out the("hardware", false)arm whenVICTORY_WARP=1, andhosts_that_do_not_fuse_are_namedonly runs the hardware FMad probe when the hardware arm is active.rectangles_get_their_fourth_corner(crates/victory-shader/src/emit/rect.rs:247) still loopsfor warp in [false, true]instead of usingHost::test_backends(), so it still runs twice on WARP underVICTORY_WARP=1. Also note overlap with open #1991 onemit/host.rsand the test modules.@kilolimaVI on GitHub · 2026-11-26 20:23 UTC · original
Verified on Windows 11 with an AMD Radeon 780M (RDNA3 iGPU, Ryzen 7 8845HS), toolchain 1.98.1,
cargo test -p victory-shader --lib --locked -- --test-threads=1:VICTORY_WARP=163bcca4The four on main with
VICTORY_WARP=1are the synthetic_tests cases this PR touches (gathers_at_a_level_match_the_hardware,permutes_read_the_lane_named_and_zero_from_lanes_left_out,permutes_mask_high_address_bits_and_divergent_branches,a_mask_joined_with_data_at_a_uniform_loop_is_its_number): their "hardware" pass ran on WARP and made the hardware-only checks ("lane 4 against its gather"). With this PR they pass on WARP-only, and nothing changes on the real card.Also relevant to FIND-5: on this RDNA3 card the whole victory-shader lib suite passes on the hardware adapter, so none of its expected values disagree with AMD hardware here.
AI-assisted (Claude).
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.