panfrost: add support for atomics

Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6439>
This commit is contained in:
Italo Nicola 2020-08-31 17:32:30 +00:00 committed by Marge Bot
parent 8e221f58a6
commit d7b6d2e792
1 changed files with 11 additions and 0 deletions

View 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);