BUFFER_ATOMIC_CMPSWAP (#3045)

This commit is contained in:
Marcin Mikołajczyk
2025-06-08 20:43:58 +02:00
committed by GitHub
parent 952cef5a15
commit ce84e80f65
6 changed files with 37 additions and 0 deletions

View File

@@ -331,6 +331,10 @@ void Translator::BUFFER_ATOMIC(AtomicOp op, const GcnInst& inst) {
switch (op) {
case AtomicOp::Swap:
return ir.BufferAtomicSwap(handle, address, vdata_val, buffer_info);
case AtomicOp::CmpSwap: {
IR::Value cmp_val = ir.GetVectorReg(vdata + 1);
return ir.BufferAtomicCmpSwap(handle, address, vdata_val, cmp_val, buffer_info);
}
case AtomicOp::Add:
return ir.BufferAtomicIAdd(handle, address, vdata_val, buffer_info);
case AtomicOp::Smin: