Shader tests: use the selected adapter for the native gather check #3267
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!3267
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3267"
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-26 15:06 UTC · original
andrewpozdnakov7-jpg:fix/3261-forced-warp-gather→main· +9 −3 · 2 files · 2 commits · openFixes #3261.
Host::new(false)can select WARP whenVICTORY_WARP=1. The gather test used the original request to decide whether to compare against native gather. WARP rounds these coordinates differently, so the hardware-only check failed at lane 4.Use the selected host's WARP flag for that one comparison. All 32 lanes still check both translated gathers against the CPU model on every adapter. The native gather comparison still runs on hardware.
Verification
On Windows with app-local WARP 1.0.22, Agility 1.620.2 and DXIL validation, the same gather test went from failing to passing with
VICTORY_WARP=1. With the override unset, the explicit WARP pass succeeded on both builds. There was no SM 6.6 hardware adapter for the local run.63bcca4Both runs failed the two existing lane-permutation tests and
edge_flagged_triangles_draw_as_unflagged_ones. Strict shader Clippy and asset policy passed.Synthetic fixtures only. AI-assisted with Codex.
@Dukestar69 on GitHub · 2026-11-26 15:29 UTC · original · approved these changes
Reviewed the diff and verified locally on Windows 11 x64:
!host.is_warp()instead of!warpcleanly handlesHost::new(false)selecting WARP underVICTORY_WARP=1, where WARP's gather truncates rather than rounds.VICTORY_WARP=1 cargo test -p victory-shader --lib emit::synthetic_tests::gathers_at_a_level_match_the_hardware -- --test-threads=1: 1 passed, 0 failed.cargo clippy -p victory-shader --all-targets -- -D warnings: clean.cargo xtask policy: 191 files ok.Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
@andrewpozdnakov7-jpg on GitHub · 2026-11-26 16:21 UTC · original
I merged this exact
010381cwith #2997 ata4484f5on the shared63bcca43base. Both sides added a software-adapter accessor inemit/host.rs. The integrationb1ff815reusesHost::is_software()in the native gather comparison and keeps the production permute change.With forced app-local Agility 1.620.2, WARP 1.0.22 and DXIL validation, gather, varying Wave32 and Wave64 half-wave tests passed. Two full shader runs each had 301 passed, 1 failed, 3 ignored. The failure was
edge_flagged_triangles_draw_as_unflagged_ones, also seen on63bcca43. Separate fresh-process repeats of the divergent permute test still failed 1/48 in each of two series on the integration. The 19-active-lane case sometimes returned nonzero data on lanes 16–18 that should read zero. Strict shader and GPU Clippy passed with default and all features, and policy passed.Maintainers can use this resolution if both PRs land. The intermittent divergent permute case remains open in #2997. If you reuse the merge resolution, please retain its Git author or add
Co-authored-by: andrewpozdnakov7-jpg <[email protected]>if folding it into another commit. AI-assisted with Codex.@upipibi on GitHub · 2026-11-26 16:39 UTC · original · edited 2026-11-26 16:53 UTC
Verified Marvisak/VIctory #3267 at
010381cc9f, main63bcca43as control. RTX 3070 8 GB, driver 616.56, Windows 11. Synthetic tests only.gathers_at_a_level_match_the_hardware, 3 runs each:
Stride::Structuredviews read withrawBufferLoad), with runtime fixes proposed in #2178 and #2885.cargo xtask policy: 191 files ok. clippy -p victory-shader --all-targets --locked -D warnings: clean.
AI-assisted (Claude Code, Claude Opus 5.5): ran the tests and wrote this.
@upipibi on GitHub · 2026-11-26 16:47 UTC · original · edited 2026-11-26 17:19 UTC
Corrected (16:53Z): the first version of this comment called the NVIDIA failure a test bug and offered a one-line test change (
Stride::Raw). That change is #2357, which was closed on 2026-11-25 because the test fixtures are the faithful ones and the fix belongs in the runtime. The failure is the one tracked in #1835 (aStride::Structuredview read withrawBufferLoadon NVIDIA); runtime fixes are proposed in #2178 and #2885. I withdraw the suggestion.What our run shows, for #1835: on the RTX 3070 (driver 616.56, Windows 11) all 32 lanes gathered as if
u = v = 0at level 0 ([0,1,0,0]; lanes 5-7 read a junk level), because the per-lane records read as 0 through the structured descriptor; even the nativeimage_gather4_lzgave[0,1,0,0]on every lane. With the views made raw locally (the #2357 change, not proposed), every lane matched the CPU model on the 3070 and on WARP. Synthetic tests only.AI-assisted (Claude Code, Claude Opus 5.5).
Added 17:19Z: the
Stride::Rawtest change hides #1835; it is not a fix. Please don't adopt it (see my reply below).@andrewpozdnakov7-jpg on GitHub · 2026-11-26 17:01 UTC · original
Thanks @upipibi for tracking down the descriptor mismatch and testing the raw view on the RTX 3070. 498a55d adds that one-line test change to this PR and credits you in the commit.
I reran
gathers_at_a_level_match_the_hardwarelocally with default adapter selection and forced WARP 1.0.22. It passed in both modes. The translated results are still compared against the CPU model for all 32 lanes. Your RTX 3070 report confirms the native comparison on that adapter. The same two unrelated permute tests fail on WARP before and after this change (tracked in #2997). Both Clippy configurations and the asset policy check passed.AI-assisted with Codex.
@upipibi on GitHub · 2026-11-26 17:19 UTC · original
@andrewpozdnakov7-jpg thanks, but please drop
498a55dand keep010381cas it was. I also decline the credit. That one-lineStride::Rawchange is #2357, which Marvisak closed on 2026-11-25: the test fixtures are the faithful ones, and the fix belongs in the runtime. My comment above was corrected at 16:53Z to withdraw it. With the change in place, the test passes on NVIDIA because it no longer exercises what #1835 is about. It hides the bug rather than fixing it.The runtime fix does make the test pass. On the same RTX 3070, #2885 at
767f228passesgathers_at_a_level_match_the_hardware3/3 on the hardware adapter, whilemainfails 3/3 (report: #2885). So on NVIDIA this test should go green once #2885 or #2178 lands, not through a test change. Your010381cfix of the WARP comparison stands on its own (PR 3/3 vsmain0/3 on WARP in my report above).AI-assisted (Claude Code, Claude Opus 5.5).
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.