Repository navigation
fix(shader): preserve pixel helper lanes in EXEC copies - #6291
adriadam10 merged 1 commit into
Conversation
Expand the host active-lane mask to whole quads for pixel-stage EXEC value reads so saving and restoring WQM does not drop derivative inputs. Keep the existing host-lane mask in other stages. Add a GPU regression for implicit mip selection after an EXEC save/restore, across wave32/wave64 and native/emulated barycentrics.
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
|
NVIDIA and Intel run, for the "Linux, other GPU vendors, and a full CTest-suite run were not tested locally." line. Windows 11 (26200), RTX 3060 Laptop GPU (NVIDIA 617.42) and Intel UHD Graphics (device 0x9a60), WinLibs GCC 15.2.0 r7 (UCRT), Release,
Not run: OlliOlli World, Linux, the suite on the Intel GPU. AI-assisted: yes (Claude Code) |
What
A pixel shader that enables whole-quad mode, copies
EXECto an SGPR, and restores that copy loses its helper lanes.hostExecWordintersects the saved mask with a Vulkan ballot of active invocations, which excludes those helpers. Subsequent interpolation leaves incorrect coordinates in the helper lanes, so implicit texture sampling selects the wrong mips. OlliOlli World (PPSA02327, #5316) shows maze patterns on characters and terrain, including dashed triangle edges on the Radlandia map.Pixel-stage EXEC reads now intersect against the whole-quad expansion of the host active-lane mask. This retains the helper bits already present in guest EXEC while still rejecting absent host quads. Other stages retain the existing host-lane mask. There are no title checks, fixed mip levels, sampler overrides, or diagnostic environment switches in this change.
The mask semantics follow the AMD RDNA 2 ISA, section 12.3,
S_MOV_B64andS_WQM_B32/B64, printed page 111. Vulkan permits helper invocations to be inactive for non-quad subgroup operations; see Helper Invocations. Console hardware was not measured.Tested
Windows 11 Pro build 26200, GCC 15.2 Release, AMD Radeon RX 6700 XT, AMD Vulkan 26.8.1 / Windows display driver 32.0.21045.5002.
maind92a8da: the first case fails with 983 incorrectly sampled pixels. Restoring only this EXEC correction makes all 12 cases pass. The branch was then rebased onto db81992, whose intervening changes add optional draw-program tracing, and the library build and eight tests were rerun.Before and after screenshots
Original screenshots supplied by the tester. The after images show the EXEC correction with normal automatic mip selection.
Original PNGs and screenshot provenance. Camera positions and UI state differ; these images document rendering correctness.
Checklist
main; no other open PR implements the same functions