mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 11:28:05 +02:00
glsl: Propagate explicit binding information from AST to IR.
Rather than creating a new "binding" field in ir_variable, we reuse constant_value since the linker code for handling uniform initializers uses that. Since UBOs and samplers can't otherwise have initializers/constant values, there shouldn't be a conflict. v2: Propagate the new binding variable around too. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Paul Berry <stereotype441@gmail.com>
This commit is contained in:
parent
4da1504c0f
commit
d4375fc016
1 changed files with 5 additions and 2 deletions
|
|
@ -2158,8 +2158,11 @@ apply_type_qualifier_to_variable(const struct ast_type_qualifier *qual,
|
||||||
"explicit index requires explicit location\n");
|
"explicit index requires explicit location\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (qual->flags.q.explicit_binding)
|
if (qual->flags.q.explicit_binding &&
|
||||||
validate_binding_qualifier(state, loc, var, qual);
|
validate_binding_qualifier(state, loc, var, qual)) {
|
||||||
|
var->explicit_binding = true;
|
||||||
|
var->binding = qual->binding;
|
||||||
|
}
|
||||||
|
|
||||||
/* Does the declaration use the deprecated 'attribute' or 'varying'
|
/* Does the declaration use the deprecated 'attribute' or 'varying'
|
||||||
* keywords?
|
* keywords?
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue