Repository navigation
shader: review follow-up for the mesh diamond restore gap (#3633) - #3646
Merged
Merged
Conversation
Cover s_buffer_load_dword in the gap fixture (the SMEM op 8-12 path the real sites use). Replace the SALU name denylist with an allowlist of 32-bit forms plus s_cmp/s_bitcmp, with an s_mov_b64 control. Document that a restore at the join itself is accepted on the same guard terms. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Keeps the diamond join's diamond_joined line untouched, so this merges cleanly with R0Y00#3645. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
In |
lukaslw-lab
approved these changes
Nov 30, 2026
lukaslw-lab
left a comment
Contributor
There was a problem hiding this comment.
Reviewed 6a5eeedc by reading the diff; not built or run.
Verdict: approve. This settles the three points from my #3633 review. No MUST, no SHOULD.
- Checked, no finding:
- Fixture:
0xf420078c 0xfa000000is SMEM op 8 (s_buffer_load_dword) withsdata = s30,sbase = s[24:27]andsoffset = null. The positivescalar_gapcase now goes through theop 8–12branch that both real sites use, with its wait. gap-salu-b64(0xbe9e0480= SOP1 op 4,s_mov_b64 s[30:31], 0) isolates the allowlist: the old name-denylist would have accepted it, becausedst < 106and the name has noexec.- Allowlist (
src/gfx1013_direct_mesh.inl:594-606): only 32-bit SOP1/SOP2/SOPK forms withdst < 106.s_addk_i32/s_mulk_i32also read their destination, butdst < 106already keeps that a plain SGPR. SOPK skips the meaninglesssrc[1], and its unsetsrc[0](s0) passeslane_freetrivially. Calls,setreg,subvector_loop,rfe,movreland every 64-bit form now end the gap. Leaving outs_bcnt*/s_ff1/s_sext*and similar is conservative. - SOPC: only
s_cmp*/s_bitcmp*with lane-free sources, so a 64-bit compare of EXEC or VCC stays out. - The gap comment (
:577-579) now states the restore-at-join condition I asked for.
- Fixture:
Tests: the three mutations you list (allowing s_mov_b64, SMEM ops 0–4 only, clearing diamond_joined unconditionally) are each caught by native_direct_mesh. That test is still outside the Windows pr preset filter (also not selected by #3644's pattern), so it has only your run on d5970858.
This was referenced Nov 30, 2026
Open
4 of 5 tasks
This was referenced Dec 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #3633. lukaslw-lab's review had one SHOULD and two NITs. #3633 was merged before I pushed the fix (
dbf725ef), so the fix is here on top of main.scalar_gapnow hass_buffer_load_dword s30, s[24:27], 0and its wait. The positive case now goes through the SMEM op 8–12 branch, which both real sites use.s_cmp*/s_bitcmp*for SOPC.s_call_b64,s_setreg_b32,s_subvector_loop_*,s_rfe_b64and all 64-bit forms now end the gap. A new control,gap-salu-b64(s_mov_b64 s[30:31], 0in the gap), checks that the restore stays refused.diamond_joined=truenow says that a restore at the join of a diamond whose own restore names another mask is accepted only when that mask is the open skip's guard.Mutation checks, each caught by
native_direct_mesh:s_mov_b64;diamond_joinedunconditionally.Verification on main
d5970858:ctest --preset release -R "mesh|compile_dxil" -j 4gives 204 passed (the twomesh_two_exitscases skip, as on main). The census of the 454 cached requests is unchanged: 8mesh EXEC write inside a lane-skip blockleft.🤖 Generated with Claude Code