feat(shader): translate global_atomic_csub without glc #15253
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/15253"
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 Kikoarl on 2026-11-02T22:24:00Z.
What
MemoryInstructionDispatch.cppthrewglobal_atomic_csub without glc is not supportedwhen translatingglobal_atomic_csubwithglc = 0.In AMD RDNA 2 ISA (FLAT/GLOBAL format):
glc = 1, atomic instructions return the previous memory value to the destination register.glc = 0, atomic instructions perform the atomic memory operation without returning data to destination (DecodeRdnaFlatsetsinstruction.destination.kind = RdnaOperandKind::None).TranslationContext::flatAtomicalready checksif (inst.glc) { writeOperand(inst.destination, result); }, so omitting the artificial throw allowsglobal_atomic_csubwithoutglcto emitAddressAtomicUSubSat32and skip writing to destination.Tested
ctest --test-dir /tmp/anyps5_build -R "global_atomic_csub_translation" -Vpassed (1/1 tests passed, 0.00s).glc = false(no destination register write) andglc = true(destination register write) inGlobalAtomicCsubTranslation.cpp.python3 tools/check_conventions.py --base origin/mainpassed cleanly with 0 warnings.python3 tools/progress.pyconfirms reduction of unsupported throw sites.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)