[Mesa-dev] [PATCH 09/13] mesa: add KHR_no_error support for FramebufferTexture*D functions

Timothy Arceri tarceri at itsqueeze.com
Mon May 8 06:35:33 UTC 2017


---
 src/mapi/glapi/gen/ARB_framebuffer_object.xml |  6 ++---
 src/mesa/main/fbobject.c                      | 33 +++++++++++++++++++++++++++
 src/mesa/main/fbobject.h                      | 12 ++++++++++
 3 files changed, 48 insertions(+), 3 deletions(-)

diff --git a/src/mapi/glapi/gen/ARB_framebuffer_object.xml b/src/mapi/glapi/gen/ARB_framebuffer_object.xml
index 1573e7e..ce5e45d 100644
--- a/src/mapi/glapi/gen/ARB_framebuffer_object.xml
+++ b/src/mapi/glapi/gen/ARB_framebuffer_object.xml
@@ -211,39 +211,39 @@
         <param name="framebuffers" type="GLuint *" count="n" output="true"/>
 	<glx vendorpriv="1426" always_array="true"/>
     </function>
 
     <function name="CheckFramebufferStatus" es2="2.0">
         <param name="target" type="GLenum"/>
 	<return type="GLenum"/>
 	<glx vendorpriv="1427"/>
     </function>
 
-    <function name="FramebufferTexture1D">
+    <function name="FramebufferTexture1D" no_error="true">
         <param name="target" type="GLenum"/>
         <param name="attachment" type="GLenum"/>
         <param name="textarget" type="GLenum"/>
         <param name="texture" type="GLuint"/>
         <param name="level" type="GLint"/>
 	<glx rop="4321"/>
     </function>
 
-    <function name="FramebufferTexture2D" es2="2.0">
+    <function name="FramebufferTexture2D" es2="2.0" no_error="true">
         <param name="target" type="GLenum"/>
         <param name="attachment" type="GLenum"/>
         <param name="textarget" type="GLenum"/>
         <param name="texture" type="GLuint"/>
         <param name="level" type="GLint"/>
 	<glx rop="4322"/>
     </function>
 
-    <function name="FramebufferTexture3D">
+    <function name="FramebufferTexture3D" no_error="true">
         <param name="target" type="GLenum"/>
         <param name="attachment" type="GLenum"/>
         <param name="textarget" type="GLenum"/>
         <param name="texture" type="GLuint"/>
         <param name="level" type="GLint"/>
         <param name="layer" type="GLint"/>
 	<glx rop="4323"/>
     </function>
 
     <function name="FramebufferTextureLayer" es2="3.0">
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index 932d5fd..ba01d0c 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -3363,38 +3363,71 @@ framebuffer_texture_with_dims(int dims, GLenum target,
       _mesa_get_and_validate_attachment(ctx, fb, attachment, caller);
    if (!att)
       return;
 
    _mesa_framebuffer_texture(ctx, fb, attachment, att, texObj, textarget,
                              level, layer, GL_FALSE);
 }
 
 
 void GLAPIENTRY
+_mesa_FramebufferTexture1D_no_error(GLenum target, GLenum attachment,
+                                    GLenum textarget, GLuint texture,
+                                    GLint level)
+{
+   framebuffer_texture_with_dims_no_error(1, target, attachment, textarget,
+                                          texture, level, 0,
+                                          "glFramebufferTexture1D");
+}
+
+
+void GLAPIENTRY
 _mesa_FramebufferTexture1D(GLenum target, GLenum attachment,
                            GLenum textarget, GLuint texture, GLint level)
 {
    framebuffer_texture_with_dims(1, target, attachment, textarget, texture,
                                  level, 0, "glFramebufferTexture1D");
 }
 
 
 void GLAPIENTRY
+_mesa_FramebufferTexture2D_no_error(GLenum target, GLenum attachment,
+                                    GLenum textarget, GLuint texture,
+                                    GLint level)
+{
+   framebuffer_texture_with_dims_no_error(2, target, attachment, textarget,
+                                          texture, level, 0,
+                                          "glFramebufferTexture2D");
+}
+
+
+void GLAPIENTRY
 _mesa_FramebufferTexture2D(GLenum target, GLenum attachment,
                            GLenum textarget, GLuint texture, GLint level)
 {
    framebuffer_texture_with_dims(2, target, attachment, textarget, texture,
                                  level, 0, "glFramebufferTexture2D");
 }
 
 
 void GLAPIENTRY
+_mesa_FramebufferTexture3D_no_error(GLenum target, GLenum attachment,
+                                    GLenum textarget, GLuint texture,
+                                    GLint level, GLint layer)
+{
+   framebuffer_texture_with_dims_no_error(3, target, attachment, textarget,
+                                          texture, level, layer,
+                                          "glFramebufferTexture3D");
+}
+
+
+void GLAPIENTRY
 _mesa_FramebufferTexture3D(GLenum target, GLenum attachment,
                            GLenum textarget, GLuint texture,
                            GLint level, GLint layer)
 {
    framebuffer_texture_with_dims(3, target, attachment, textarget, texture,
                                  level, layer, "glFramebufferTexture3D");
 }
 
 
 void GLAPIENTRY
diff --git a/src/mesa/main/fbobject.h b/src/mesa/main/fbobject.h
index d0f905e..df1696d 100644
--- a/src/mesa/main/fbobject.h
+++ b/src/mesa/main/fbobject.h
@@ -209,28 +209,40 @@ _mesa_GenFramebuffers(GLsizei n, GLuint *framebuffers);
 extern void GLAPIENTRY
 _mesa_CreateFramebuffers(GLsizei n, GLuint *framebuffers);
 
 extern GLenum GLAPIENTRY
 _mesa_CheckFramebufferStatus(GLenum target);
 
 extern GLenum GLAPIENTRY
 _mesa_CheckNamedFramebufferStatus(GLuint framebuffer, GLenum target);
 
 extern void GLAPIENTRY
+_mesa_FramebufferTexture1D_no_error(GLenum target, GLenum attachment,
+                                    GLenum textarget, GLuint texture,
+                                    GLint level);
+extern void GLAPIENTRY
 _mesa_FramebufferTexture1D(GLenum target, GLenum attachment,
                               GLenum textarget, GLuint texture, GLint level);
 
 extern void GLAPIENTRY
+_mesa_FramebufferTexture2D_no_error(GLenum target, GLenum attachment,
+                                    GLenum textarget, GLuint texture,
+                                    GLint level);
+extern void GLAPIENTRY
 _mesa_FramebufferTexture2D(GLenum target, GLenum attachment,
                               GLenum textarget, GLuint texture, GLint level);
 
 extern void GLAPIENTRY
+_mesa_FramebufferTexture3D_no_error(GLenum target, GLenum attachment,
+                                    GLenum textarget, GLuint texture,
+                                    GLint level, GLint layer);
+extern void GLAPIENTRY
 _mesa_FramebufferTexture3D(GLenum target, GLenum attachment,
                               GLenum textarget, GLuint texture,
                               GLint level, GLint layer);
 
 extern void GLAPIENTRY
 _mesa_FramebufferTextureLayer(GLenum target, GLenum attachment,
                                  GLuint texture, GLint level, GLint layer);
 
 extern void GLAPIENTRY
 _mesa_NamedFramebufferTextureLayer(GLuint framebuffer, GLenum attachment,
-- 
2.9.3



More information about the mesa-dev mailing list