From a187fcf584c11e0af2f64798d0fb7dde51c23c2d Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Wed, 19 Jul 2017 13:50:12 +0200 Subject: mesa: add KHR_no_error support to glNamedFramebufferDrawBuffers() Signed-off-by: Samuel Pitoiset Reviewed-by: Timothy Arceri --- src/mapi/glapi/gen/ARB_direct_state_access.xml | 2 +- src/mesa/main/buffers.c | 17 +++++++++++++++++ src/mesa/main/buffers.h | 4 ++++ 3 files changed, 22 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/mapi/glapi/gen/ARB_direct_state_access.xml b/src/mapi/glapi/gen/ARB_direct_state_access.xml index 3257aace9d4..f85d2d5ed14 100644 --- a/src/mapi/glapi/gen/ARB_direct_state_access.xml +++ b/src/mapi/glapi/gen/ARB_direct_state_access.xml @@ -191,7 +191,7 @@ - + diff --git a/src/mesa/main/buffers.c b/src/mesa/main/buffers.c index 68500abf960..5c37f0f5376 100644 --- a/src/mesa/main/buffers.c +++ b/src/mesa/main/buffers.c @@ -622,6 +622,23 @@ _mesa_DrawBuffers(GLsizei n, const GLenum *buffers) } +void GLAPIENTRY +_mesa_NamedFramebufferDrawBuffers_no_error(GLuint framebuffer, GLsizei n, + const GLenum *bufs) +{ + GET_CURRENT_CONTEXT(ctx); + struct gl_framebuffer *fb; + + if (framebuffer) { + fb = _mesa_lookup_framebuffer(ctx, framebuffer); + } else { + fb = ctx->WinSysDrawBuffer; + } + + draw_buffers_no_error(ctx, fb, n, bufs, "glNamedFramebufferDrawBuffers"); +} + + void GLAPIENTRY _mesa_NamedFramebufferDrawBuffers(GLuint framebuffer, GLsizei n, const GLenum *bufs) diff --git a/src/mesa/main/buffers.h b/src/mesa/main/buffers.h index e11b74f16ff..e48400668d0 100644 --- a/src/mesa/main/buffers.h +++ b/src/mesa/main/buffers.h @@ -58,6 +58,10 @@ _mesa_DrawBuffers_no_error(GLsizei n, const GLenum *buffers); extern void GLAPIENTRY _mesa_DrawBuffers(GLsizei n, const GLenum *buffers); +void GLAPIENTRY +_mesa_NamedFramebufferDrawBuffers_no_error(GLuint framebuffer, GLsizei n, + const GLenum *bufs); + extern void GLAPIENTRY _mesa_NamedFramebufferDrawBuffers(GLuint framebuffer, GLsizei n, const GLenum *bufs); -- cgit v1.2.3