mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-19 10:20:30 +01:00
glsl: assert base_alignment > 0 for records
From GLSL 1.50 spec, section 4.1.8 "Structures": "Structures must have at least one member declaration." So the base_alignment should be higher than zero. Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
This commit is contained in:
parent
f3afcbecc6
commit
e21bb9e7bd
1 changed files with 1 additions and 0 deletions
|
|
@ -1511,6 +1511,7 @@ glsl_type::std430_base_alignment(bool row_major) const
|
|||
base_alignment = MAX2(base_alignment,
|
||||
field_type->std430_base_alignment(field_row_major));
|
||||
}
|
||||
assert(base_alignment > 0);
|
||||
return base_alignment;
|
||||
}
|
||||
assert(!"not reached");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue