summaryrefslogtreecommitdiffstats
path: root/src/glsl/builtin_variables.cpp
diff options
context:
space:
mode:
authorPaul Berry <[email protected]>2013-10-22 15:11:51 -0700
committerPaul Berry <[email protected]>2013-10-24 22:01:10 -0700
commit99512dc40d762d15d636ea711c496bd0350ef7f1 (patch)
tree679d5dffee517cf4816497f7a37a6e48305a576e /src/glsl/builtin_variables.cpp
parente17d671d9f64fe135a10ec54dd5b5a6beacfd991 (diff)
glsl: Keep track of centroid/interpolation mode for interface block members.
Fixes piglit tests: - interface-block-interpolation-{array,named,unnamed} - glsl-1.50-interface-block-centroid {array,named,unnamed} Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/glsl/builtin_variables.cpp')
-rw-r--r--src/glsl/builtin_variables.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/glsl/builtin_variables.cpp b/src/glsl/builtin_variables.cpp
index 1f62fcf9bdd..018daf67fec 100644
--- a/src/glsl/builtin_variables.cpp
+++ b/src/glsl/builtin_variables.cpp
@@ -326,6 +326,8 @@ per_vertex_accumulator::add_field(int slot, const glsl_type *type,
this->fields[this->num_fields].name = name;
this->fields[this->num_fields].row_major = false;
this->fields[this->num_fields].location = slot;
+ this->fields[this->num_fields].interpolation = INTERP_QUALIFIER_NONE;
+ this->fields[this->num_fields].centroid = 0;
this->num_fields++;
}
@@ -899,6 +901,8 @@ builtin_variable_generator::generate_varyings()
ir_variable *var =
add_variable(fields[i].name, fields[i].type, ir_var_shader_out,
fields[i].location);
+ var->interpolation = fields[i].interpolation;
+ var->centroid = fields[i].centroid;
var->init_interface_type(per_vertex_out_type);
}
}