[Mesa-dev] [PATCH 7/9] mesa: make _mesa_draw_buffers() static

Rob Clark robdclark at gmail.com
Wed Feb 24 00:51:58 UTC 2016


On Tue, Feb 23, 2016 at 6:45 PM, Brian Paul <brianp at vmware.com> wrote:
>

Reviewed-by: Rob Clark <robdclark at gmail.com>

> ---
>  src/mesa/main/buffers.c | 14 +++++++-------
>  src/mesa/main/buffers.h |  4 ----
>  2 files changed, 7 insertions(+), 11 deletions(-)
>
> diff --git a/src/mesa/main/buffers.c b/src/mesa/main/buffers.c
> index 3b636aa..c400082 100644
> --- a/src/mesa/main/buffers.c
> +++ b/src/mesa/main/buffers.c
> @@ -323,17 +323,17 @@ _mesa_NamedFramebufferDrawBuffer(GLuint framebuffer, GLenum buf)
>
>
>  /**
> - * Called by glDrawBuffersARB; specifies the destination color renderbuffers
> - * for N fragment program color outputs.
> + * Called by glDrawBuffersARB() and glNamedFramebufferDrawBuffers() to specify
> + * the destination color renderbuffers for N fragment program color outputs.
>   * \sa _mesa_DrawBuffer
>   * \param n  number of outputs
>   * \param buffers  array [n] of renderbuffer names.  Unlike glDrawBuffer, the
>   *                 names cannot specify more than one buffer.  For example,
>   *                 GL_FRONT_AND_BACK is illegal.
>   */
> -void
> -_mesa_draw_buffers(struct gl_context *ctx, struct gl_framebuffer *fb,
> -                   GLsizei n, const GLenum *buffers, const char *caller)
> +static void
> +draw_buffers(struct gl_context *ctx, struct gl_framebuffer *fb,
> +             GLsizei n, const GLenum *buffers, const char *caller)
>  {
>     GLuint output;
>     GLbitfield usedBufferMask, supportedMask;
> @@ -508,7 +508,7 @@ void GLAPIENTRY
>  _mesa_DrawBuffers(GLsizei n, const GLenum *buffers)
>  {
>     GET_CURRENT_CONTEXT(ctx);
> -   _mesa_draw_buffers(ctx, ctx->DrawBuffer, n, buffers, "glDrawBuffers");
> +   draw_buffers(ctx, ctx->DrawBuffer, n, buffers, "glDrawBuffers");
>  }
>
>
> @@ -528,7 +528,7 @@ _mesa_NamedFramebufferDrawBuffers(GLuint framebuffer, GLsizei n,
>     else
>        fb = ctx->WinSysDrawBuffer;
>
> -   _mesa_draw_buffers(ctx, fb, n, bufs, "glNamedFramebufferDrawBuffers");
> +   draw_buffers(ctx, fb, n, bufs, "glNamedFramebufferDrawBuffers");
>  }
>
>
> diff --git a/src/mesa/main/buffers.h b/src/mesa/main/buffers.h
> index a58ed3b..9df0815 100644
> --- a/src/mesa/main/buffers.h
> +++ b/src/mesa/main/buffers.h
> @@ -46,10 +46,6 @@ _mesa_DrawBuffer( GLenum mode );
>  extern void GLAPIENTRY
>  _mesa_NamedFramebufferDrawBuffer(GLuint framebuffer, GLenum buf);
>
> -extern void
> -_mesa_draw_buffers(struct gl_context *ctx, struct gl_framebuffer *fb,
> -                   GLsizei n, const GLenum *buffers, const char *caller);
> -
>  extern void GLAPIENTRY
>  _mesa_DrawBuffers(GLsizei n, const GLenum *buffers);
>
> --
> 1.9.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list