summaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/glsl_parser_extras.cpp
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2016-05-11 18:24:32 -0700
committerIan Romanick <[email protected]>2016-05-26 16:24:25 -0700
commit660240da9e801c5e62ecce373464290ae1048c70 (patch)
tree69f277f890d86515f156c552797d93bcf621f9e8 /src/compiler/glsl/glsl_parser_extras.cpp
parent7a3093efcceb22a1d190a4c72a6f3280b2cad5ca (diff)
glsl: Allow shader interface blocks in GLSL ES
Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Alejandro PiƱeiro <[email protected]>
Diffstat (limited to 'src/compiler/glsl/glsl_parser_extras.cpp')
-rw-r--r--src/compiler/glsl/glsl_parser_extras.cpp14
1 files 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");
+ }
}
}