summaryrefslogtreecommitdiffstats
path: root/src/mesa/vbo/vbo_save_api.c
diff options
context:
space:
mode:
authorMathias Fröhlich <[email protected]>2018-03-22 05:34:09 +0100
committerMathias Fröhlich <[email protected]>2018-03-23 19:59:02 +0100
commit4a8ef1f5d4c5fc96194be65045e6a3d4f5b9f913 (patch)
tree0852c2ea2e19b15fcb23c4b299e8ac9d45b38a85 /src/mesa/vbo/vbo_save_api.c
parent1a131aaf4b03502980ea109c44531da8f965ecaa (diff)
vbo: Make sure the internal VAO's stay within limits.
Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Mathias Fröhlich <[email protected]>
Diffstat (limited to 'src/mesa/vbo/vbo_save_api.c')
-rw-r--r--src/mesa/vbo/vbo_save_api.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/vbo/vbo_save_api.c b/src/mesa/vbo/vbo_save_api.c
index 9dd9c7d7d22..a367a569c8d 100644
--- a/src/mesa/vbo/vbo_save_api.c
+++ b/src/mesa/vbo/vbo_save_api.c
@@ -493,6 +493,7 @@ update_vao(struct gl_context *ctx,
*vao = _mesa_new_vao(ctx, ~((GLuint)0));
/* Bind the buffer object at binding point 0 */
+ assert(stride <= ctx->Const.MaxVertexAttribStride);
_mesa_bind_vertex_buffer(ctx, *vao, 0, bo, buffer_offset, stride, false);
/* Retrieve the mapping from VBO_ATTRIB to VERT_ATTRIB space
@@ -504,6 +505,7 @@ update_vao(struct gl_context *ctx,
while (mask) {
const int vao_attr = u_bit_scan(&mask);
const GLubyte vbo_attr = vao_to_vbo_map[vao_attr];
+ assert(offset[vbo_attr] <= ctx->Const.MaxVertexAttribRelativeOffset);
_vbo_set_attrib_format(ctx, *vao, vao_attr, buffer_offset,
size[vbo_attr], type[vbo_attr], offset[vbo_attr]);