mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 13:58:04 +02:00
glsl: interface blocks must be declared at global scope
Fixes the following 2 dEQP tests: dEQP-GLES3.functional.shaders.declarations.invalid_declarations.uniform_block_in_main_vertex dEQP-GLES3.functional.shaders.declarations.invalid_declarations.uniform_block_in_main_fragment Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
parent
6dd346c232
commit
5d655a43e6
1 changed files with 8 additions and 0 deletions
|
|
@ -5381,6 +5381,14 @@ ast_interface_block::hir(exec_list *instructions,
|
|||
{
|
||||
YYLTYPE loc = this->get_location();
|
||||
|
||||
/* Interface blocks must be declared at global scope */
|
||||
if (state->current_function != NULL) {
|
||||
_mesa_glsl_error(&loc, state,
|
||||
"Interface block `%s' must be declared "
|
||||
"at global scope",
|
||||
this->block_name);
|
||||
}
|
||||
|
||||
/* The ast_interface_block has a list of ast_declarator_lists. We
|
||||
* need to turn those into ir_variables with an association
|
||||
* with this uniform block.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue