[Mesa-dev] [PATCH 25/74] glsl: Don't do copy propagation on buffer variables

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


Since the backing storage for these is shared we cannot ensure that the
value won't change by writes from other threads.
---
 src/glsl/opt_copy_propagation.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/glsl/opt_copy_propagation.cpp b/src/glsl/opt_copy_propagation.cpp
index 806027b..2e7bd73 100644
--- a/src/glsl/opt_copy_propagation.cpp
+++ b/src/glsl/opt_copy_propagation.cpp
@@ -330,7 +330,7 @@ ir_copy_propagation_visitor::add_copy(ir_assignment *ir)
 	  */
 	 ir->condition = new(ralloc_parent(ir)) ir_constant(false);
 	 this->progress = true;
-      } else {
+      } else if (lhs_var->data.mode != ir_var_buffer) {
 	 entry = new(this->acp) acp_entry(lhs_var, rhs_var);
 	 this->acp->push_tail(entry);
       }
-- 
1.9.1



More information about the mesa-dev mailing list