mesa: add KHR_no_error support to glNamedFramebufferDrawBuffers()
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 19 Jul 2017 11:50:12 +0000 (13:50 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 31 Jul 2017 11:53:40 +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 3257aace9d49cdbee56d605d20eeda35e47d0a53..f85d2d5ed14eaa3a1b321606e06b72bc312fe727 100644 (file)
       <param name="buf" type="GLenum" />
    </function>
 
-   <function name="NamedFramebufferDrawBuffers">
+   <function name="NamedFramebufferDrawBuffers" no_error="true">
       <param name="framebuffer" type="GLuint" />
       <param name="n" type="GLsizei" />
       <param name="bufs" type="const GLenum *" />
index 68500abf960d15c7c03146fb4848e99e59cabd35..5c37f0f5376fae13cd634703bc87b7f0b45863d9 100644 (file)
@@ -622,6 +622,23 @@ _mesa_DrawBuffers(GLsizei n, const GLenum *buffers)
 }
 
 
+void GLAPIENTRY
+_mesa_NamedFramebufferDrawBuffers_no_error(GLuint framebuffer, GLsizei n,
+                                           const GLenum *bufs)
+{
+   GET_CURRENT_CONTEXT(ctx);
+   struct gl_framebuffer *fb;
+
+   if (framebuffer) {
+      fb = _mesa_lookup_framebuffer(ctx, framebuffer);
+   } else {
+      fb = ctx->WinSysDrawBuffer;
+   }
+
+   draw_buffers_no_error(ctx, fb, n, bufs, "glNamedFramebufferDrawBuffers");
+}
+
+
 void GLAPIENTRY
 _mesa_NamedFramebufferDrawBuffers(GLuint framebuffer, GLsizei n,
                                   const GLenum *bufs)
index e11b74f16ff014108a3085a928237b6d54e98fc6..e48400668d0d6e1223067385ba6f8f64f4ccc7ee 100644 (file)
@@ -58,6 +58,10 @@ _mesa_DrawBuffers_no_error(GLsizei n, const GLenum *buffers);
 extern void GLAPIENTRY
 _mesa_DrawBuffers(GLsizei n, const GLenum *buffers);
 
+void GLAPIENTRY
+_mesa_NamedFramebufferDrawBuffers_no_error(GLuint framebuffer, GLsizei n,
+                                           const GLenum *bufs);
+
 extern void GLAPIENTRY
 _mesa_NamedFramebufferDrawBuffers(GLuint framebuffer, GLsizei n,
                                   const GLenum *bufs);