Shaders: a pixel program's killed lanes go on with their live quad (s_wqm), as on the console: sparkling glass #354
No reviewers
Labels
No labels
accessibility
already-solved
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
merged
needs-decision
needs-game-run
needs-rebase
not-merged
nvidia
obsolete
question
security
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/avatarmanz--VIctory-7900XTX!354
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-354"
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?
@Serph91P on GitHub · 2026-11-26 18:16 UTC · original
Serph91P:shader-killed-lanes-live-quad→main· +125 −7 · 5 files · 2 commits · openA glass material (
PS_Textured_Eight, b37565055f2f7d3b) wrote NaN and values near 65504 into the scene colour at 560 to 1,590 texels of one small globe; depth of field turned each into a coloured bokeh dot that changed every frame. Two commits on2de9980.Cause: the program kills pixels in a 2x2 dither, then sums its probe lighting across the quad (
quad_permmoves) and divides by the summed weight. On the console a killed lane of a live quad runs on as a helper until the export (s_wqm).structure.rsdecided the "no lane live" branch on each lane's own bit, so killed lanes left at the kill and the quad reads took values from lanes that had returned. The module comment assumed helper values are read only through derivatives.What this does
structure.rs: the condition of a mask operation whose result ans_wqmreads is "own bit or quad"; killed lanes of a live quad go on and are discarded at the export. Unit test added.emit/lower.rs: a colour export before the last one is accepted under the same guard as the final export.TRANSLATOR_VERSION1 → 2: about 19% of the archive's programs come out different. #353 also goes 1 → 2 on its own; whichever lands second needs 3.Tested (RX 7900 XTX, RADV Mesa 26.3.1, vkd3d-proton 71cae091, Proton Experimental)
x86_64-pc-windows-msvc(cargo-xwin); the whole archive gives 25,694 that translate and 195 that do not, all for the reason they had before;cargo test -p victory-shader --lib(210 passed),cargo xtask policyandcargo test -p xtaskpass.Not tested: Windows, NVIDIA. The 13 programs that fall back (ten mirror materials, two red-dot sights, one glass) may still have the fault.
No game data in the commits.
🤖 Generated with Claude Code
The console compiler kills a pixel by clearing it from the live mask (`s_andn2 live, live, exec`), leaves when no lane of the wave is left (`s_cbranch_scc0`), and otherwise goes on in whole-quad mode (`s_wqm` of the live mask): a killed lane of a live quad still runs, as a helper, until the export. The structurisation took that branch on the lane's own bit, so a killed lane left the program at once. That is right where a killed lane only fed derivatives, but a glass material (`PS_Textured_Eight`, b37565055f2f7d3b) kills in a 2x2 dither and then sums its probe lighting over the quad with DPP quad permutations, which read the killed neighbours' partial sums: on the host those lanes had left, the reads were undefined, and the glass wrote NaN or about 65504 into the scene colour, different from run to run; depth of field made them blue, green and magenta bokeh that flickered ("disco ball"). SCC of a mask operation whose result an `s_wqm` reads is now "some lane of my quad is set" (Atom::Quad, which the lowering takes as true, as it does for `s_wqm` itself), so such lanes go on; they are killed at the export, where EXEC is the live mask again. A colour export before the last one under that same EXEC is accepted (the last one discards). Capture-4, replayed with the 101 of 1,716 programs whose translation changes (42 of the frame's 1,254 pipelines): the globe's texels after the glass draw are finite in three runs (1,200 to 1,600 NaN before), a second blue bokeh dot of a small glass object is gone, and outside the globe the picture is unchanged but for that dot (PSNR 51.7 dB against the unchanged replay with the globe masked). Co-Authored-By: Claude Fable 5.2 <[email protected]>@UwUCammie on GitHub · 2026-11-26 21:40 UTC · original
I have a possible second scene to test on the Radeon branch. In the transition to a blurred face in the opening cutscene, large bright squares appear over the face, followed by dark squares, then the same area clears. In three consecutive 4 Hz captures, a 10×10 patch at one bright square averaged RGB (210,222,234), (45,36,28), (45,36,28). A separate patch went (39,30,23), (11,9,5), (39,30,22). This was on the RX 7900 XT, RADV 26.3.1, Wine 11.22, with the ambient reflection pass enabled. My executable predates this shader change. The capture establishes the transient squares. I haven’t identified the material or checked whether your fix changes this scene.
@UwUCammie on GitHub · 2026-11-26 21:57 UTC · original
The affected pixel shader was bound before the diner artifact in both 720p captures. The log does not identify which material drew the flashing squares.
I also found that if the constant-mask retry unwinds and its caller catches the panic, the next shader on that worker can inherit disabled live-quad handling. The regression test fails on
301867afand passes with the scoped restore. I sent the fix directly against this branch. The native shader suite passed 211 tests, with two ignored. Scoped restore and regression test@UwUCammie on GitHub · 2026-11-27 05:00 UTC · original
The 720p cold pair finished on RX 7900 XT with RADV and GE vkd3d-proton
cae8353ed7959c4. Both launches had the reflection clamp enabled. The live-quad translator plus unwind fix accepted 2,525 presents in 300 seconds, against 2,409 on the control. The P99 gap went from 921 ms to 2,209 ms. Several late living-room shots matched, with similar lighting in the sampled frames. The available matches and 4 Hz capture don't establish whether the diner flicker changed. Run detailsView 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.