OpenGL with ARB_ES2_compatibility extension allows shaders that specify #version 100 and the shader is treated as targeting version 100 of the GLSL ES. state->es_shader flag might change during parsing based on the #version directive mentioned in the shader program. This patch adds another check to disable ARB_texture_rectangle for GLSL ES shaders.
This fixes Khronos OpenGL CTS test(Texture_Rectangle_Samplers_frag.test) failure on mesa. Cc: mesa-sta...@lists.freedesktop.org Signed-off-by: Anuj Phogat <anuj.pho...@gmail.com> --- src/glsl/builtin_types.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/glsl/builtin_types.cpp b/src/glsl/builtin_types.cpp index 92e3860..7d77cb5 100644 --- a/src/glsl/builtin_types.cpp +++ b/src/glsl/builtin_types.cpp @@ -247,6 +247,12 @@ _mesa_glsl_initialize_types(struct _mesa_glsl_parse_state *state) } } + /* State of this flag might change in process_version_directive() function. + * So, do another check here. + */ + if (state->es_shader) + state->ARB_texture_rectangle_enable = false; + /* Add types for enabled extensions. They may have already been added * by the version-based loop, but attempting to add them a second time * is harmless. -- 1.8.3.1 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev