ast_process_struct_or_iface_block_members(exec_list *instructions,
struct _mesa_glsl_parse_state *state,
exec_list *declarations,
- YYLTYPE &loc,
glsl_struct_field **fields_ret,
bool is_interface,
enum glsl_matrix_layout matrix_layout,
unsigned i = 0;
foreach_list_typed (ast_declarator_list, decl_list, link, declarations) {
const char *type_name;
+ YYLTYPE loc = decl_list->get_location();
decl_list->type->specifier->hir(instructions, state);
assert(decl_type);
if (is_interface && decl_type->contains_opaque()) {
- YYLTYPE loc = decl_list->get_location();
_mesa_glsl_error(&loc, state,
"uniform/buffer in non-default interface block contains "
"opaque variable");
* "Members of structures cannot be declared as atomic counter
* types."
*/
- YYLTYPE loc = decl_list->get_location();
_mesa_glsl_error(&loc, state, "atomic counter in structure, "
"shader storage block or uniform block");
}
* FINISHME: Request clarification from Khronos and add
* FINISHME: spec quotation here.
*/
- YYLTYPE loc = decl_list->get_location();
_mesa_glsl_error(&loc, state,
"image in structure, shader storage block or "
"uniform block");
}
if (qual->flags.q.constant) {
- YYLTYPE loc = decl_list->get_location();
_mesa_glsl_error(&loc, state,
"const storage qualifier cannot be applied "
"to struct or interface block members");
foreach_list_typed (ast_declaration, decl, link,
&decl_list->declarations) {
+ YYLTYPE loc = decl->get_location();
+
if (!allow_reserved_names)
validate_identifier(decl->identifier, loc, state);
ast_process_struct_or_iface_block_members(instructions,
state,
&this->declarations,
- loc,
&fields,
false,
GLSL_MATRIX_LAYOUT_INHERITED,
ast_process_struct_or_iface_block_members(&declared_variables,
state,
&this->declarations,
- loc,
&fields,
true,
matrix_layout,