diff options
author | Ian Romanick <[email protected]> | 2018-04-18 13:34:25 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2018-08-22 20:31:32 -0700 |
commit | 0842655ac654cf3090d2543ec955c967c38d2d03 (patch) | |
tree | 1a38e175926697238ef002f0af651730661d4a3a /src/compiler/nir/nir_lower_io.c | |
parent | 69ce7baa9e0dd598aad80f559719fdf14928038e (diff) |
nir: Add floating point atomic min, max, and compare-swap instrinsics
Signed-off-by: Ian Romanick <[email protected]>
Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir_lower_io.c')
-rw-r--r-- | src/compiler/nir/nir_lower_io.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/compiler/nir/nir_lower_io.c b/src/compiler/nir/nir_lower_io.c index 3d4451e3602..c418433aa52 100644 --- a/src/compiler/nir/nir_lower_io.c +++ b/src/compiler/nir/nir_lower_io.c @@ -281,6 +281,9 @@ lower_atomic(nir_intrinsic_instr *intrin, struct lower_io_state *state, OP(atomic_or) OP(atomic_xor) OP(atomic_fadd) + OP(atomic_fmin) + OP(atomic_fmax) + OP(atomic_fcomp_swap) #undef OP default: unreachable("Invalid atomic"); @@ -382,6 +385,9 @@ nir_lower_io_block(nir_block *block, case nir_intrinsic_deref_atomic_exchange: case nir_intrinsic_deref_atomic_comp_swap: case nir_intrinsic_deref_atomic_fadd: + case nir_intrinsic_deref_atomic_fmin: + case nir_intrinsic_deref_atomic_fmax: + case nir_intrinsic_deref_atomic_fcomp_swap: /* We can lower the io for this nir instrinsic */ break; case nir_intrinsic_interp_deref_at_centroid: @@ -444,6 +450,9 @@ nir_lower_io_block(nir_block *block, case nir_intrinsic_deref_atomic_exchange: case nir_intrinsic_deref_atomic_comp_swap: case nir_intrinsic_deref_atomic_fadd: + case nir_intrinsic_deref_atomic_fmin: + case nir_intrinsic_deref_atomic_fmax: + case nir_intrinsic_deref_atomic_fcomp_swap: assert(vertex_index == NULL); replacement = lower_atomic(intrin, state, var, offset); break; |