glsl: enable offset layout qualifier for ARB_enhanced_layouts
authorTimothy Arceri <timothy.arceri@collabora.com>
Tue, 29 Dec 2015 10:15:52 +0000 (21:15 +1100)
committerTimothy Arceri <timothy.arceri@collabora.com>
Sat, 5 Mar 2016 08:38:26 +0000 (19:38 +1100)
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
src/compiler/glsl/glsl_parser.yy

index 9d6ea29355fe6ab6f6fba70ecbb95562cad46719..2fb0da1f8c0972f141a5e52f8b78aa4d4dee9e13 100644 (file)
@@ -1498,7 +1498,8 @@ layout_qualifier_id:
          $$.binding = $3;
       }
 
-      if (state->has_atomic_counters() &&
+      if ((state->has_atomic_counters() ||
+           state->has_enhanced_layouts()) &&
           match_layout_qualifier("offset", $1, state) == 0) {
          $$.flags.q.explicit_offset = 1;
          $$.offset = $3;