From: Samuel Pitoiset Date: Wed, 19 Jul 2017 09:19:16 +0000 (+0200) Subject: mesa: add KHR_no_error support to glNamedFramebufferDrawBuffer() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8bf786d13d4e6b985aa0a2ef017ba6f5fc82c366;p=mesa.git mesa: add KHR_no_error support to glNamedFramebufferDrawBuffer() Signed-off-by: Samuel Pitoiset Reviewed-by: Timothy Arceri --- diff --git a/src/mapi/glapi/gen/ARB_direct_state_access.xml b/src/mapi/glapi/gen/ARB_direct_state_access.xml index 54276ea59d9..d859021f0c7 100644 --- a/src/mapi/glapi/gen/ARB_direct_state_access.xml +++ b/src/mapi/glapi/gen/ARB_direct_state_access.xml @@ -186,7 +186,7 @@ - + diff --git a/src/mesa/main/buffers.c b/src/mesa/main/buffers.c index 02596b7f689..9a049e94c73 100644 --- a/src/mesa/main/buffers.c +++ b/src/mesa/main/buffers.c @@ -343,6 +343,22 @@ _mesa_DrawBuffer(GLenum buffer) } +void GLAPIENTRY +_mesa_NamedFramebufferDrawBuffer_no_error(GLuint framebuffer, GLenum buf) +{ + GET_CURRENT_CONTEXT(ctx); + struct gl_framebuffer *fb; + + if (framebuffer) { + fb = _mesa_lookup_framebuffer(ctx, framebuffer); + } else { + fb = ctx->WinSysDrawBuffer; + } + + draw_buffer_no_error(ctx, fb, buf, "glNamedFramebufferDrawBuffer"); +} + + void GLAPIENTRY _mesa_NamedFramebufferDrawBuffer(GLuint framebuffer, GLenum buf) { diff --git a/src/mesa/main/buffers.h b/src/mesa/main/buffers.h index 630b0dce546..e86da341d60 100644 --- a/src/mesa/main/buffers.h +++ b/src/mesa/main/buffers.h @@ -46,6 +46,9 @@ _mesa_DrawBuffer_no_error(GLenum mode); extern void GLAPIENTRY _mesa_DrawBuffer( GLenum mode ); +void GLAPIENTRY +_mesa_NamedFramebufferDrawBuffer_no_error(GLuint framebuffer, GLenum buf); + extern void GLAPIENTRY _mesa_NamedFramebufferDrawBuffer(GLuint framebuffer, GLenum buf);