[Mesa-dev] [PATCH v4 05/17] glsl parser: on desktop GL require GLSL 150 for instance names
Jordan Justen
jordan.l.justen at intel.com
Thu May 16 17:44:44 PDT 2013
Interface blocks in GLSL 150 allow an instance name to be used.
v2:
* use state->check_version
Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
Reviewed-by: Eric Anholt <eric at anholt.net>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
---
src/glsl/glsl_parser.yy | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/src/glsl/glsl_parser.yy b/src/glsl/glsl_parser.yy
index dbc25a4..70764d6 100644
--- a/src/glsl/glsl_parser.yy
+++ b/src/glsl/glsl_parser.yy
@@ -1953,11 +1953,9 @@ basic_interface_block:
* the same language versions, we don't have to explicitly
* version-check both things.
*/
- if (block->instance_name != NULL
- && !(state->language_version == 300 && state->es_shader)) {
- _mesa_glsl_error(& @1, state,
- "#version 300 es required for using uniform "
- "blocks with an instance name\n");
+ if (block->instance_name != NULL) {
+ state->check_version(150, 300, & @1, "interface blocks with "
+ "an instance name are not allowed");
}
block->layout.flags.i |= $1.flags.i;
--
1.7.10.4
More information about the mesa-dev
mailing list