From: Kenneth Graunke Date: Mon, 14 Oct 2019 17:07:11 +0000 (-0700) Subject: mesa: Make back_to_front_if_single_buffered non-static X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c512eca4daf75185db6f5d95b845d99bdc428950;p=mesa.git mesa: Make back_to_front_if_single_buffered non-static So I can use it in fbobject.c in the next commit. Reviewed-by: Kristian H. Kristensen Reviewed-by: Marek Olšák --- diff --git a/src/mesa/main/buffers.c b/src/mesa/main/buffers.c index f6a347911c7..5dc00116ead 100644 --- a/src/mesa/main/buffers.c +++ b/src/mesa/main/buffers.c @@ -85,9 +85,9 @@ supported_buffer_bitmask(const struct gl_context *ctx, return mask; } -static GLenum -back_to_front_if_single_buffered(const struct gl_framebuffer *fb, - GLenum buffer) +GLenum +_mesa_back_to_front_if_single_buffered(const struct gl_framebuffer *fb, + GLenum buffer) { /* If the front buffer is the only buffer, GL_BACK and all other flags * that include BACK select the front buffer for drawing. There are @@ -136,7 +136,7 @@ back_to_front_if_single_buffered(const struct gl_framebuffer *fb, static GLbitfield draw_buffer_enum_to_bitmask(const struct gl_context *ctx, GLenum buffer) { - buffer = back_to_front_if_single_buffered(ctx->DrawBuffer, buffer); + buffer = _mesa_back_to_front_if_single_buffered(ctx->DrawBuffer, buffer); switch (buffer) { case GL_NONE: @@ -201,7 +201,7 @@ draw_buffer_enum_to_bitmask(const struct gl_context *ctx, GLenum buffer) static gl_buffer_index read_buffer_enum_to_index(const struct gl_context *ctx, GLenum buffer) { - buffer = back_to_front_if_single_buffered(ctx->ReadBuffer, buffer); + buffer = _mesa_back_to_front_if_single_buffered(ctx->ReadBuffer, buffer); switch (buffer) { case GL_FRONT: diff --git a/src/mesa/main/buffers.h b/src/mesa/main/buffers.h index c24b636e19d..28e26b57558 100644 --- a/src/mesa/main/buffers.h +++ b/src/mesa/main/buffers.h @@ -78,6 +78,10 @@ _mesa_readbuffer(struct gl_context *ctx, struct gl_framebuffer *fb, extern void _mesa_update_draw_buffers(struct gl_context *ctx); +extern GLenum +_mesa_back_to_front_if_single_buffered(const struct gl_framebuffer *fb, + GLenum buffer); + void GLAPIENTRY _mesa_ReadBuffer_no_error(GLenum mode);