summaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/lower_named_interface_blocks.cpp
diff options
context:
space:
mode:
authorTimothy Arceri <timothy.arceri@collabora.com>2016-03-14 10:17:48 +1100
committerTimothy Arceri <timothy.arceri@collabora.com>2016-03-31 12:52:22 +1100
commitd5c09d40b909cca43936b7f1a3ea16d6568d6203 (patch)
tree0390ab295c20877814b400f8baa3256b20eba4fe /src/compiler/glsl/lower_named_interface_blocks.cpp
parenta2fbc5ed44ec8ebf0e8936ff5b21425159511413 (diff)
downloadexternal_mesa3d-d5c09d40b909cca43936b7f1a3ea16d6568d6203.zip
external_mesa3d-d5c09d40b909cca43936b7f1a3ea16d6568d6203.tar.gz
external_mesa3d-d5c09d40b909cca43936b7f1a3ea16d6568d6203.tar.bz2
glsl: when lowering named interface set assigned flag
This will be used when checking if xfb should attempt to capture a varying. Reviewed-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'src/compiler/glsl/lower_named_interface_blocks.cpp')
-rw-r--r--src/compiler/glsl/lower_named_interface_blocks.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/compiler/glsl/lower_named_interface_blocks.cpp b/src/compiler/glsl/lower_named_interface_blocks.cpp
index 2c36199..f780eca 100644
--- a/src/compiler/glsl/lower_named_interface_blocks.cpp
+++ b/src/compiler/glsl/lower_named_interface_blocks.cpp
@@ -217,12 +217,23 @@ ir_visitor_status
flatten_named_interface_blocks_declarations::visit_leave(ir_assignment *ir)
{
ir_dereference_record *lhs_rec = ir->lhs->as_dereference_record();
+
+ ir_variable *lhs_var = ir->lhs->variable_referenced();
+ if (lhs_var && lhs_var->get_interface_type()) {
+ lhs_var->data.assigned = 1;
+ }
+
if (lhs_rec) {
ir_rvalue *lhs_rec_tmp = lhs_rec;
handle_rvalue(&lhs_rec_tmp);
if (lhs_rec_tmp != lhs_rec) {
ir->set_lhs(lhs_rec_tmp);
}
+
+ ir_variable *lhs_var = lhs_rec_tmp->variable_referenced();
+ if (lhs_var) {
+ lhs_var->data.assigned = 1;
+ }
}
return rvalue_visit(ir);
}