summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTapani Pälli <[email protected]>2013-07-26 10:21:56 +0300
committerIan Romanick <[email protected]>2013-08-13 18:13:35 -0700
commitc088c24588365524f0106936f3d521c9866d9f95 (patch)
treea8b520c01b8b6b6f09208c11af517e21bdc8a5c7 /src
parent7d6dcb61cdaba3a158b2b9635bf029a17cc8543d (diff)
glsl: disable ARB_texture_cube_map_array_enable keywords for glsl es
Patch fixes a crash with Webgl 'shader-with-non-reserved-words' conformance test by ignoring desktop extension keywords on GLSL ES. v2: fix reserved and allowed desktop glsl versions (Chris) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=64087 Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> (cherry picked from commit 8c211dd742669bc03b44186e41e5aa40081d6bcc)
Diffstat (limited to 'src')
-rw-r--r--src/glsl/glsl_lexer.ll29
1 files changed, 5 insertions, 24 deletions
diff --git a/src/glsl/glsl_lexer.ll b/src/glsl/glsl_lexer.ll
index 6c5d00399b2..3340c230b26 100644
--- a/src/glsl/glsl_lexer.ll
+++ b/src/glsl/glsl_lexer.ll
@@ -324,30 +324,11 @@ sampler2DMSArray KEYWORD_WITH_ALT(150, 300, 150, 0, yyextra->ARB_texture_multi
isampler2DMSArray KEYWORD_WITH_ALT(150, 300, 150, 0, yyextra->ARB_texture_multisample_enable, ISAMPLER2DMSARRAY);
usampler2DMSArray KEYWORD_WITH_ALT(150, 300, 150, 0, yyextra->ARB_texture_multisample_enable, USAMPLER2DMSARRAY);
-samplerCubeArray {
- if (yyextra->ARB_texture_cube_map_array_enable)
- return SAMPLERCUBEARRAY;
- else
- return IDENTIFIER;
- }
-isamplerCubeArray {
- if (yyextra->ARB_texture_cube_map_array_enable)
- return ISAMPLERCUBEARRAY;
- else
- return IDENTIFIER;
- }
-usamplerCubeArray {
- if (yyextra->ARB_texture_cube_map_array_enable)
- return USAMPLERCUBEARRAY;
- else
- return IDENTIFIER;
- }
-samplerCubeArrayShadow {
- if (yyextra->ARB_texture_cube_map_array_enable)
- return SAMPLERCUBEARRAYSHADOW;
- else
- return IDENTIFIER;
- }
+ /* keywords available with ARB_texture_cube_map_array_enable extension on desktop GLSL */
+samplerCubeArray KEYWORD_WITH_ALT(400, 0, 400, 0, yyextra->ARB_texture_cube_map_array_enable, SAMPLERCUBEARRAY);
+isamplerCubeArray KEYWORD_WITH_ALT(400, 0, 400, 0, yyextra->ARB_texture_cube_map_array_enable, ISAMPLERCUBEARRAY);
+usamplerCubeArray KEYWORD_WITH_ALT(400, 0, 400, 0, yyextra->ARB_texture_cube_map_array_enable, USAMPLERCUBEARRAY);
+samplerCubeArrayShadow KEYWORD_WITH_ALT(400, 0, 400, 0, yyextra->ARB_texture_cube_map_array_enable, SAMPLERCUBEARRAYSHADOW);
samplerExternalOES {
if (yyextra->OES_EGL_image_external_enable)