glsl: allow standalone semicolons outside main()
authorDave Airlie <airlied@redhat.com>
Wed, 13 Jun 2018 23:52:21 +0000 (09:52 +1000)
committerDave Airlie <airlied@redhat.com>
Thu, 14 Jun 2018 00:21:51 +0000 (10:21 +1000)
GLSL 4.60 offically added this but games and older CTS suites actually
had shaders that did this, we may as well enable it everywhere.

Adding stable because it appears apps in the wild do this.

Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Cc: <mesa-stable@lists.freedesktop.org>
src/compiler/glsl/glsl_parser.yy

index 91c10ce1a607b52e3dc85ee47ed16ed21c927796..cb7376995d269768c2e22fa4bb10e922e1536d9f 100644 (file)
@@ -2706,6 +2706,7 @@ external_declaration:
    | declaration            { $$ = $1; }
    | pragma_statement       { $$ = NULL; }
    | layout_defaults        { $$ = $1; }
+   | ';'                    { $$ = NULL; }
    ;
 
 function_definition: