vbo: added vbo_check_buffers_are_unmapped() debug function
This commit is contained in:
@@ -130,6 +130,8 @@ void vbo_use_buffer_objects(struct gl_context *ctx);
|
||||
|
||||
void vbo_set_draw_func(struct gl_context *ctx, vbo_draw_func func);
|
||||
|
||||
void vbo_check_buffers_are_unmapped(struct gl_context *ctx);
|
||||
|
||||
|
||||
void GLAPIENTRY
|
||||
_es_Color4f(GLfloat r, GLfloat g, GLfloat b, GLfloat a);
|
||||
|
||||
@@ -58,6 +58,23 @@ check_buffers_are_unmapped(const struct gl_client_array **inputs)
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* A debug function that may be called from other parts of Mesa as
|
||||
* needed during debugging.
|
||||
*/
|
||||
void
|
||||
vbo_check_buffers_are_unmapped(struct gl_context *ctx)
|
||||
{
|
||||
struct vbo_context *vbo = vbo_context(ctx);
|
||||
struct vbo_exec_context *exec = &vbo->exec;
|
||||
/* check the current vertex arrays */
|
||||
check_buffers_are_unmapped(exec->array.inputs);
|
||||
/* check the current glBegin/glVertex/glEnd-style VBO */
|
||||
assert(!_mesa_bufferobj_mapped(exec->vtx.bufferobj));
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Compute min and max elements by scanning the index buffer for
|
||||
* glDraw[Range]Elements() calls.
|
||||
|
||||
Reference in New Issue
Block a user