From 0238976665e15f083dd01a5adada80a45df18c5f Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Wed, 19 Jul 2017 11:14:48 +0200 Subject: mesa: add KHR_no_error support to glDrawBuffer() Signed-off-by: Samuel Pitoiset Reviewed-by: Timothy Arceri --- src/mesa/main/buffers.c | 16 ++++++++++++++++ src/mesa/main/buffers.h | 3 +++ 2 files changed, 19 insertions(+) (limited to 'src/mesa') diff --git a/src/mesa/main/buffers.c b/src/mesa/main/buffers.c index a37b39cf525..02596b7f689 100644 --- a/src/mesa/main/buffers.c +++ b/src/mesa/main/buffers.c @@ -319,6 +319,22 @@ draw_buffer_error(struct gl_context *ctx, struct gl_framebuffer *fb, } +static void +draw_buffer_no_error(struct gl_context *ctx, struct gl_framebuffer *fb, + GLenum buffer, const char *caller) +{ + draw_buffer(ctx, fb, buffer, caller, true); +} + + +void GLAPIENTRY +_mesa_DrawBuffer_no_error(GLenum buffer) +{ + GET_CURRENT_CONTEXT(ctx); + draw_buffer_no_error(ctx, ctx->DrawBuffer, buffer, "glDrawBuffer"); +} + + void GLAPIENTRY _mesa_DrawBuffer(GLenum buffer) { diff --git a/src/mesa/main/buffers.h b/src/mesa/main/buffers.h index ba06138017e..630b0dce546 100644 --- a/src/mesa/main/buffers.h +++ b/src/mesa/main/buffers.h @@ -40,6 +40,9 @@ struct gl_context; struct gl_framebuffer; +void GLAPIENTRY +_mesa_DrawBuffer_no_error(GLenum mode); + extern void GLAPIENTRY _mesa_DrawBuffer( GLenum mode ); -- cgit v1.2.3