mesa: add KHR_no_error support to glFramebufferRenderbuffer()
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 19 Jul 2017 10:28:21 +0000 (12:28 +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_framebuffer_object.xml
src/mesa/main/fbobject.c
src/mesa/main/fbobject.h

index 380d4954e640bd1e230180ade00b35b3c27d545e..bd0793c8ece0e38c1983d20259425b55a5ae11b8 100644 (file)
        <glx rop="237"/>
     </function>
 
-    <function name="FramebufferRenderbuffer" es2="2.0">
+    <function name="FramebufferRenderbuffer" es2="2.0" no_error="true">
         <param name="target" type="GLenum"/>
         <param name="attachment" type="GLenum"/>
         <param name="renderbuffertarget" type="GLenum"/>
index f93a09e4013e57b19705dc376d9111c66db04ce4..3cf8e0114499fd6b00a22346684c5fd3fb730253 100644 (file)
@@ -3731,6 +3731,28 @@ framebuffer_renderbuffer_error(struct gl_context *ctx,
                             renderbuffer, func, false);
 }
 
+static void
+framebuffer_renderbuffer_no_error(struct gl_context *ctx,
+                                  struct gl_framebuffer *fb, GLenum attachment,
+                                  GLenum renderbuffertarget,
+                                  GLuint renderbuffer, const char *func)
+{
+   framebuffer_renderbuffer(ctx, fb, attachment, renderbuffertarget,
+                            renderbuffer, func, true);
+}
+
+void GLAPIENTRY
+_mesa_FramebufferRenderbuffer_no_error(GLenum target, GLenum attachment,
+                                       GLenum renderbuffertarget,
+                                       GLuint renderbuffer)
+{
+   GET_CURRENT_CONTEXT(ctx);
+
+   struct gl_framebuffer *fb = get_framebuffer_target(ctx, target);
+   framebuffer_renderbuffer_no_error(ctx, fb, attachment, renderbuffertarget,
+                                     renderbuffer, "glFramebufferRenderbuffer");
+}
+
 void GLAPIENTRY
 _mesa_FramebufferRenderbuffer(GLenum target, GLenum attachment,
                               GLenum renderbuffertarget,
index c67785a285048ab7b41b1378f99983aafe677d27..833ae7da58ebdd40758cd94cc7273897649976e6 100644 (file)
@@ -280,6 +280,11 @@ extern void GLAPIENTRY
 _mesa_NamedFramebufferTexture(GLuint framebuffer, GLenum attachment,
                               GLuint texture, GLint level);
 
+void GLAPIENTRY
+_mesa_FramebufferRenderbuffer_no_error(GLenum target, GLenum attachment,
+                                       GLenum renderbuffertarget,
+                                       GLuint renderbuffer);
+
 extern void GLAPIENTRY
 _mesa_FramebufferRenderbuffer(GLenum target, GLenum attachment,
                                  GLenum renderbuffertarget,