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

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


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

diff --git a/src/mapi/glapi/gen/ARB_direct_state_access.xml b/src/mapi/glapi/gen/ARB_direct_state_access.xml
index d859021f0c..3257aace9d 100644
--- a/src/mapi/glapi/gen/ARB_direct_state_access.xml
+++ b/src/mapi/glapi/gen/ARB_direct_state_access.xml
@@ -158,7 +158,7 @@
       <param name="framebuffers" type="GLuint *" />
    </function>
 
-   <function name="NamedFramebufferRenderbuffer">
+   <function name="NamedFramebufferRenderbuffer" no_error="true">
       <param name="framebuffer" type="GLuint" />
       <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 3cf8e01144..4d6fdfcd6b 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -3773,6 +3773,19 @@ _mesa_FramebufferRenderbuffer(GLenum target, GLenum attachment,
                                   renderbuffer, "glFramebufferRenderbuffer");
 }
 
+void GLAPIENTRY
+_mesa_NamedFramebufferRenderbuffer_no_error(GLuint framebuffer,
+                                            GLenum attachment,
+                                            GLenum renderbuffertarget,
+                                            GLuint renderbuffer)
+{
+   GET_CURRENT_CONTEXT(ctx);
+
+   struct gl_framebuffer *fb = _mesa_lookup_framebuffer(ctx, framebuffer);
+   framebuffer_renderbuffer_no_error(ctx, fb, attachment, renderbuffertarget,
+                                     renderbuffer,
+                                     "glNamedFramebufferRenderbuffer");
+}
 
 void GLAPIENTRY
 _mesa_NamedFramebufferRenderbuffer(GLuint framebuffer, GLenum attachment,
diff --git a/src/mesa/main/fbobject.h b/src/mesa/main/fbobject.h
index 833ae7da58..e4846e88dc 100644
--- a/src/mesa/main/fbobject.h
+++ b/src/mesa/main/fbobject.h
@@ -290,6 +290,12 @@ _mesa_FramebufferRenderbuffer(GLenum target, GLenum attachment,
                                  GLenum renderbuffertarget,
                                  GLuint renderbuffer);
 
+void GLAPIENTRY
+_mesa_NamedFramebufferRenderbuffer_no_error(GLuint framebuffer,
+                                            GLenum attachment,
+                                            GLenum renderbuffertarget,
+                                            GLuint renderbuffer);
+
 extern void GLAPIENTRY
 _mesa_NamedFramebufferRenderbuffer(GLuint framebuffer, GLenum attachment,
                                    GLenum renderbuffertarget,
-- 
2.13.3



More information about the mesa-dev mailing list