Window glass: dark stripes that blink every other frame (wave32 lane numbers on wave64 pixel waves) #189
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/lobomfz--VIctory-xmem#189
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@kyle41313 on GitHub · 2026-12-02 13:57 UTC · original
Symptom. Sunlit house windows show dark horizontal bands, about 4 of every 8 rows, on every other frame. Two windows in view flash in opposite phase. The bands show over shaded backgrounds and hide over sunlit ones.
Setup. RX 9070 XT, RADV, Proton Experimental 11.0, ray tracing off (
VICTORY_BVH_BUILDER=0).Cause. The house glass pixel program
b37565055f2f7d3b(the same program as #28) picks a neighboring light-grid cell per pixel from its lane number plus the frame counter:v_mbcnt_lo_u32_b32 v57, -1, 0at console offset 0x5730, thenv_add_nc_u32 v57, s63, v57at 0x574c. The program is wave32 on the console. xmem sets no wave size for pixel programs, so RADV should run them in waves of 64 (not measured). Thev_mbcnt_lolowering returns 32 for every host lane from 32 up. Half of each wave then reads the same cell, and the choice flips with the frame.Fix:
VICTORY_GLASS_DITHER_OFF=1(#193). For this program only, the result at 0x574c becomes 0. Off by default; in the shader cache key. Applies tod044248and compiles there without warnings. In game: no bands and no blinking, the glass otherwise drawn as before. This is a workaround: every pixel reads the same cell, so the console's per-pixel dither is lost.Suggested general fix (untested). Give pixel programs'
v_mbcntthe console's 0-31 lane numbering when a wave32 program runs in host waves of 64, for examplewaveGetLaneIndex() & 31, and split ballot masks by wave half. That would keep the dither and cover any other program that uses the lane number this way.Evidence: live pins, measurements, what did not help
Live pins of single instruction results in one running game (a diagnostics build of ours, on
6dbc3e7):The wave-size chain comes from reading the code:
s.wave_sizeis set on the compute path only (lower.rs around line 2566), andconsole_lanemasks with "all ones from 32 on".What did not help:
VICTORY_QUAD_GUARD=1(#28),VICTORY_RDNA_FLOAT=0,VICTORY_PLACED_COPIED=1: no change.RADV_PERFTEST=pswave32: the host refused the glass pipelines (3 launches), so the test could not tell.x & 0): with a plain constant there, the host refused the glass pipeline.No game files, captures or screenshots included.
Fix: pull request #193.
github-bot referenced this issue2026-12-03 18:20:15 +00:00