Mesa (master): mesa: Make back_to_front_if_single_buffered non-static
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Oct 15 23:08:21 UTC 2019
Module: Mesa
Branch: master
Commit: c512eca4daf75185db6f5d95b845d99bdc428950
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c512eca4daf75185db6f5d95b845d99bdc428950
Author: Kenneth Graunke <kenneth at whitecape.org>
Date: Mon Oct 14 10:07:11 2019 -0700
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 <hoegsberg at google.com>
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
---
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);
More information about the mesa-commit
mailing list