X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fglsl%2Fparser.cpp;h=615d75d426a38e1e2e83dabf09fee6edd23b78e7;hb=b6c4e1a794276ca343c0c9bb0a300e729ca41931;hp=8c10c443002e130fa01f42b32ceb18cbe5f4d772;hpb=03b2ea5c9c611cfa5f02afb49ed7e05743e691b4;p=libs%2Fgl.git diff --git a/source/glsl/parser.cpp b/source/glsl/parser.cpp index 8c10c443..615d75d4 100644 --- a/source/glsl/parser.cpp +++ b/source/glsl/parser.cpp @@ -176,7 +176,7 @@ bool Parser::is_interface_qualifier(const string &token) bool Parser::is_sampling_qualifier(const string &token) { - return (token=="centroid" || token=="sample"); + return (token=="centroid" || token=="sample" || token=="patch"); } bool Parser::is_interpolation_qualifier(const string &token) @@ -707,6 +707,8 @@ RefPtr Parser::parse_image_type_declaration() type->sampled = true; else if(token=="shadow") type->shadow = true; + else if(token=="multisample") + type->multisample = true; else throw parse_error(tokenizer.get_location(), token, "image type attribute"); @@ -851,7 +853,11 @@ RefPtr Parser::parse_interface_block() if(check("[")) { var->array = true; - tokenizer.expect("]"); + if(!check("]")) + { + var->array_size = parse_expression(); + tokenizer.expect("]"); + } } tokenizer.expect(";"); }