aboutsummaryrefslogtreecommitdiffstats
path: root/src/glsl/ast_function.cpp
diff options
context:
space:
mode:
authorTapani Pälli <[email protected]>2013-12-12 13:51:01 +0200
committerTapani Pälli <[email protected]>2013-12-12 17:28:08 +0200
commit33ee2c67c0a4e8f2fefbf37dacabd14918060af5 (patch)
tree4432c7acd7722bb635e1f34074278d669a0b74da /src/glsl/ast_function.cpp
parentc1d3080ee86cd3d914712ffe0bb533c5d6a6b271 (diff)
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 <[email protected]> Reviewed-by: Paul Berry <[email protected]>
Diffstat (limited to 'src/glsl/ast_function.cpp')
-rw-r--r--src/glsl/ast_function.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/glsl/ast_function.cpp b/src/glsl/ast_function.cpp
index 8202116324f..9dbc0d0f74d 100644
--- a/src/glsl/ast_function.cpp
+++ b/src/glsl/ast_function.cpp
@@ -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");