glsl: Disable tree grafting optimization for shared variables
authorJordan Justen <jordan.l.justen@intel.com>
Wed, 20 Jan 2016 07:27:22 +0000 (23:27 -0800)
committerJordan Justen <jordan.l.justen@intel.com>
Tue, 2 Feb 2016 18:50:40 +0000 (10:50 -0800)
Fixes:
 * dEQP-GLES31.functional.compute.basic.shared_atomic_op_multiple_groups
 * dEQP-GLES31.functional.compute.basic.shared_atomic_op_multiple_invocation
 * dEQP-GLES31.functional.compute.basic.shared_atomic_op_single_group
 * dEQP-GLES31.functional.compute.basic.shared_atomic_op_single_invocation

From https://android.googlesource.com/platform/external/deqp

Reported-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Tested-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
src/compiler/glsl/opt_tree_grafting.cpp

index 83effb7424cb04d942b7284f1b74241d9a614757..812f996fb813197b18a8a1ed001e35b7d47f946f 100644 (file)
@@ -361,11 +361,12 @@ tree_grafting_basic_block(ir_instruction *bb_first,
       if (!lhs_var)
         continue;
 
-   if (lhs_var->data.mode == ir_var_function_out ||
-       lhs_var->data.mode == ir_var_function_inout ||
-       lhs_var->data.mode == ir_var_shader_out ||
-       lhs_var->data.mode == ir_var_shader_storage)
-      continue;
+      if (lhs_var->data.mode == ir_var_function_out ||
+          lhs_var->data.mode == ir_var_function_inout ||
+          lhs_var->data.mode == ir_var_shader_out ||
+          lhs_var->data.mode == ir_var_shader_storage ||
+          lhs_var->data.mode == ir_var_shader_shared)
+         continue;
 
       ir_variable_refcount_entry *entry = info->refs->get_variable_entry(lhs_var);