projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
028d6ec
)
nir/glsl: Propagate invariant into NIR alu ops
author
Jason Ekstrand
<jason.ekstrand@intel.com>
Thu, 17 Mar 2016 22:20:20 +0000
(15:20 -0700)
committer
Jason Ekstrand
<jason.ekstrand@intel.com>
Wed, 23 Mar 2016 23:28:07 +0000
(16:28 -0700)
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
src/compiler/nir/glsl_to_nir.cpp
patch
|
blob
|
history
diff --git
a/src/compiler/nir/glsl_to_nir.cpp
b/src/compiler/nir/glsl_to_nir.cpp
index ee9c05308d6111e2ef708885fbd2bb0326950a01..f6e1a17a916d043c2eab26c122844aee17ffff71 100644
(file)
--- a/
src/compiler/nir/glsl_to_nir.cpp
+++ b/
src/compiler/nir/glsl_to_nir.cpp
@@
-1051,6
+1051,9
@@
nir_visitor::visit(ir_assignment *ir)
{
unsigned num_components = ir->lhs->type->vector_elements;
+ b.exact = ir->lhs->variable_referenced()->data.invariant ||
+ ir->lhs->variable_referenced()->data.precise;
+
if ((ir->rhs->as_dereference() || ir->rhs->as_constant()) &&
(ir->write_mask == (1 << num_components) - 1 || ir->write_mask == 0)) {
/* We're doing a plain-as-can-be copy, so emit a copy_var */