Mesa (master): glsl: Add support for lowering SSBO float atomics

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Aug 23 03:31:49 UTC 2018


Module: Mesa
Branch: master
Commit: 39bf3100acb784639653909c17e2dffa0423c766
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=39bf3100acb784639653909c17e2dffa0423c766

Author: Ian Romanick <ian.d.romanick at intel.com>
Date:   Mon Apr  9 15:26:48 2018 -0700

glsl: Add support for lowering SSBO float atomics

Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira at intel.com>

---

 src/compiler/glsl/lower_ubo_reference.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/compiler/glsl/lower_ubo_reference.cpp b/src/compiler/glsl/lower_ubo_reference.cpp
index 453c0fa2b0..5e1f281174 100644
--- a/src/compiler/glsl/lower_ubo_reference.cpp
+++ b/src/compiler/glsl/lower_ubo_reference.cpp
@@ -970,7 +970,8 @@ lower_ubo_reference_visitor::lower_ssbo_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);
@@ -1016,8 +1017,7 @@ lower_ubo_reference_visitor::lower_ssbo_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);




More information about the mesa-commit mailing list