vk/image: Check extent does not exceed surface type limits
[mesa.git] / src / glsl / glsl_lexer.ll
index f0e047ebd704aabe684141a2126d730cceb9c7d9..10db5b8b632e4fe8d97fea5993ed3724252c25df 100644 (file)
@@ -187,6 +187,15 @@ HASH               ^{SPC}#{SPC}
                                    * one-based.
                                    */
                                   yylineno = strtol(ptr, &ptr, 0) - 1;
+
+                                   /* From GLSL 3.30 and GLSL ES on, after processing the
+                                    * line directive (including its new-line), the implementation
+                                    * will behave as if it is compiling at the line number passed
+                                    * as argument. It was line number + 1 in older specifications.
+                                    */
+                                   if (yyextra->is_version(330, 100))
+                                      yylineno--;
+
                                   yylloc->source = strtol(ptr, NULL, 0);
                                }
 {HASH}line{SPCP}{INT}{SPC}$    {
@@ -202,6 +211,14 @@ HASH               ^{SPC}#{SPC}
                                    * one-based.
                                    */
                                   yylineno = strtol(ptr, &ptr, 0) - 1;
+
+                                   /* From GLSL 3.30 and GLSL ES on, after processing the
+                                    * line directive (including its new-line), the implementation
+                                    * will behave as if it is compiling at the line number passed
+                                    * as argument. It was line number + 1 in older specifications.
+                                    */
+                                   if (yyextra->is_version(330, 100))
+                                      yylineno--;
                                }
 ^{SPC}#{SPC}pragma{SPCP}debug{SPC}\({SPC}on{SPC}\) {
                                  BEGIN PP;
@@ -392,7 +409,7 @@ restrict    KEYWORD_WITH_ALT(420, 300, 420, 0, yyextra->ARB_shader_image_load_store
 readonly       KEYWORD_WITH_ALT(420, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, READONLY);
 writeonly      KEYWORD_WITH_ALT(420, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, WRITEONLY);
 
-atomic_uint     KEYWORD_WITH_ALT(420, 300, 420, 0, yyextra->ARB_shader_atomic_counters_enable, ATOMIC_UINT);
+atomic_uint     KEYWORD_WITH_ALT(420, 300, 420, 310, yyextra->ARB_shader_atomic_counters_enable, ATOMIC_UINT);
 
 struct         return STRUCT;
 void           return VOID_TOK;