[Mesa-dev] [PATCH 29/37] glsl: when lowering named interface set assigned flag
Timothy Arceri
timothy.arceri at collabora.com
Tue Mar 15 12:57:19 UTC 2016
This will be used when checking if xfb should attempt to capture
a varying.
---
src/compiler/glsl/lower_named_interface_blocks.cpp | 11 +++++++++++
1 file changed, 11 insertions(+)
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);
}
--
2.5.0
More information about the mesa-dev
mailing list