X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fglsl%2Fparser.cpp;h=d210cee9fe7d97c97dc48e90ec2f3b43ec6a6209;hb=abcd1fa06f9fab27c5934b4069523dd009862b18;hp=8c10c443002e130fa01f42b32ceb18cbe5f4d772;hpb=03b2ea5c9c611cfa5f02afb49ed7e05743e691b4;p=libs%2Fgl.git diff --git a/source/glsl/parser.cpp b/source/glsl/parser.cpp index 8c10c443..d210cee9 100644 --- a/source/glsl/parser.cpp +++ b/source/glsl/parser.cpp @@ -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(";"); }