mesa: add KHR_no_error support to glNamedFramebufferDrawBuffer()
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 19 Jul 2017 09:19:16 +0000 (11:19 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 31 Jul 2017 11:53:39 +0000 (13:53 +0200)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/mapi/glapi/gen/ARB_direct_state_access.xml
src/mesa/main/buffers.c
src/mesa/main/buffers.h

index 54276ea59d93ca6e4a09094b5031e32e5e7e393b..d859021f0c74197d98cd6ff9d8a7aef9bf1c5c66 100644 (file)
       <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>
index 02596b7f68925d3fb1a3bccb318a75b7634e2536..9a049e94c736e889a6f4ff5482b1e99730ac807e 100644 (file)
@@ -343,6 +343,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)
 {
index 630b0dce5466a007c8a7865d990f626ba59c0e87..e86da341d609081fe8ba6a40678ffbd30578694d 100644 (file)
@@ -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);