+
+ case ir_type_dereference_variable: {
+ ir_variable *var = ir->as_dereference_variable()->variable_referenced();
+
+ /* Lowering branches with TCS output accesses breaks many piglit tests,
+ * so don't touch them for now.
+ */
+ if (v->stage == MESA_SHADER_TESS_CTRL &&
+ var->data.mode == ir_var_shader_out)
+ v->found_unsupported_op = true;
+ break;
+ }
+
+ /* SSBO, images, atomic counters are handled by ir_type_call */
+ case ir_type_texture:
+ v->found_expensive_op = true;
+ break;
+
+ case ir_type_dereference_array: {
+ ir_dereference_array *deref = ir->as_dereference_array();
+
+ if (deref->array_index->ir_type != ir_type_constant)
+ v->found_dynamic_arrayref = true;
+ } /* fall-through */
+ case ir_type_expression:
+ case ir_type_dereference_record:
+ if (v->is_then)
+ v->then_cost++;
+ else
+ v->else_cost++;
+ break;
+