shader: treat a mesh uniform-address buffer load in an entered lane skip as uniform (Part of #3703) #3957
No reviewers
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows!3957
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3955"
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?
@mumba17 on GitHub · 2026-12-03 17:42 UTC · original
mumba17:shader/mesh-skip-uniform-buffer-load→main· +23 −1 · 2 files · 1 commits · openPart of #3705 (R1,
v_readfirstlane_b32; claim: #3705).Problem
#3792 marks a buffer load at a uniform address (no OFFEN, uniform IDXEN index, constant or uniform SOFFSET) as uniform, so a following
v_readfirstlane_b32reads the loaded word directly. Under a narrowed EXEC it did so only for a whole-wave skip (whole_wave_execution()). Inside an entered per-lane EXECZ skip the load lost the proof, and the read needed the groupshared broadcast, which cannot run inside a per-lane skip. It was refused withunsupported mesh instruction or EXEC state: v_readfirstlane_b32.Change
mark_uniform_buffer_loadalso records the loaded words inactive_uniformfor the current lane set inside an entered EXECZ skip (exec_skip->guard == lane_active). That is the same term #3947 added for uniform-address scalar loads. Each thread that runs the load there is an active guest lane reading the same address, so every active lane sees the same words. The buffer-load rule's other conditions are unchanged: no open branch, and the uniform-address checks of #3792. Readers ofactive_uniformmatch the lane set, so the proof does not survive a further narrowing or a restore. The heap typed-load path is not changed.Tests (
native_direct_mesh)uniform-load-in-lane-skip:buffer_load_dword v6, off, s[24:27], 0 offset:20inside a per-lanev_cmpx_eq_u32skip withs_cbranch_execz, thenv_readfirstlane_b32 s20, v6andv_cvt_f32_u32 v1, s20. It translates with nomeshReadFirstLaneslot, and the conversion reads the loaded word directly.uniform-load-offen-in-lane-skip: the same with a per-lane OFFEN address. Still refused.uniform-load-in-lane-skipfails with thev_readfirstlane_b32refusal.Census
Our native Mesh86 capture (RTX 3090, 600 s): 6,685 distinct
.m86programs, each run once throughcompile_dxil … gfx1013-container-ms-texture-heap.main8cb022db: 2,163 translate. With this change alone: 2,163, and no program's first refusal changes. The programs it helps stop earlier onmain, at the SDWAv_cmpx_lt_u32that #3949 lowers.main8cb022db+ #3949: 2,163 translate; 276 stop at av_readfirstlane_b32of such a load inside a per-lane skip.main8cb022db+ #3949 + this change: 2,292 translate (+129), 0 lost. All 276 move offv_readfirstlane_b32: 129 translate, and the rest stop atunproven packed mesh signature rows43,v_cvt_f32_f1624 (C1),mesh SAVEEXEC else arm is not vector-only22,unsupported packed vertex export20,mesh EXEC write inside a lane-skip block18,unbound numeric SGPR16, heap-slot provenance 2,mesh SAVEEXEC then arm lacks an EXECZ skip2. No other program changes.Counts only; request bytes stay local.
Checks
Windows 11 build 26300, MSVC (VS Build Tools 14.44), SDK/DXC 10.0.26100.
ctest --preset pron this commit (onmain8cb022db): 349/351 pass,native_direct_meshincluded. The two local failures,native_compute_implicit_lod_controlsandnative_wave_virtual_derivative_controls, are the local SDK validator 1.7 vs DXIL 1.8 and fail onmaintoo.AI-assisted (Claude Code).
🤖 Generated with Claude Code
View 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.