diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mapi/glapi/gen/ARB_direct_state_access.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/ARB_direct_state_access.xml b/src/mapi/glapi/gen/ARB_direct_state_access.xml index 54276ea59d9..d859021f0c7 100644 --- a/src/mapi/glapi/gen/ARB_direct_state_access.xml +++ b/src/mapi/glapi/gen/ARB_direct_state_access.xml @@ -186,7 +186,7 @@ <param name="layer" type="GLint" /> </function> - <function name="NamedFramebufferDrawBuffer"> + <function name="NamedFramebufferDrawBuffer" no_error="true"> <param name="framebuffer" type="GLuint" /> <param name="buf" type="GLenum" /> </function> 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); |