aboutsummaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl
diff options
context:
space:
mode:
authorPierre-Eric Pelloux-Prayer <[email protected]>2019-07-24 12:06:34 +0200
committerMarek Olšák <[email protected]>2019-08-06 17:41:02 -0400
commita9ec7186525e4fc3616dcb95c1de059211425f3c (patch)
tree04d2b166844d3ebb28c6d1bb3351e3362ec48703 /src/compiler/glsl
parentfc0a2e5d017dcb9e7f236d69745dff89e116b92e (diff)
nir: add atomic_inc_wrap/atomic_dec_wrap image intrinsics
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/compiler/glsl')
-rw-r--r--src/compiler/glsl/glsl_to_nir.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/compiler/glsl/glsl_to_nir.cpp b/src/compiler/glsl/glsl_to_nir.cpp
index 3238c65cd9c..8cf571a29f9 100644
--- a/src/compiler/glsl/glsl_to_nir.cpp
+++ b/src/compiler/glsl/glsl_to_nir.cpp
@@ -990,6 +990,12 @@ nir_visitor::visit(ir_call *ir)
case ir_intrinsic_image_atomic_comp_swap:
op = nir_intrinsic_image_deref_atomic_comp_swap;
break;
+ case ir_intrinsic_image_atomic_inc_wrap:
+ op = nir_intrinsic_image_deref_atomic_inc_wrap;
+ break;
+ case ir_intrinsic_image_atomic_dec_wrap:
+ op = nir_intrinsic_image_deref_atomic_dec_wrap;
+ break;
case ir_intrinsic_memory_barrier:
op = nir_intrinsic_memory_barrier;
break;
@@ -1258,7 +1264,9 @@ nir_visitor::visit(ir_call *ir)
case nir_intrinsic_image_deref_atomic_comp_swap:
case nir_intrinsic_image_deref_atomic_fadd:
case nir_intrinsic_image_deref_samples:
- case nir_intrinsic_image_deref_size: {
+ case nir_intrinsic_image_deref_size:
+ case nir_intrinsic_image_deref_atomic_inc_wrap:
+ case nir_intrinsic_image_deref_atomic_dec_wrap: {
nir_ssa_undef_instr *instr_undef =
nir_ssa_undef_instr_create(shader, 1, 32);
nir_builder_instr_insert(&b, &instr_undef->instr);