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:
@@ -123,7 +123,7 @@ verify_parameter_modes(_mesa_glsl_parse_state *state,
|
||||
YYLTYPE loc = actual_ast->get_location();
|
||||
|
||||
/* Verify that 'const_in' parameters are ir_constants. */
|
||||
if (formal->mode == ir_var_const_in &&
|
||||
if (formal->data.mode == ir_var_const_in &&
|
||||
actual->ir_type != ir_type_constant) {
|
||||
_mesa_glsl_error(&loc, state,
|
||||
"parameter `in %s' must be a constant expression",
|
||||
@@ -132,10 +132,10 @@ verify_parameter_modes(_mesa_glsl_parse_state *state,
|
||||
}
|
||||
|
||||
/* Verify that 'out' and 'inout' actual parameters are lvalues. */
|
||||
if (formal->mode == ir_var_function_out
|
||||
|| formal->mode == ir_var_function_inout) {
|
||||
if (formal->data.mode == ir_var_function_out
|
||||
|| formal->data.mode == ir_var_function_inout) {
|
||||
const char *mode = NULL;
|
||||
switch (formal->mode) {
|
||||
switch (formal->data.mode) {
|
||||
case ir_var_function_out: mode = "out"; break;
|
||||
case ir_var_function_inout: mode = "inout"; break;
|
||||
default: assert(false); break;
|
||||
@@ -155,7 +155,7 @@ verify_parameter_modes(_mesa_glsl_parse_state *state,
|
||||
|
||||
ir_variable *var = actual->variable_referenced();
|
||||
if (var)
|
||||
var->assigned = true;
|
||||
var->data.assigned = true;
|
||||
|
||||
if (var && var->data.read_only) {
|
||||
_mesa_glsl_error(&loc, state,
|
||||
@@ -304,7 +304,7 @@ generate_call(exec_list *instructions, ir_function_signature *sig,
|
||||
assert(formal != NULL);
|
||||
|
||||
if (formal->type->is_numeric() || formal->type->is_boolean()) {
|
||||
switch (formal->mode) {
|
||||
switch (formal->data.mode) {
|
||||
case ir_var_const_in:
|
||||
case ir_var_function_in: {
|
||||
ir_rvalue *converted
|
||||
@@ -316,7 +316,7 @@ generate_call(exec_list *instructions, ir_function_signature *sig,
|
||||
case ir_var_function_inout:
|
||||
fix_parameter(ctx, actual, formal->type,
|
||||
instructions, &post_call_conversions,
|
||||
formal->mode == ir_var_function_inout);
|
||||
formal->data.mode == ir_var_function_inout);
|
||||
break;
|
||||
default:
|
||||
assert (!"Illegal formal parameter mode");
|
||||
|
||||
Reference in New Issue
Block a user