feat(shader): accept vcc as the scalar base address of global instructions #750
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/750"
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 boykopovar/AnyPS5. Originally posted by Celegans12 on 2026-10-05T20:39:31Z.
What
Recompiling a global load, store or atomic whose scalar base (SADDR) is VCC throws
FLAT scalar address register range overflow, because the FLAT decoder took SADDR only as a numbered SGPR pair.global_load/store_dword_addtid. Address translation already reads VCC_LO:VCC_HI throughoffsetOperand; SMEM already accepts VCC as its base pair. In the scratch segment the field is a 32-bit offset, andvcc_lois read as that offset.saddroperand acceptss,vcc,ttmp,nullandoff.vcc_hi,m0andexecas a base, and trap temporary pairs (the decoder has no TTMP operand).core_c0_char_male_ped,core_c9_char,core_c3_char_animal,hero.xpps) and 1 compute shader inall_shaders.xpps. For example, 02514c789e452069 runss_load_dwordx2 vcc, s[0:1], 0x40at 0x3aa8, thenglobal_load_dwordx4 v[0:3], v106, vcc offset:1976(0xdc3887b8 0x006a006a) at 0x3ac0.RdnaMemoryOpDecoder.cpp. Both merge cleanly with this branch.Tested
main681f83e5: configure-DBUILD_TESTING=ON, full build,--target libs,ctest:ctest --output-on-failure)agc_driver_global_vcc_baseruns, with a VCC base,global_load_dword, the title'sglobal_load_dwordx4words,global_atomic_addwith glc, and dword and dwordx4 stores as wave32 and wave64, and on devices with 32-lane subgroups alsoglobal_load/store_dword_addtid. It compares the whole 64 KiB guest block and requiresvcc_hi,m0andexecbases to throw. Onmainit fails at the first recompile with the message above.mainall stop at decode; with this change all decode and translate (165,274 instructions) and stop at runtime-indexed image descriptors (GetImageResource dword 0 is not a valid runtime value), whichmaindoes not handle yet.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)