From c512eca4daf75185db6f5d95b845d99bdc428950 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Mon, 14 Oct 2019 10:07:11 -0700 Subject: [PATCH] mesa: Make back_to_front_if_single_buffered non-static MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit So I can use it in fbobject.c in the next commit. Reviewed-by: Kristian H. Kristensen Reviewed-by: Marek Olšák --- src/mesa/main/buffers.c | 10 +++++----- src/mesa/main/buffers.h | 4 ++++ 2 files changed, 9 insertions(+), 5 deletions(-) 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); -- 2.30.2