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:
Samuel Iglesias Gonsalvez 2015-09-28 11:47:33 +02:00
parent f3afcbecc6
commit e21bb9e7bd

View file

@ -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");