summaryrefslogtreecommitdiffstats
path: root/src/glsl/builtin_variables.cpp
diff options
context:
space:
mode:
authorTapani Pälli <tapani.palli@intel.com>2013-12-12 13:51:01 +0200
committerTapani Pälli <tapani.palli@intel.com>2013-12-12 17:28:08 +0200
commit33ee2c67c0a4e8f2fefbf37dacabd14918060af5 (patch)
tree4432c7acd7722bb635e1f34074278d669a0b74da /src/glsl/builtin_variables.cpp
parentc1d3080ee86cd3d914712ffe0bb533c5d6a6b271 (diff)
downloadexternal_mesa3d-33ee2c67c0a4e8f2fefbf37dacabd14918060af5.zip
external_mesa3d-33ee2c67c0a4e8f2fefbf37dacabd14918060af5.tar.gz
external_mesa3d-33ee2c67c0a4e8f2fefbf37dacabd14918060af5.tar.bz2
glsl: move variables in to ir_variable::data, part I
This patch moves following bitfields in to the data structure: used, assigned, how_declared, mode, interpolation, origin_upper_left, pixel_center_integer Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Paul Berry <stereotype441@gmail.com>
Diffstat (limited to 'src/glsl/builtin_variables.cpp')
-rw-r--r--src/glsl/builtin_variables.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/glsl/builtin_variables.cpp b/src/glsl/builtin_variables.cpp
index 9cc11b7..2392437 100644
--- a/src/glsl/builtin_variables.cpp
+++ b/src/glsl/builtin_variables.cpp
@@ -435,9 +435,9 @@ builtin_variable_generator::add_variable(const char *name,
enum ir_variable_mode mode, int slot)
{
ir_variable *var = new(symtab) ir_variable(type, name, mode);
- var->how_declared = ir_var_declared_implicitly;
+ var->data.how_declared = ir_var_declared_implicitly;
- switch (var->mode) {
+ switch (var->data.mode) {
case ir_var_auto:
case ir_var_shader_in:
case ir_var_uniform:
@@ -793,9 +793,9 @@ builtin_variable_generator::generate_gs_special_vars()
*/
ir_variable *var;
var = add_input(VARYING_SLOT_PRIMITIVE_ID, int_t, "gl_PrimitiveIDIn");
- var->interpolation = INTERP_QUALIFIER_FLAT;
+ var->data.interpolation = INTERP_QUALIFIER_FLAT;
var = add_output(VARYING_SLOT_PRIMITIVE_ID, int_t, "gl_PrimitiveID");
- var->interpolation = INTERP_QUALIFIER_FLAT;
+ var->data.interpolation = INTERP_QUALIFIER_FLAT;
}
@@ -813,7 +813,7 @@ builtin_variable_generator::generate_fs_special_vars()
if (state->is_version(150, 0)) {
ir_variable *var =
add_input(VARYING_SLOT_PRIMITIVE_ID, int_t, "gl_PrimitiveID");
- var->interpolation = INTERP_QUALIFIER_FLAT;
+ var->data.interpolation = INTERP_QUALIFIER_FLAT;
}
/* gl_FragColor and gl_FragData were deprecated starting in desktop GLSL
@@ -936,7 +936,7 @@ 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->data.interpolation = fields[i].interpolation;
var->data.centroid = fields[i].centroid;
var->data.sample = fields[i].sample;
var->init_interface_type(per_vertex_out_type);