From 819d57fce94b20fa0d34da6f037f0a53c4a5bdc2 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Wed, 12 Jan 2011 15:37:37 -0800 Subject: glsl: Introduce a new "const_in" variable mode. This annotation is for an "in" function parameter for which it is only legal to pass constant expressions. The only known example of this, currently, is the textureOffset functions. This should never be used for globals. --- src/glsl/ir_reader.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/glsl/ir_reader.cpp') diff --git a/src/glsl/ir_reader.cpp b/src/glsl/ir_reader.cpp index 9ed3d23508a..af85e06ae0e 100644 --- a/src/glsl/ir_reader.cpp +++ b/src/glsl/ir_reader.cpp @@ -397,6 +397,8 @@ ir_reader::read_declaration(s_expression *expr) var->mode = ir_var_auto; } else if (strcmp(qualifier->value(), "in") == 0) { var->mode = ir_var_in; + } else if (strcmp(qualifier->value(), "const_in") == 0) { + var->mode = ir_var_const_in; } else if (strcmp(qualifier->value(), "out") == 0) { var->mode = ir_var_out; } else if (strcmp(qualifier->value(), "inout") == 0) { -- cgit v1.2.3