summaryrefslogtreecommitdiffstats
path: root/src/glsl/ir_set_program_inouts.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/glsl/ir_set_program_inouts.cpp')
-rw-r--r--src/glsl/ir_set_program_inouts.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/glsl/ir_set_program_inouts.cpp b/src/glsl/ir_set_program_inouts.cpp
index 2d824395c74..23bad982b26 100644
--- a/src/glsl/ir_set_program_inouts.cpp
+++ b/src/glsl/ir_set_program_inouts.cpp
@@ -75,9 +75,9 @@ private:
static inline bool
is_shader_inout(ir_variable *var)
{
- return var->mode == ir_var_shader_in ||
- var->mode == ir_var_shader_out ||
- var->mode == ir_var_system_value;
+ return var->data.mode == ir_var_shader_in ||
+ var->data.mode == ir_var_shader_out ||
+ var->data.mode == ir_var_system_value;
}
static void
@@ -94,21 +94,21 @@ mark(struct gl_program *prog, ir_variable *var, int offset, int len,
for (int i = 0; i < len; i++) {
GLbitfield64 bitfield = BITFIELD64_BIT(var->location + var->index + offset + i);
- if (var->mode == ir_var_shader_in) {
+ if (var->data.mode == ir_var_shader_in) {
prog->InputsRead |= bitfield;
if (is_fragment_shader) {
gl_fragment_program *fprog = (gl_fragment_program *) prog;
fprog->InterpQualifier[var->location + var->index + offset + i] =
- (glsl_interp_qualifier) var->interpolation;
+ (glsl_interp_qualifier) var->data.interpolation;
if (var->data.centroid)
fprog->IsCentroid |= bitfield;
if (var->data.sample)
fprog->IsSample |= bitfield;
}
- } else if (var->mode == ir_var_system_value) {
+ } else if (var->data.mode == ir_var_system_value) {
prog->SystemValuesRead |= bitfield;
} else {
- assert(var->mode == ir_var_shader_out);
+ assert(var->data.mode == ir_var_shader_out);
prog->OutputsWritten |= bitfield;
}
}
@@ -123,7 +123,7 @@ ir_set_program_inouts_visitor::mark_whole_variable(ir_variable *var)
{
const glsl_type *type = var->type;
if (this->shader_type == GL_GEOMETRY_SHADER &&
- var->mode == ir_var_shader_in && type->is_array()) {
+ var->data.mode == ir_var_shader_in && type->is_array()) {
type = type->fields.array;
}
@@ -162,7 +162,7 @@ ir_set_program_inouts_visitor::try_mark_partial_variable(ir_variable *var,
const glsl_type *type = var->type;
if (this->shader_type == GL_GEOMETRY_SHADER &&
- var->mode == ir_var_shader_in) {
+ var->data.mode == ir_var_shader_in) {
/* The only geometry shader input that is not an array is
* gl_PrimitiveIDIn, and in that case, this code will never be reached,
* because gl_PrimitiveIDIn can't be indexed into in array fashion.
@@ -244,7 +244,7 @@ ir_set_program_inouts_visitor::visit_enter(ir_dereference_array *ir)
if (ir_dereference_variable * const deref_var =
inner_array->array->as_dereference_variable()) {
if (this->shader_type == GL_GEOMETRY_SHADER &&
- deref_var->var->mode == ir_var_shader_in) {
+ deref_var->var->data.mode == ir_var_shader_in) {
/* foo is a geometry shader input, so i is the vertex, and j the
* part of the input we're accessing.
*/
@@ -263,7 +263,7 @@ ir_set_program_inouts_visitor::visit_enter(ir_dereference_array *ir)
ir->array->as_dereference_variable()) {
/* ir => foo[i], where foo is a variable. */
if (this->shader_type == GL_GEOMETRY_SHADER &&
- deref_var->var->mode == ir_var_shader_in) {
+ deref_var->var->data.mode == ir_var_shader_in) {
/* foo is a geometry shader input, so i is the vertex, and we're
* accessing the entire input.
*/