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>
This commit is contained in:
Tapani Pälli
2013-12-12 13:51:01 +02:00
parent c1d3080ee8
commit 33ee2c67c0
46 changed files with 313 additions and 312 deletions
+6 -6
View File
@@ -60,7 +60,7 @@ struct interface_block_definition
if (var->type->is_array())
array_size = var->type->length;
}
explicitly_declared = (var->how_declared != ir_var_declared_implicitly);
explicitly_declared = (var->data.how_declared != ir_var_declared_implicitly);
}
/**
@@ -270,7 +270,7 @@ validate_intrastage_interface_blocks(struct gl_shader_program *prog,
continue;
interface_block_definitions *definitions;
switch (var->mode) {
switch (var->data.mode) {
case ir_var_shader_in:
definitions = &in_interfaces;
break;
@@ -298,7 +298,7 @@ validate_intrastage_interface_blocks(struct gl_shader_program *prog,
*/
definitions->store(def);
} else if (!intrastage_match(prev_def, &def,
(ir_variable_mode) var->mode)) {
(ir_variable_mode) var->data.mode)) {
linker_error(prog, "definitions of interface block `%s' do not"
" match\n", iface_type->name);
return;
@@ -318,7 +318,7 @@ validate_interstage_inout_blocks(struct gl_shader_program *prog,
/* Add input interfaces from the consumer to the symbol table. */
foreach_list(node, consumer->ir) {
ir_variable *var = ((ir_instruction *) node)->as_variable();
if (!var || !var->get_interface_type() || var->mode != ir_var_shader_in)
if (!var || !var->get_interface_type() || var->data.mode != ir_var_shader_in)
continue;
definitions.store(interface_block_definition(var));
@@ -327,7 +327,7 @@ validate_interstage_inout_blocks(struct gl_shader_program *prog,
/* Verify that the producer's output interfaces match. */
foreach_list(node, producer->ir) {
ir_variable *var = ((ir_instruction *) node)->as_variable();
if (!var || !var->get_interface_type() || var->mode != ir_var_shader_out)
if (!var || !var->get_interface_type() || var->data.mode != ir_var_shader_out)
continue;
interface_block_definition *consumer_def =
@@ -361,7 +361,7 @@ validate_interstage_uniform_blocks(struct gl_shader_program *prog,
const gl_shader *stage = stages[i];
foreach_list(node, stage->ir) {
ir_variable *var = ((ir_instruction *) node)->as_variable();
if (!var || !var->get_interface_type() || var->mode != ir_var_uniform)
if (!var || !var->get_interface_type() || var->data.mode != ir_var_uniform)
continue;
interface_block_definition *old_def =