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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user