summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSamuel Iglesias Gonsalvez <[email protected]>2015-09-28 11:47:33 +0200
committerSamuel Iglesias Gonsalvez <[email protected]>2015-09-30 08:13:07 +0200
commite21bb9e7bdea0f73809759d3c248048eedd79663 (patch)
tree5e85b414900a8075781239459a94b9bf9640c248 /src
parentf3afcbecc63ec565a0386cda554d145ca908367d (diff)
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 <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/glsl/glsl_types.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/glsl/glsl_types.cpp b/src/glsl/glsl_types.cpp
index 0ead0f2a327..8586b2e01f3 100644
--- a/src/glsl/glsl_types.cpp
+++ b/src/glsl/glsl_types.cpp
@@ -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");