glsl: resource is a reserved keyword in GLSL 4.20 as well
authorDave Airlie <airlied@redhat.com>
Tue, 3 May 2016 06:44:20 +0000 (16:44 +1000)
committerDave Airlie <airlied@redhat.com>
Tue, 3 May 2016 20:44:45 +0000 (06:44 +1000)
resource just appears in GLSL 4.20 without any fanfare.

Fixes GL43-CTX.CommonBugs.CommonBug_ReservedNames

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/compiler/glsl/glsl_lexer.ll

index 8a562cbcb00cdddb670cce313c53592b60163bed..11711eea231d5fca7bd344a79fbe05bdc76af437 100644 (file)
@@ -583,7 +583,7 @@ isamplerBuffer      KEYWORD_WITH_ALT(140, 300, 140, 320, yyextra->EXT_texture_buffer_
 usamplerBuffer KEYWORD_WITH_ALT(140, 300, 140, 320, yyextra->EXT_texture_buffer_enable || yyextra->OES_texture_buffer_enable, USAMPLERBUFFER);
 
     /* Additional reserved words in GLSL ES 3.00 */
-resource       KEYWORD(0, 300, 0, 0, RESOURCE);
+resource       KEYWORD(420, 300, 0, 0, RESOURCE);
 sample         KEYWORD_WITH_ALT(400, 300, 400, 320, yyextra->ARB_gpu_shader5_enable || yyextra->OES_shader_multisample_interpolation_enable, SAMPLE);
 subroutine     KEYWORD_WITH_ALT(400, 300, 400, 0, yyextra->ARB_shader_subroutine_enable, SUBROUTINE);