panfrost: add support for atomics
[mesa.git] / src / panfrost / midgard / midgard_compile.c
index 5c22ba7c45b8decbb6f038f18c80a8794c088555..a58701de75fbd9ac552da32afeab8ded29625ed1 100644 (file)
@@ -2061,6 +2061,17 @@ emit_intrinsic(compiler_context *ctx, nir_intrinsic_instr *instr)
                 schedule_barrier(ctx);
                 break;
 
+        ATOMIC_CASE(ctx, instr, add, add);
+        ATOMIC_CASE(ctx, instr, and, and);
+        ATOMIC_CASE(ctx, instr, comp_swap, cmpxchg);
+        ATOMIC_CASE(ctx, instr, exchange, xchg);
+        ATOMIC_CASE(ctx, instr, imax, imax);
+        ATOMIC_CASE(ctx, instr, imin, imin);
+        ATOMIC_CASE(ctx, instr, or, or);
+        ATOMIC_CASE(ctx, instr, umax, umax);
+        ATOMIC_CASE(ctx, instr, umin, umin);
+        ATOMIC_CASE(ctx, instr, xor, xor);
+
         default:
                 fprintf(stderr, "Unhandled intrinsic %s\n", nir_intrinsic_infos[instr->intrinsic].name);
                 assert(0);