summaryrefslogtreecommitdiffstats
path: root/src/glsl/link_uniforms.cpp
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2015-02-21 12:53:43 -0500
committerIlia Mirkin <[email protected]>2015-02-21 17:27:24 -0500
commitc2ece77678c19f6aee1d9a3ef65a1251a59dd2ae (patch)
tree604ef14b94ac866d00bd4be8ba289d633d62a56e /src/glsl/link_uniforms.cpp
parent1763494b315179495eabb97d50d025a04a6537e2 (diff)
glsl: ensure that enter/leave record get a record type
May make life easier for tools like Coverity. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/glsl/link_uniforms.cpp')
-rw-r--r--src/glsl/link_uniforms.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/glsl/link_uniforms.cpp b/src/glsl/link_uniforms.cpp
index 347f079fa42..799c74bb9e6 100644
--- a/src/glsl/link_uniforms.cpp
+++ b/src/glsl/link_uniforms.cpp
@@ -546,12 +546,14 @@ private:
virtual void enter_record(const glsl_type *type, const char *name,
bool row_major) {
+ assert(type->is_record());
this->ubo_byte_offset = glsl_align(
this->ubo_byte_offset, type->std140_base_alignment(row_major));
}
virtual void leave_record(const glsl_type *type, const char *name,
bool row_major) {
+ assert(type->is_record());
this->ubo_byte_offset = glsl_align(
this->ubo_byte_offset, type->std140_base_alignment(row_major));
}