mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-07 00:00:12 +01:00
glsl: Make sure that we don't put too many bitfields in ast_type_qualifier.
We do some tests of qualifiers using a union containing an int and the struct full of bitfields, so make sure the bitfields don't spill outside the int. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
parent
e62ca57199
commit
f2e14238a7
1 changed files with 2 additions and 0 deletions
|
|
@ -1936,6 +1936,8 @@ apply_type_qualifier_to_variable(const struct ast_type_qualifier *qual,
|
|||
bool ubo_qualifiers_valid,
|
||||
bool is_parameter)
|
||||
{
|
||||
STATIC_ASSERT(sizeof(qual->flags.q) <= sizeof(qual->flags.i));
|
||||
|
||||
if (qual->flags.q.invariant) {
|
||||
if (var->used) {
|
||||
_mesa_glsl_error(loc, state,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue