summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2018-04-11 17:53:22 -0700
committerIan Romanick <[email protected]>2018-08-22 20:31:32 -0700
commita390158d106554fb0ad970e03cc8a43b33d4af18 (patch)
tree74a6cedef18ddff5c5f197d399aa0496c6fbf249
parent39bf3100acb784639653909c17e2dffa0423c766 (diff)
glsl: Add support for lowering shared-variable float atomics
Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
-rw-r--r--src/compiler/glsl/lower_shared_reference.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/compiler/glsl/lower_shared_reference.cpp b/src/compiler/glsl/lower_shared_reference.cpp
index a46d05419e5..5954ccce445 100644
--- a/src/compiler/glsl/lower_shared_reference.cpp
+++ b/src/compiler/glsl/lower_shared_reference.cpp
@@ -353,7 +353,8 @@ lower_shared_reference_visitor::lower_shared_atomic_intrinsic(ir_call *ir)
inst->ir_type == ir_type_swizzle);
ir_rvalue *deref = (ir_rvalue *) inst;
- assert(deref->type->is_scalar() && deref->type->is_integer());
+ assert(deref->type->is_scalar() &&
+ (deref->type->is_integer() || deref->type->is_float()));
ir_variable *var = deref->variable_referenced();
assert(var);
@@ -389,8 +390,7 @@ lower_shared_reference_visitor::lower_shared_atomic_intrinsic(ir_call *ir)
ir_variable(glsl_type::uint_type, "offset" , ir_var_function_in);
sig_params.push_tail(sig_param);
- const glsl_type *type = deref->type->base_type == GLSL_TYPE_INT ?
- glsl_type::int_type : glsl_type::uint_type;
+ const glsl_type *type = deref->type->get_scalar_type();
sig_param = new(mem_ctx)
ir_variable(type, "data1", ir_var_function_in);
sig_params.push_tail(sig_param);