mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-25 05:01:24 +00:00
[qfcc] Set binding and set attributes
Not sure if this will work, but it does fix some error and notice noise.
This commit is contained in:
parent
59c8e8e907
commit
34b94aec96
1 changed files with 11 additions and 3 deletions
|
@ -102,8 +102,16 @@ static void
|
|||
glsl_layout_binding (specifier_t spec, const expr_t *qual_name,
|
||||
const expr_t *val)
|
||||
{
|
||||
notice (qual_name, "%s %s", expr_string (qual_name),
|
||||
get_value_string (val->value));
|
||||
const char *name = expr_string (qual_name);
|
||||
set_attribute (&spec.sym->attributes, name, val);
|
||||
}
|
||||
|
||||
static void
|
||||
glsl_layout_set (specifier_t spec, const expr_t *qual_name,
|
||||
const expr_t *val)
|
||||
{
|
||||
const char *name = expr_string (qual_name);
|
||||
set_attribute (&spec.sym->attributes, name, val);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -204,7 +212,7 @@ static layout_qual_t layout_qualifiers[] = {
|
|||
.if_mask = I(uniform)|I(buffer),
|
||||
},
|
||||
{ .name = "set",
|
||||
.apply = E(nullptr),
|
||||
.apply = E(glsl_layout_set),
|
||||
.obj_mask = D(var)|D(block),
|
||||
.var_type = V(opaque),
|
||||
.if_mask = I(uniform)|I(buffer),
|
||||
|
|
Loading…
Reference in a new issue