summaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/glsl_to_nir.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/glsl/glsl_to_nir.cpp')
-rw-r--r--src/compiler/glsl/glsl_to_nir.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/compiler/glsl/glsl_to_nir.cpp b/src/compiler/glsl/glsl_to_nir.cpp
index b1d1da89111..aba8d70a8a0 100644
--- a/src/compiler/glsl/glsl_to_nir.cpp
+++ b/src/compiler/glsl/glsl_to_nir.cpp
@@ -650,7 +650,9 @@ nir_visitor::visit(ir_call *ir)
op = nir_intrinsic_image_deref_store;
break;
case ir_intrinsic_image_atomic_add:
- op = nir_intrinsic_image_deref_atomic_add;
+ op = ir->return_deref->type->is_integer_32_64()
+ ? nir_intrinsic_image_deref_atomic_add
+ : nir_intrinsic_image_deref_atomic_fadd;
break;
case ir_intrinsic_image_atomic_min:
op = nir_intrinsic_image_deref_atomic_min;
@@ -689,7 +691,8 @@ nir_visitor::visit(ir_call *ir)
op = nir_intrinsic_load_ssbo;
break;
case ir_intrinsic_ssbo_atomic_add:
- op = nir_intrinsic_ssbo_atomic_add;
+ op = ir->return_deref->type->is_integer_32_64()
+ ? nir_intrinsic_ssbo_atomic_add : nir_intrinsic_ssbo_atomic_fadd;
break;
case ir_intrinsic_ssbo_atomic_and:
op = nir_intrinsic_ssbo_atomic_and;
@@ -755,7 +758,9 @@ nir_visitor::visit(ir_call *ir)
op = nir_intrinsic_store_shared;
break;
case ir_intrinsic_shared_atomic_add:
- op = nir_intrinsic_shared_atomic_add;
+ op = ir->return_deref->type->is_integer_32_64()
+ ? nir_intrinsic_shared_atomic_add
+ : nir_intrinsic_shared_atomic_fadd;
break;
case ir_intrinsic_shared_atomic_and:
op = nir_intrinsic_shared_atomic_and;
@@ -865,6 +870,7 @@ nir_visitor::visit(ir_call *ir)
case nir_intrinsic_image_deref_atomic_xor:
case nir_intrinsic_image_deref_atomic_exchange:
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: {
nir_ssa_undef_instr *instr_undef =
@@ -1035,7 +1041,8 @@ nir_visitor::visit(ir_call *ir)
case nir_intrinsic_ssbo_atomic_or:
case nir_intrinsic_ssbo_atomic_xor:
case nir_intrinsic_ssbo_atomic_exchange:
- case nir_intrinsic_ssbo_atomic_comp_swap: {
+ case nir_intrinsic_ssbo_atomic_comp_swap:
+ case nir_intrinsic_ssbo_atomic_fadd: {
int param_count = ir->actual_parameters.length();
assert(param_count == 3 || param_count == 4);
@@ -1118,7 +1125,8 @@ nir_visitor::visit(ir_call *ir)
case nir_intrinsic_shared_atomic_or:
case nir_intrinsic_shared_atomic_xor:
case nir_intrinsic_shared_atomic_exchange:
- case nir_intrinsic_shared_atomic_comp_swap: {
+ case nir_intrinsic_shared_atomic_comp_swap:
+ case nir_intrinsic_shared_atomic_fadd: {
int param_count = ir->actual_parameters.length();
assert(param_count == 2 || param_count == 3);