From: Timothy Arceri Date: Mon, 25 Jun 2018 00:31:34 +0000 (+1000) Subject: mesa: make valid_draw_indirect_multi() accessible externally X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=103b8f11d660457c8b1c0041bb85a2f0e8d2ec95;p=mesa.git mesa: make valid_draw_indirect_multi() accessible externally We will use this to add compat support to ARB_multi_draw_indirect in the following patch. Reviewed-by: Marek Olšák --- diff --git a/src/mesa/main/draw_validate.c b/src/mesa/main/draw_validate.c index 352263c5c78..c0a234a2bc2 100644 --- a/src/mesa/main/draw_validate.c +++ b/src/mesa/main/draw_validate.c @@ -1192,10 +1192,10 @@ valid_draw_indirect_elements(struct gl_context *ctx, return valid_draw_indirect(ctx, mode, indirect, size, name); } -static inline GLboolean -valid_draw_indirect_multi(struct gl_context *ctx, - GLsizei primcount, GLsizei stride, - const char *name) +GLboolean +_mesa_valid_draw_indirect_multi(struct gl_context *ctx, + GLsizei primcount, GLsizei stride, + const char *name) { /* From the ARB_multi_draw_indirect specification: @@ -1259,8 +1259,8 @@ _mesa_validate_MultiDrawArraysIndirect(struct gl_context *ctx, /* caller has converted stride==0 to drawArraysNumParams * sizeof(GLuint) */ assert(stride != 0); - if (!valid_draw_indirect_multi(ctx, primcount, stride, - "glMultiDrawArraysIndirect")) + if (!_mesa_valid_draw_indirect_multi(ctx, primcount, stride, + "glMultiDrawArraysIndirect")) return GL_FALSE; /* number of bytes of the indirect buffer which will be read */ @@ -1287,8 +1287,8 @@ _mesa_validate_MultiDrawElementsIndirect(struct gl_context *ctx, /* caller has converted stride==0 to drawElementsNumParams * sizeof(GLuint) */ assert(stride != 0); - if (!valid_draw_indirect_multi(ctx, primcount, stride, - "glMultiDrawElementsIndirect")) + if (!_mesa_valid_draw_indirect_multi(ctx, primcount, stride, + "glMultiDrawElementsIndirect")) return GL_FALSE; /* number of bytes of the indirect buffer which will be read */ @@ -1366,8 +1366,8 @@ _mesa_validate_MultiDrawArraysIndirectCount(struct gl_context *ctx, /* caller has converted stride==0 to drawArraysNumParams * sizeof(GLuint) */ assert(stride != 0); - if (!valid_draw_indirect_multi(ctx, maxdrawcount, stride, - "glMultiDrawArraysIndirectCountARB")) + if (!_mesa_valid_draw_indirect_multi(ctx, maxdrawcount, stride, + "glMultiDrawArraysIndirectCountARB")) return GL_FALSE; /* number of bytes of the indirect buffer which will be read */ @@ -1397,8 +1397,8 @@ _mesa_validate_MultiDrawElementsIndirectCount(struct gl_context *ctx, /* caller has converted stride==0 to drawElementsNumParams * sizeof(GLuint) */ assert(stride != 0); - if (!valid_draw_indirect_multi(ctx, maxdrawcount, stride, - "glMultiDrawElementsIndirectCountARB")) + if (!_mesa_valid_draw_indirect_multi(ctx, maxdrawcount, stride, + "glMultiDrawElementsIndirectCountARB")) return GL_FALSE; /* number of bytes of the indirect buffer which will be read */ diff --git a/src/mesa/main/draw_validate.h b/src/mesa/main/draw_validate.h index 7a181153fb7..d015c7e830e 100644 --- a/src/mesa/main/draw_validate.h +++ b/src/mesa/main/draw_validate.h @@ -44,6 +44,9 @@ _mesa_is_valid_prim_mode(const struct gl_context *ctx, GLenum mode); extern GLboolean _mesa_valid_prim_mode(struct gl_context *ctx, GLenum mode, const char *name); +extern GLboolean +_mesa_valid_draw_indirect_multi(struct gl_context *ctx, GLsizei primcount, + GLsizei stride, const char *name); extern GLboolean _mesa_validate_DrawArrays(struct gl_context *ctx, GLenum mode, GLsizei count);