From: Brian Paul Date: Mon, 12 Oct 2015 16:53:59 +0000 (-0600) Subject: vbo: add assertion in ATTR_UNION macro X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7f67bfaa7471ac297ec86be122f251b271cea2ca;p=mesa.git vbo: add assertion in ATTR_UNION macro Reviewed-by: Marek Olšák --- diff --git a/src/mesa/vbo/vbo_exec_api.c b/src/mesa/vbo/vbo_exec_api.c index 9de2886c499..3943523b702 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); \ } \