Guard pixel quad reads from lanes that did not run the block (VICTORY_QUAD_GUARD) #28
No reviewers
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!28
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-28"
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?
@ramc1312 on GitHub · 2026-11-30 12:33 UTC · original
ramc1312:quad-guard→main· +42 −3 · 3 files · 1 commits · closed without mergingGlass drawn by
PS_Textured_Eight(variantb37565055f2f7d3b) shows coloured overflow blocks and flashes, different every frame (lanterns, bottles, bar glass).Cause. The shader sums colour and weight over the 2×2 quad with
v_mov_b32 … quad_perm:[1,0,3,2] / [2,3,0,1] bound_ctrl:1 fi:1, then divides the colour sums by the weight sum. On the console a lane outside EXEC still holds its register value, 0 for a sum it never added to. On the host the neighbour's value is undefined when it did not take the branch, so the sums take in noise and the mean divides by it.Change.
VICTORY_QUAD_GUARD=1reads the source and a source-dependent XOR marker through the same quad operation; where the pair does not match (the neighbour did not run this code) the read gives 0.=2also applies this to pixelds_swizzlequad reads. Off by default, and part of the shader cache key.Measured (RX 7900 XTX, Linux, RADV with the xmem patch, Proton; night scene at the glass lanterns, brightness cap off): the raw forward target had 350–1,400 glass pixels above 8 before, dozens of them at 65,504; with
=1it has none. Frame rate unchanged at about 50 fps.Limits. Runtime-tested on the
5a60834base only so far; this port to current main is compile-tested. (An earlier version of this text said main was black on this card: that was my own mistake, a missingd3dcompiler_47.dllbeside the executable, corrected in #6. I will run this branch on main and report here.) Particles, driving and long sessions were not checked.=2made no visible difference in my scenes.🤖 Generated with Claude Code
@goldfishdev on GitHub · 2026-12-02 01:53 UTC · original
Merged to main as cherry-picked commit
0bab220(VICTORY_QUAD_GUARD). Thanks for the fix!Pull request closed