From: Brian Paul Date: Mon, 21 Sep 2009 20:07:35 +0000 (-0600) Subject: mesa: make max_buffer_index() a non-static function X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=44d260329efaea2bc844afa42fb1b4f882ab74fd;p=mesa.git mesa: make max_buffer_index() a non-static function --- diff --git a/src/mesa/main/api_validate.c b/src/mesa/main/api_validate.c index 2df4f173893..507e21fe81e 100644 --- a/src/mesa/main/api_validate.c +++ b/src/mesa/main/api_validate.c @@ -54,10 +54,10 @@ index_bytes(GLenum type, GLsizei count) /** * Find the max index in the given element/index buffer */ -static GLuint -max_buffer_index(GLcontext *ctx, GLuint count, GLenum type, - const void *indices, - struct gl_buffer_object *elementBuf) +GLuint +_mesa_max_buffer_index(GLcontext *ctx, GLuint count, GLenum type, + const void *indices, + struct gl_buffer_object *elementBuf) { const GLubyte *map = NULL; GLuint max = 0; @@ -179,8 +179,8 @@ _mesa_validate_DrawElements(GLcontext *ctx, if (ctx->Const.CheckArrayBounds) { /* find max array index */ - GLuint max = max_buffer_index(ctx, count, type, indices, - ctx->Array.ElementArrayBufferObj); + GLuint max = _mesa_max_buffer_index(ctx, count, type, indices, + ctx->Array.ElementArrayBufferObj); if (max >= ctx->Array.ArrayObj->_MaxElement) { /* the max element is out of bounds of one or more enabled arrays */ _mesa_warning(ctx, "glDrawElements() index=%u is " @@ -251,8 +251,8 @@ _mesa_validate_DrawRangeElements(GLcontext *ctx, GLenum mode, } if (ctx->Const.CheckArrayBounds) { - GLuint max = max_buffer_index(ctx, count, type, indices, - ctx->Array.ElementArrayBufferObj); + GLuint max = _mesa_max_buffer_index(ctx, count, type, indices, + ctx->Array.ElementArrayBufferObj); if (max >= ctx->Array.ArrayObj->_MaxElement) { /* the max element is out of bounds of one or more enabled arrays */ return GL_FALSE; diff --git a/src/mesa/main/api_validate.h b/src/mesa/main/api_validate.h index 10f0c34e663..ff82a2966ca 100644 --- a/src/mesa/main/api_validate.h +++ b/src/mesa/main/api_validate.h @@ -30,6 +30,12 @@ #include "mtypes.h" + +extern GLuint +_mesa_max_buffer_index(GLcontext *ctx, GLuint count, GLenum type, + const void *indices, + struct gl_buffer_object *elementBuf); + extern GLboolean _mesa_validate_DrawArrays(GLcontext *ctx, GLenum mode, GLint start, GLsizei count);