diff options
author | Samuel Pitoiset <[email protected]> | 2017-07-19 13:46:25 +0200 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2017-07-31 13:53:40 +0200 |
commit | 9337e4d38a5f057507690bfe11a6ba99a1ec81d3 (patch) | |
tree | b23ac2103bdcbe016c6b8a0189773de1c91e9e6b /src/mesa | |
parent | 966108a8038ee1e674182ad5766107a2fb54abc8 (diff) |
mesa: add KHR_no_error support to glDrawBuffers()
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/main/buffers.c | 16 | ||||
-rw-r--r-- | src/mesa/main/buffers.h | 3 |
2 files changed, 19 insertions, 0 deletions
diff --git a/src/mesa/main/buffers.c b/src/mesa/main/buffers.c index 2288e51f6ea..68500abf960 100644 --- a/src/mesa/main/buffers.c +++ b/src/mesa/main/buffers.c @@ -598,6 +598,22 @@ draw_buffers_error(struct gl_context *ctx, struct gl_framebuffer *fb, GLsizei n, } +static void +draw_buffers_no_error(struct gl_context *ctx, struct gl_framebuffer *fb, + GLsizei n, const GLenum *buffers, const char *caller) +{ + draw_buffers(ctx, fb, n, buffers, caller, true); +} + + +void GLAPIENTRY +_mesa_DrawBuffers_no_error(GLsizei n, const GLenum *buffers) +{ + GET_CURRENT_CONTEXT(ctx); + draw_buffers_no_error(ctx, ctx->DrawBuffer, n, buffers, "glDrawBuffers"); +} + + void GLAPIENTRY _mesa_DrawBuffers(GLsizei n, const GLenum *buffers) { diff --git a/src/mesa/main/buffers.h b/src/mesa/main/buffers.h index e86da341d60..e11b74f16ff 100644 --- a/src/mesa/main/buffers.h +++ b/src/mesa/main/buffers.h @@ -52,6 +52,9 @@ _mesa_NamedFramebufferDrawBuffer_no_error(GLuint framebuffer, GLenum buf); extern void GLAPIENTRY _mesa_NamedFramebufferDrawBuffer(GLuint framebuffer, GLenum buf); +void GLAPIENTRY +_mesa_DrawBuffers_no_error(GLsizei n, const GLenum *buffers); + extern void GLAPIENTRY _mesa_DrawBuffers(GLsizei n, const GLenum *buffers); |