You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Parse bracketed scalar register lists ending in vcc_lo,vcc_hi (matching LLVM SIRegisterInfo.tdVCCTuple, e.g. [s100,s101,s102,s103,s104,s105,vcc_lo,vcc_hi] and [s92,...,s105,vcc_lo,vcc_hi], with or without spaces) as slist operands in shader_ir.py.
Clear both SGPR slots and vcc from lane-mask tracking in lane_masks.put(), and track SGPR members in shader_meta._sgpr_regs().
Support slist destinations and bases in s_load_dword* / s_buffer_load_dword*, plus slist descriptors in desc_lookup_sgpr, sgpr_words/sgpr_word (T#/S#), buffer_address (V#), and global_address (saddr), routing sN to %sgpr and vcc_lo/vcc_hi to %vcc/%vcc_hi. Unblocks 6 FSPX shaders.
src_scc source operand (tools/rdna2spirv.py, Gen.src_u): read %scc (0 or 1, RDNA2 inline constant 253) the same as scc. Unblocks 1 FSPX shader.
image_atomic_* / image_atomic_cmpswap with a16 (tools/rdna2spirv.py, Gen.image_misc): unpack 16-bit unsigned packed coordinates (two per VGPR, low half first, matching image_store) for both 2D and 3D storage-image atomics. Unblocks 1 FSPX shader.
Tests & docs: added tests/semantic/test_fspx_rules.py and updated docs/design.md.
Testing (CPU / synthetic only, no game files, no GPU)
python3 -m compileall -q make_game.py tools tests: OK
tests/semantic/test_fspx_rules.py: 9/9 OK (shader_ir parsing, lane_masks/shader_meta, s_buffer_load_dwordx8/x16 into VCCTuple, slist V#/T#, src_scc, 2D/3D image_atomic_add ... a16)
tests/semantic/test_scalar_mem_smem.py (39/39), tests/test_shader_ir.py (35/35), tests/test_lane_masks.py, tests/test_shader_meta.py (15/15), tests/test_docs_links.py (5/5): all OK
Tested bda17759e412a1154f330e12a633a51c79380bbf on NVIDIA GeForce RTX 5090, 595.99.02 (Linux).
Independent Vulkan check of bda17759e412a1154f330e12a633a51c79380bbf on NVIDIA GeForce RTX 5090 (driver 595.99.02, Linux 7.0.0-43-generic, LLVM 21.1.8, SPIRV-Tools v2026.1). AI-assisted. Synthetic input only.
I built a wave32 compute fixture based on the PR's src_scc semantic case. It sets SCC to 1, uses it in a vector add, copies it with s_mov_b32, then uses it in a scalar add that clears SCC through the carry result. A second vector add reads the cleared SCC. LLVM assembly, translation and SPIR-V validation passed. The RTX 5090 read back 21 20 1 11, and all 60 sentinel words stayed intact.
All nine test_fspx_rules.py CPU tests passed. The GPU result covers src_scc; the register-tuple and packed image-atomic changes received CPU coverage in this run.
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
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 #1754 /
docs/fspx.mdunblocking 8 more FidelityFX FSR4 (FSPX) compute shaders (claim: #1902 (comment)).Changes
VCCTuplescalar register lists (tools/shader_ir.py,tools/lane_masks.py,tools/shader_meta.py,tools/rdna2spirv.py):vcc_lo,vcc_hi(matching LLVMSIRegisterInfo.tdVCCTuple, e.g.[s100,s101,s102,s103,s104,s105,vcc_lo,vcc_hi]and[s92,...,s105,vcc_lo,vcc_hi], with or without spaces) asslistoperands inshader_ir.py.vccfrom lane-mask tracking inlane_masks.put(), and track SGPR members inshader_meta._sgpr_regs().slistdestinations and bases ins_load_dword*/s_buffer_load_dword*, plusslistdescriptors indesc_lookup_sgpr,sgpr_words/sgpr_word(T#/S#),buffer_address(V#), andglobal_address(saddr), routingsNto%sgprandvcc_lo/vcc_hito%vcc/%vcc_hi. Unblocks 6 FSPX shaders.src_sccsource operand (tools/rdna2spirv.py,Gen.src_u): read%scc(0 or 1, RDNA2 inline constant 253) the same asscc. Unblocks 1 FSPX shader.image_atomic_*/image_atomic_cmpswapwitha16(tools/rdna2spirv.py,Gen.image_misc): unpack 16-bit unsigned packed coordinates (two per VGPR, low half first, matchingimage_store) for both 2D and 3D storage-image atomics. Unblocks 1 FSPX shader.tests/semantic/test_fspx_rules.pyand updateddocs/design.md.Testing (CPU / synthetic only, no game files, no GPU)
python3 -m compileall -q make_game.py tools tests: OKtests/semantic/test_fspx_rules.py: 9/9 OK (shader_irparsing,lane_masks/shader_meta,s_buffer_load_dwordx8/x16intoVCCTuple,slistV#/T#,src_scc, 2D/3Dimage_atomic_add ... a16)tests/semantic/test_scalar_mem_smem.py(39/39),tests/test_shader_ir.py(35/35),tests/test_lane_masks.py,tests/test_shader_meta.py(15/15),tests/test_docs_links.py(5/5): all OKspirv-as --target-env vulkan1.2+spirv-val --target-env vulkan1.2 --allow-offset-texture-operand(SPIRV-Tools v2025.5): all 6 synthetic fixtures pass (including--wave64-emulate).AI-assisted.