glsl: set glsl error if binding qualifier used on global scope

Fixes following Piglit test:
	global-scope-binding-qualifier.frag

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
This commit is contained in:
Tapani Pälli
2015-10-05 12:50:10 +03:00
parent 102f6c446b
commit a90feb581a
+11
View File
@@ -2786,6 +2786,17 @@ layout_defaults:
if (!state->default_shader_storage_qualifier->merge_qualifier(& @1, state, $1)) {
YYERROR;
}
/* From the GLSL 4.50 spec, section 4.4.5:
*
* "It is a compile-time error to specify the binding identifier for
* the global scope or for block member declarations."
*/
if (state->default_shader_storage_qualifier->flags.q.explicit_binding) {
_mesa_glsl_error(& @1, state,
"binding qualifier cannot be set for default layout");
}
$$ = NULL;
}