summaryrefslogtreecommitdiffstats
path: root/src/mesa/vbo
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2015-10-12 10:53:59 -0600
committerBrian Paul <brianp@vmware.com>2015-10-13 08:28:23 -0600
commit7f67bfaa7471ac297ec86be122f251b271cea2ca (patch)
tree750e5fb76dc6f09b5a2ceb383d451c22325e3950 /src/mesa/vbo
parent3491ec5930b15d5417bdf17b2a70fedaada969f1 (diff)
downloadexternal_mesa3d-7f67bfaa7471ac297ec86be122f251b271cea2ca.zip
external_mesa3d-7f67bfaa7471ac297ec86be122f251b271cea2ca.tar.gz
external_mesa3d-7f67bfaa7471ac297ec86be122f251b271cea2ca.tar.bz2
vbo: add assertion in ATTR_UNION macro
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Diffstat (limited to 'src/mesa/vbo')
-rw-r--r--src/mesa/vbo/vbo_exec_api.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/vbo/vbo_exec_api.c b/src/mesa/vbo/vbo_exec_api.c
index 9de2886..3943523 100644
--- a/src/mesa/vbo/vbo_exec_api.c
+++ b/src/mesa/vbo/vbo_exec_api.c
@@ -423,6 +423,9 @@ vbo_exec_fixup_vertex(struct gl_context *ctx, GLuint attr, GLuint newSize, GLenu
do { \
struct vbo_exec_context *exec = &vbo_context(ctx)->exec; \
int sz = (sizeof(C) / sizeof(GLfloat)); \
+ \
+ assert(sz == 1 || sz == 2); \
+ \
if (unlikely(!(ctx->Driver.NeedFlush & FLUSH_UPDATE_CURRENT))) { \
vbo_exec_BeginVertices(ctx); \
} \