From ad5831214d14d3f40730b6334de4b2ef6d02b504 Mon Sep 17 00:00:00 2001 From: Luuk Motz Date: Tue, 1 Dec 2026 22:56:23 +0100 Subject: [PATCH] shader: count a 32-bit SALU write in a mesh SAVEEXEC arm as one SGPR The then-arm scan recorded every scalar destination as a register pair, so a 32-bit write such as s_lshl_b32 s7 also marked s8 as written. At the join s8 was clobbered, and a lane mask kept there was lost; the else arm also could not read the neighbour. Record the pair only for 64-bit SALU forms and for non-SALU writes (compare masks, readlane), as before. Co-Authored-By: Claude Opus 5.5 --- src/gfx1013_direct_mesh.inl | 6 +++++- tests/native_direct_mesh_check.py | 11 +++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/gfx1013_direct_mesh.inl b/src/gfx1013_direct_mesh.inl index 575612d03..1b60d66d0 100644 --- a/src/gfx1013_direct_mesh.inl +++ b/src/gfx1013_direct_mesh.inl @@ -587,7 +587,11 @@ NativeComputeShader lower_mesh(const string &code, const MeshStageLayout &layout if (op.enc==Encoding::Smem) { for (unsigned j=0;j