[Mesa-dev] [PATCH 062/101] mesa: add KHR_no_error support to glFramebufferRenderbuffer()

Samuel Pitoiset samuel.pitoiset at gmail.com
Fri Jul 21 17:40:11 UTC 2017


Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
 src/mapi/glapi/gen/ARB_framebuffer_object.xml |  2 +-
 src/mesa/main/fbobject.c                      | 22 ++++++++++++++++++++++
 src/mesa/main/fbobject.h                      |  5 +++++
 3 files changed, 28 insertions(+), 1 deletion(-)

diff --git a/src/mapi/glapi/gen/ARB_framebuffer_object.xml b/src/mapi/glapi/gen/ARB_framebuffer_object.xml
index 380d4954e6..bd0793c8ec 100644
--- a/src/mapi/glapi/gen/ARB_framebuffer_object.xml
+++ b/src/mapi/glapi/gen/ARB_framebuffer_object.xml
@@ -255,7 +255,7 @@
 	<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"/>
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index f93a09e401..3cf8e01144 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -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,
diff --git a/src/mesa/main/fbobject.h b/src/mesa/main/fbobject.h
index c67785a285..833ae7da58 100644
--- a/src/mesa/main/fbobject.h
+++ b/src/mesa/main/fbobject.h
@@ -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,
-- 
2.13.3



More information about the mesa-dev mailing list