[Mesa-dev] [PATCH 20/74] glsl: Don't do tree grafting on buffer variables

Iago Toral Quiroga itoral at igalia.com
Thu May 14 07:06:23 PDT 2015


Otherwise we can lose writes into the buffers backing the variables.
---
 src/glsl/opt_tree_grafting.cpp | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/glsl/opt_tree_grafting.cpp b/src/glsl/opt_tree_grafting.cpp
index d47613c..be34957 100644
--- a/src/glsl/opt_tree_grafting.cpp
+++ b/src/glsl/opt_tree_grafting.cpp
@@ -359,10 +359,11 @@ 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)
-	 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_buffer)
+      continue;
 
       ir_variable_refcount_entry *entry = info->refs->get_variable_entry(lhs_var);
 
-- 
1.9.1



More information about the mesa-dev mailing list