diff options
author | Chris Forbes <chrisf@ijw.co.nz> | 2014-04-27 16:03:54 +1200 |
---|---|---|
committer | Chris Forbes <chrisf@ijw.co.nz> | 2014-06-04 18:56:05 +1200 |
commit | 5ecffe5a3a41cac5fe28d8136095a0c2acf385a8 (patch) | |
tree | 0c63558b0000aae323abfbaff2b693bd1e3e228d /src/glsl/glsl_parser_extras.cpp | |
parent | 4b756b20c446bbaf0911d1b66c5a405ab3b133ef (diff) | |
download | external_mesa3d-5ecffe5a3a41cac5fe28d8136095a0c2acf385a8.zip external_mesa3d-5ecffe5a3a41cac5fe28d8136095a0c2acf385a8.tar.gz external_mesa3d-5ecffe5a3a41cac5fe28d8136095a0c2acf385a8.tar.bz2 |
glsl: Add support for `precise` redeclarations
This works like glsl-1.20+'s invariant redeclarations, but with fewer
restrictions, since `precise` is allowed on pretty much anything.
Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Diffstat (limited to 'src/glsl/glsl_parser_extras.cpp')
-rw-r--r-- | src/glsl/glsl_parser_extras.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/glsl/glsl_parser_extras.cpp b/src/glsl/glsl_parser_extras.cpp index d3339e7..f3c5bd0 100644 --- a/src/glsl/glsl_parser_extras.cpp +++ b/src/glsl/glsl_parser_extras.cpp @@ -1098,8 +1098,10 @@ ast_declarator_list::print(void) const if (type) type->print(); - else + else if (invariant) printf("invariant "); + else + printf("precise "); foreach_list_const (ptr, & this->declarations) { if (ptr != this->declarations.get_head()) @@ -1117,6 +1119,7 @@ ast_declarator_list::ast_declarator_list(ast_fully_specified_type *type) { this->type = type; this->invariant = false; + this->precise = false; } void |