From d7b6d2e792ef736aa41291815f9d32cf68d84d0b Mon Sep 17 00:00:00 2001 From: Italo Nicola Date: Mon, 31 Aug 2020 17:32:30 +0000 Subject: [PATCH] panfrost: add support for atomics Signed-off-by: Italo Nicola Reviewed-by: Alyssa Rosenzweig Part-of: --- src/panfrost/midgard/midgard_compile.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/panfrost/midgard/midgard_compile.c b/src/panfrost/midgard/midgard_compile.c index 5c22ba7c45b..a58701de75f 100644 --- a/src/panfrost/midgard/midgard_compile.c +++ b/src/panfrost/midgard/midgard_compile.c @@ -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); -- 2.30.2