mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-27 00:25:52 +01:00
[PR #2018] shader_meta: handle short v_*_co_ci_u32, SMEM atomics, buffer_load lds, and VGPR swap/rel vscale (SHADER-META-OPERANDS-AND-LDS) #2025
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#2025
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/2018
Author: @ShotTechOp
Created: 11/25/2026
Status: 🔄 Open
Base:
main← Head:fix/shader-meta-operands-lds📝 Commits (1)
92c174dshader_meta: fix short v_*_co_ci_u32, SMEM atomics, buffer_load lds, and VGPR swap/rel vscale📊 Changes
2 files changed (+148 additions, -13 deletions)
View changed files
➕
tests/test_shader_meta_split_and_lds.py(+109 -0)📝
tools/shader_meta.py(+39 -13)📄 Description
Claimed in #1608 as
SHADER-META-OPERANDS-AND-LDS.What and why
Fixes four static-analysis bugs in
tools/shader_meta.py:v_*_co_ci_u32short forms (v_add_co_ci_u32 vD, src0, src1andsub/subrevvariants with implicit VCC):_split_operandspreviously treateda[1]as a written carry-out SGPR regardless of arity, dropping a user SGPR insrc0fromreadsand marking it written. Carry-outa[1]is now treated as a write only whenlen(a) >= 4.s_atomic_*,s_buffer_atomic_*):_split_operandspreviously placeda[0]inwritesonly, missing it as a read-before-write operand and falsely clobbering it whenglcis absent._step_statenow also classifiesa[1]asptr64/ptr32_lo(s_atomic_*) orvsharp(s_buffer_atomic_*).buffer_load*/tbuffer_load*withlds): these omitvdata, placingsrsrc(V#) ata[1]instead ofa[2]._step_statenow inspectsa[1]whenldsis present so user-SGPR V#s are classified asvsharp.vscaletracking acrossv_swap_b32andv_movreld_b32/v_movrelsd_b32/v_movrelsd_2_b32/v_swaprel_b32:v_swap_b32now swapsvscalebetween both operands instead of only clearinga[0], and relative VGPR writes clearvscaleentries at or above the base VGPR.Testing
tests/test_shader_meta_split_and_lds.py.origin/main:tests/test_shader_meta_split_and_lds.pyfails withFAILED (failures=9)across all 4 test methods onorigin/main.python -I tests/test_shader_meta_split_and_lds.py -v(4/4 OK)python -I tests/test_shader_meta.py(28/28 OK)python -I tests/test_shader_meta_operands.py(5/5 OK)python -I tests/test_text_write_line_endings.py(3/3 OK)python -m compileall -q tools/shader_meta.py tests/test_shader_meta_split_and_lds.pypython -I scripts/check_no_game_data.py tools/shader_meta.py tests/test_shader_meta_split_and_lds.pygit diff --check🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.