diff options
author | Samuel Pitoiset <[email protected]> | 2017-07-19 11:19:16 +0200 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2017-07-31 13:53:39 +0200 |
commit | 8bf786d13d4e6b985aa0a2ef017ba6f5fc82c366 (patch) | |
tree | fc69173be9a8a23dd9af491a8a294559de1aade2 /src/mesa | |
parent | 0238976665e15f083dd01a5adada80a45df18c5f (diff) |
mesa: add KHR_no_error support to glNamedFramebufferDrawBuffer()
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 02596b7f689..9a049e94c73 100644 --- a/src/mesa/main/buffers.c +++ b/src/mesa/main/buffers.c @@ -344,6 +344,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) { GET_CURRENT_CONTEXT(ctx); 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); |