/**
* Number of generic varying slots which are used by this shader. This is
- * used to allocate temporary intermediate data structures. If any any
- * varying used by this shader has a location greater than or equal to
+ * used to allocate temporary intermediate data structures. If any varying
+ * used by this shader has a location greater than or equal to
* location_base + locations_used, an assertion will fire.
*/
const unsigned locations_used;
if (var == NULL)
continue;
- if (var->mode != this->mode ||
- var->location < (int) this->location_base ||
+ if (var->data.mode != this->mode ||
+ var->data.location < (int) this->location_base ||
!this->needs_lowering(var))
continue;
* safe, caller should ensure that integral varyings always use flat
* interpolation, even when this is not required by GLSL.
*/
- assert(var->interpolation == INTERP_QUALIFIER_FLAT ||
+ assert(var->data.interpolation == INTERP_QUALIFIER_FLAT ||
!var->type->contains_integer());
/* Change the old varying into an ordinary global. */
- var->mode = ir_var_auto;
+ var->data.mode = ir_var_auto;
/* Create a reference to the old varying. */
ir_dereference_variable *deref
= new(this->mem_ctx) ir_dereference_variable(var);
/* Recursively pack or unpack it. */
- this->lower_rvalue(deref, var->location * 4 + var->location_frac, var,
+ this->lower_rvalue(deref, var->data.location * 4 + var->data.location_frac, var,
var->name, this->gs_input_vertices != 0, 0);
}
}
if (this->packed_varyings[slot] == NULL) {
char *packed_name = ralloc_asprintf(this->mem_ctx, "packed:%s", name);
const glsl_type *packed_type;
- if (unpacked_var->interpolation == INTERP_QUALIFIER_FLAT)
+ if (unpacked_var->data.interpolation == INTERP_QUALIFIER_FLAT)
packed_type = glsl_type::ivec4_type;
else
packed_type = glsl_type::vec4_type;
/* Prevent update_array_sizes() from messing with the size of the
* array.
*/
- packed_var->max_array_access = this->gs_input_vertices - 1;
+ packed_var->data.max_array_access = this->gs_input_vertices - 1;
}
packed_var->data.centroid = unpacked_var->data.centroid;
packed_var->data.sample = unpacked_var->data.sample;
- packed_var->interpolation = unpacked_var->interpolation;
- packed_var->location = location;
+ packed_var->data.interpolation = unpacked_var->data.interpolation;
+ packed_var->data.location = location;
unpacked_var->insert_before(packed_var);
this->packed_varyings[slot] = packed_var;
} else {
gs_input_vertices, &new_instructions);
visitor.run(instructions);
if (mode == ir_var_shader_out) {
- if (shader->Type == GL_GEOMETRY_SHADER) {
+ if (shader->Stage == MESA_SHADER_GEOMETRY) {
/* For geometry shaders, outputs need to be lowered before each call
* to EmitVertex()
*/