glsl: Allow shader interface blocks in GLSL ES
authorIan Romanick <ian.d.romanick@intel.com>
Thu, 12 May 2016 01:24:32 +0000 (18:24 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Thu, 26 May 2016 23:24:25 +0000 (16:24 -0700)
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
Reviewed-by: Alejandro PiƱeiro <apinheiro@igalia.com>
src/compiler/glsl/glsl_parser_extras.cpp

index 916fca83e22180c0acefd5f255336915ed67dc5a..843998dc9fc86d0497aff61fff43c3a6411057df 100644 (file)
@@ -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");
+         }
       }
    }