xshader: read structured, typed and image resources only in lanes inside EXEC #408
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/408"
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?
Imported from brcly/TuxBox. Originally posted by NickStallman on 2026-11-28T18:49:45Z.
Summary
#386 made every raw buffer load test the lane's EXEC bit. Structured and typed buffer loads, and image loads, still read for every lane; only the write of the result was masked.
On the console, a lane outside EXEC performs no memory access, and its index, offset and coordinate registers can hold any value. In ProjectScarlett's skinned mesh programs they hold values left over from other meshlets.
Each such load now reads into a zeroed temporary under
if (exec_lo & 1u), as raw loads and every store already do. That covers structured buffer loads (dword, multi-dword and sub-word), typed buffer loads (stbN[i]), and image loads from tables and the heap. Sampling is unchanged, because its derivatives need the whole quad.Where this came from. In ProjectScarlett on an RTX 5090, a world-entry GPU timeout (Xid 109, #232) was traced with per-wave mesh progress markers.
MSNC_VS_TransformSkinDnever reached its next group rendezvous.image_loadat a computed texel.This change does not show that one of those reads stalled. It makes the translation do what the console does. Whether it removes that hang is being tested in game and will be reported on #232.
Effect on recorded ProjectScarlett requests:
Tested
New translator tests (
tests/hlsl/exec_gated_loads.rs), all three failing without the change:The existing GPU translator suite, including
buffer-loads,image-ops,translated-mesh,raw-indexanddescriptor-size, passes 60 of 60 on both cards.GPU, driver and backend:
Commands run and their results:
🤖 Generated with Claude Code