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 <tapani.palli@intel.com>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
Tapani Pälli 2013-07-26 10:21:56 +03:00 committed by Kenneth Graunke
parent 124f567f1d
commit 8c211dd742

View file

@ -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); 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); usampler2DMSArray KEYWORD_WITH_ALT(150, 300, 150, 0, yyextra->ARB_texture_multisample_enable, USAMPLER2DMSARRAY);
samplerCubeArray { /* keywords available with ARB_texture_cube_map_array_enable extension on desktop GLSL */
if (yyextra->ARB_texture_cube_map_array_enable) samplerCubeArray KEYWORD_WITH_ALT(400, 0, 400, 0, yyextra->ARB_texture_cube_map_array_enable, SAMPLERCUBEARRAY);
return SAMPLERCUBEARRAY; isamplerCubeArray KEYWORD_WITH_ALT(400, 0, 400, 0, yyextra->ARB_texture_cube_map_array_enable, ISAMPLERCUBEARRAY);
else usamplerCubeArray KEYWORD_WITH_ALT(400, 0, 400, 0, yyextra->ARB_texture_cube_map_array_enable, USAMPLERCUBEARRAY);
return IDENTIFIER; samplerCubeArrayShadow KEYWORD_WITH_ALT(400, 0, 400, 0, yyextra->ARB_texture_cube_map_array_enable, SAMPLERCUBEARRAYSHADOW);
}
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;
}
samplerExternalOES { samplerExternalOES {
if (yyextra->OES_EGL_image_external_enable) if (yyextra->OES_EGL_image_external_enable)