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