glsl/cl: Properly emit layout qualifier list.
authorMichal Krol <michal@vmware.com>
Wed, 17 Feb 2010 08:54:59 +0000 (09:54 +0100)
committerMichal Krol <michal@vmware.com>
Wed, 17 Feb 2010 10:21:58 +0000 (11:21 +0100)
src/glsl/cl/sl_cl_parse.c

index 883bc1ffd3161e464bccf69ee66a774e195b8e5f..f635375c9b84761b16f2d15fe472444d006afa81 100644 (file)
@@ -760,10 +760,9 @@ _parse_layout_qualifier(struct parse_context *ctx,
             return -1;
          }
       }
-
    }
 
-   return -1;
+   return 0;
 }
 
 
@@ -1068,8 +1067,9 @@ _parse_fully_specified_type(struct parse_context *ctx,
    struct parse_state p = *ps;
 
    if (_parse_layout_qualifier(ctx, &p)) {
-      _emit(ctx, &p.out, LAYOUT_QUALIFIER_NONE);
+      return -1;
    }
+   _emit(ctx, &p.out, LAYOUT_QUALIFIER_NONE);
 
    if (_parse_invariant_qualifier(ctx, &p)) {
       _emit(ctx, &p.out, TYPE_VARIANT);