From 660240da9e801c5e62ecce373464290ae1048c70 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Wed, 11 May 2016 18:24:32 -0700 Subject: [PATCH] glsl: Allow shader interface blocks in GLSL ES MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Ian Romanick Reviewed-by: Timothy Arceri Reviewed-by: Alejandro Piñeiro --- src/compiler/glsl/glsl_parser_extras.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/compiler/glsl/glsl_parser_extras.cpp b/src/compiler/glsl/glsl_parser_extras.cpp index 916fca83e22..843998dc9fc 100644 --- a/src/compiler/glsl/glsl_parser_extras.cpp +++ b/src/compiler/glsl/glsl_parser_extras.cpp @@ -895,10 +895,16 @@ _mesa_ast_process_interface_block(YYLTYPE *locp, "required for defining uniform blocks"); } } else { - if (state->es_shader || state->language_version < 150) { - _mesa_glsl_error(locp, state, - "#version 150 required for using " - "interface blocks"); + if (!state->has_shader_io_blocks()) { + if (state->es_shader) { + _mesa_glsl_error(locp, state, + "GL_OES_shader_io_blocks or #version 320 " + "required for using interface blocks"); + } else { + _mesa_glsl_error(locp, state, + "#version 150 required for using " + "interface blocks"); + } } } -- 2.30.2