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@google.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
Kenneth Graunke 2019-10-14 10:07:11 -07:00
parent d947276b4a
commit c512eca4da
2 changed files with 9 additions and 5 deletions

View File

@ -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:

View File

@ -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);