mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-04-07 01:42:04 +00:00
[qfcc] Process attributes for blocks
And now they get their `set` and `binding` decorations so slice.vert actually works in nq-x11 :D
This commit is contained in:
parent
d952bec679
commit
de2d108e41
2 changed files with 9 additions and 1 deletions
|
@ -999,6 +999,9 @@ layout_check_qualifier (const layout_qual_t *qual, specifier_t spec)
|
|||
if (sym->table->type == stab_block) {
|
||||
obj_mask = decl_member;
|
||||
if_mask = get_interface_mask (sym->table->storage);
|
||||
} else if (is_struct (type)
|
||||
&& type_symtab (type)->type == stab_block) {
|
||||
obj_mask = decl_block;
|
||||
}
|
||||
} else {
|
||||
obj_mask = decl_block;
|
||||
|
|
|
@ -2430,13 +2430,18 @@ spirv_declare_sym (specifier_t spec, const expr_t *init, symtab_t *symtab,
|
|||
}
|
||||
}
|
||||
auto storage = spirv_storage_class (spec.storage, sym->type);
|
||||
sym->type = auto_type (sym->type, init);
|
||||
auto type = auto_type (sym->type, init);
|
||||
sym->type = type;
|
||||
sym->type = tagged_reference_type (storage, sym->type);
|
||||
sym->lvalue = !spec.is_const;
|
||||
sym->sy_type = sy_var;
|
||||
sym->var.storage = spec.storage;
|
||||
if (sym->name[0]) {
|
||||
symtab_addsymbol (symtab, sym);
|
||||
if (is_struct (type) && type_symtab (type)->type == stab_block) {
|
||||
auto block = (glsl_block_t *) type_symtab (type)->data;
|
||||
glsl_apply_attributes (block->attributes, spec);
|
||||
}
|
||||
}
|
||||
if (symtab->type == stab_param || symtab->type == stab_local) {
|
||||
if (init) {
|
||||
|
|
Loading…
Reference in a new issue