shader: lower buffer_load_format_x in mesh EXECZ skips and element zero (Part of #3703) #3720
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3720"
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 R0Y00/Xbox2Windows. Originally posted by timbot103 on 2026-12-01T10:53:03Z.
Refs #3703.
Summary
Lowers
buffer_load_format_xinside openEXECZskips and for unindexed literal element zero in the C++ mesh frontend (src/gfx1013_direct_mesh.inl):buffer_load_format_x(i.op == 0) when(full_exec || exec_skip)and addressing is eitheridxen(0x2000) or unindexed literal element zero (0x0000, already accepted bydecode()). Whenidxenis clear, emits index0without readingvaddr.partial_writeswhen!full_execso pre-skip VGPR values are preserved viaselect/phiand fresh destinations under a lane count retainvalue_limits.uniform_valuesunderfull_execandactive_uniformunderwhole_wave_execution() && !branchonly whenuniform(index) == index.group_uniformpropagation forbuffer_load_formatonfull_execso a lane-maskedselectcannot be marked group-uniform.base + 4 > 106).s_cbranch_execz, non-heap table descriptors, multi-channelbuffer_load_format_xy/xyz/xyzw, non-zero offsets, per-lanev_readfirstlane_b32, and unmasked reads of lane-bounded destinations strictly refused.Verification
Windows 11 (26200), MSVC 19.44, Ninja, Windows SDK 10.0.26100. Source-built tests only; added positive cases (element-0, per-lane skip preserve, whole-wave lane-limit skip +
readfirstlane,SAVEEXECthen arm,heap_tokensinside skip) and negative controls intests/native_direct_mesh_check.py.devpreset):ctest --preset dev --no-tests=error -R '^native_direct_|^startup_mesh57_real_shape$|^startup_mesh57_execz_diagnostics$' -V-> 4/4 passed (native_direct_container,native_direct_mesh,startup_mesh57_execz_diagnostics,startup_mesh57_real_shape)releasepreset):ctest --preset release --no-tests=error -R '^native_direct_|^startup_mesh57_real_shape$|^startup_mesh57_execz_diagnostics$' -V-> 4/4 passedgit diff --check HEAD^ HEADclean.AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-12-01T11:20:39Z.
Review: APPROVED
Reviewed the indexed and literal-zero paths and EXEC skip bookkeeping. Integrated native_direct_mesh passed locally, including positive and refusal cases.