diff options
author | Samuel Pitoiset <samuel.pitoiset@gmail.com> | 2017-07-19 11:14:48 +0200 |
---|---|---|
committer | Samuel Pitoiset <samuel.pitoiset@gmail.com> | 2017-07-31 13:53:39 +0200 |
commit | 0238976665e15f083dd01a5adada80a45df18c5f (patch) | |
tree | 2e778b61addcee070f2e11df97a6dec11197b510 /src | |
parent | e42775ba684eadaaa5a1f258c2e713a24206facb (diff) |
mesa: add KHR_no_error support to glDrawBuffer()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/mapi/glapi/gen/gl_API.xml | 2 | ||||
-rw-r--r-- | src/mesa/main/buffers.c | 16 | ||||
-rw-r--r-- | src/mesa/main/buffers.h | 3 |
3 files changed, 20 insertions, 1 deletions
diff --git a/src/mapi/glapi/gen/gl_API.xml b/src/mapi/glapi/gen/gl_API.xml index 95c448d236..4d0211a33c 100644 --- a/src/mapi/glapi/gen/gl_API.xml +++ b/src/mapi/glapi/gen/gl_API.xml @@ -2286,7 +2286,7 @@ <glx rop="125"/> </function> - <function name="DrawBuffer"> + <function name="DrawBuffer" no_error="true"> <param name="mode" type="GLenum"/> <glx rop="126"/> </function> diff --git a/src/mesa/main/buffers.c b/src/mesa/main/buffers.c index a37b39cf52..02596b7f68 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 ba06138017..630b0dce54 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 ); |