diff options
author | Iago Toral Quiroga <[email protected]> | 2015-04-24 11:17:15 +0200 |
---|---|---|
committer | Samuel Iglesias Gonsalvez <[email protected]> | 2015-07-14 07:04:04 +0200 |
commit | 2a66ee6fc1fa1e64f2d9a22271187d4462d9e042 (patch) | |
tree | 4560753b52bebe87633553f60cf5ef2396cdfa40 /src | |
parent | 5dfea83ee6bf85fb3962679d043eb06b33bfd4c1 (diff) |
glsl: Don't do copy propagation on buffer variables
Since the backing storage for these is shared we cannot ensure that
the value won't change by writes from other threads. Normally SSBO
accesses are not guaranteed to be syncronized with other threads,
except when memoryBarrier is used. So, we might be able to optimize
some SSBO accesses, but for now we always take the safe path and emit
the SSBO access.
Reviewed-by: Jordan Justen <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/glsl/opt_copy_propagation.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/glsl/opt_copy_propagation.cpp b/src/glsl/opt_copy_propagation.cpp index 806027b280e..f20699563fd 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_shader_storage) { entry = new(this->acp) acp_entry(lhs_var, rhs_var); this->acp->push_tail(entry); } |