summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir_lower_io.c
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2018-04-09 18:36:22 -0700
committerIan Romanick <ian.d.romanick@intel.com>2018-08-22 20:31:32 -0700
commit69ce7baa9e0dd598aad80f559719fdf14928038e (patch)
tree72d530a9944d217bfe31592d2fce38eef47871cd /src/compiler/nir/nir_lower_io.c
parenta390158d106554fb0ad970e03cc8a43b33d4af18 (diff)
nir: Add floating point atomic add instrinsics
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Diffstat (limited to 'src/compiler/nir/nir_lower_io.c')
-rw-r--r--src/compiler/nir/nir_lower_io.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/compiler/nir/nir_lower_io.c b/src/compiler/nir/nir_lower_io.c
index 9500a3091c4..3d4451e3602 100644
--- a/src/compiler/nir/nir_lower_io.c
+++ b/src/compiler/nir/nir_lower_io.c
@@ -280,6 +280,7 @@ lower_atomic(nir_intrinsic_instr *intrin, struct lower_io_state *state,
OP(atomic_and)
OP(atomic_or)
OP(atomic_xor)
+ OP(atomic_fadd)
#undef OP
default:
unreachable("Invalid atomic");
@@ -380,6 +381,7 @@ nir_lower_io_block(nir_block *block,
case nir_intrinsic_deref_atomic_xor:
case nir_intrinsic_deref_atomic_exchange:
case nir_intrinsic_deref_atomic_comp_swap:
+ case nir_intrinsic_deref_atomic_fadd:
/* We can lower the io for this nir instrinsic */
break;
case nir_intrinsic_interp_deref_at_centroid:
@@ -441,6 +443,7 @@ nir_lower_io_block(nir_block *block,
case nir_intrinsic_deref_atomic_xor:
case nir_intrinsic_deref_atomic_exchange:
case nir_intrinsic_deref_atomic_comp_swap:
+ case nir_intrinsic_deref_atomic_fadd:
assert(vertex_index == NULL);
replacement = lower_atomic(intrin, state, var, offset);
break;