glsl: Unify ir_constant::const_elements and ::components
[mesa.git] / src / mesa / state_tracker / st_glsl_to_tgsi.cpp
index 409a207419d4842a886325f53a891c27b770ecff..b49590bd6b6b5e8e8bb12ce64233684da695c5de 100644 (file)
@@ -3045,7 +3045,8 @@ glsl_to_tgsi_visitor::visit(ir_constant *ir)
       st_src_reg temp_base = get_temp(ir->type);
       st_dst_reg temp = st_dst_reg(temp_base);
 
-      foreach_in_list(ir_constant, field_value, &ir->components) {
+      for (i = 0; i < ir->type->length; i++) {
+         ir_constant *const field_value = ir->get_record_field(i);
          int size = type_size(field_value->type);
 
          assert(size > 0);