mesa: add KHR_no_error support to glInvalidate*()
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 18 Jul 2017 16:02:51 +0000 (18:02 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 31 Jul 2017 11:53:39 +0000 (13:53 +0200)
These are just no-op because we don't actually do anything
useful in the errors path.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/mapi/glapi/gen/ARB_invalidate_subdata.xml
src/mesa/main/fbobject.c
src/mesa/main/fbobject.h
src/mesa/main/texobj.c
src/mesa/main/texobj.h

index 2cbc4f63be7db1a2f1471af3c789cf626b119d4e..02dcad73cb7b36e9c9ab6fc1452e5a19a694bb99 100644 (file)
@@ -3,7 +3,7 @@
 
 <OpenGLAPI>
 <category name="GL_ARB_invalidate_subdata" number="666">
-  <function name="InvalidateTexSubImage">
+  <function name="InvalidateTexSubImage" no_error="true">
     <param name="texture" type="GLuint"/>
     <param name="level" type="GLint"/>
     <param name="xoffset" type="GLint"/>
@@ -14,7 +14,7 @@
     <param name="depth" type="GLsizei"/>
   </function>
 
-  <function name="InvalidateTexImage">
+  <function name="InvalidateTexImage" no_error="true">
     <param name="texture" type="GLuint"/>
     <param name="level" type="GLint"/>
   </function>
@@ -29,7 +29,7 @@
     <param name="buffer" type="GLuint"/>
   </function>
 
-  <function name="InvalidateSubFramebuffer" es2="3.0">
+  <function name="InvalidateSubFramebuffer" es2="3.0" no_error="true">
     <param name="target" type="GLenum"/>
     <param name="numAttachments" type="GLsizei" counter="true"/>
     <param name="attachments" type="const GLenum *" count="numAttachments"/>
@@ -39,7 +39,7 @@
     <param name="height" type="GLsizei"/>
   </function>
 
-  <function name="InvalidateFramebuffer" es2="3.0">
+  <function name="InvalidateFramebuffer" es2="3.0" no_error="true">
     <param name="target" type="GLenum"/>
     <param name="numAttachments" type="GLsizei" counter="true"/>
     <param name="attachments" type="const GLenum *" count="numAttachments"/>
index 46bc129effcc63aac2987440f8572d1b56272dfb..3ab6b53355bdfec16ac773d6c731ac8994ef0857 100644 (file)
@@ -4325,6 +4325,15 @@ invalid_enum:
 }
 
 
+void GLAPIENTRY
+_mesa_InvalidateSubFramebuffer_no_error(GLenum target, GLsizei numAttachments,
+                                        const GLenum *attachments, GLint x,
+                                        GLint y, GLsizei width, GLsizei height)
+{
+   /* no-op */
+}
+
+
 void GLAPIENTRY
 _mesa_InvalidateSubFramebuffer(GLenum target, GLsizei numAttachments,
                                const GLenum *attachments, GLint x, GLint y,
@@ -4376,6 +4385,14 @@ _mesa_InvalidateNamedFramebufferSubData(GLuint framebuffer,
 }
 
 
+void GLAPIENTRY
+_mesa_InvalidateFramebuffer_no_error(GLenum target, GLsizei numAttachments,
+                                     const GLenum *attachments)
+{
+   /* no-op */
+}
+
+
 void GLAPIENTRY
 _mesa_InvalidateFramebuffer(GLenum target, GLsizei numAttachments,
                             const GLenum *attachments)
index 6e10c187427cd64675897e6e3c92a00f6f4de390..c67785a285048ab7b41b1378f99983aafe677d27 100644 (file)
@@ -306,6 +306,11 @@ extern void GLAPIENTRY
 _mesa_GetNamedFramebufferParameteriv(GLuint framebuffer, GLenum pname,
                                      GLint *param);
 
+void GLAPIENTRY
+_mesa_InvalidateSubFramebuffer_no_error(GLenum target, GLsizei numAttachments,
+                                        const GLenum *attachments, GLint x,
+                                        GLint y, GLsizei width, GLsizei height);
+
 extern void GLAPIENTRY
 _mesa_InvalidateSubFramebuffer(GLenum target, GLsizei numAttachments,
                                const GLenum *attachments, GLint x, GLint y,
@@ -317,6 +322,9 @@ _mesa_InvalidateNamedFramebufferSubData(GLuint framebuffer,
                                         const GLenum *attachments,
                                         GLint x, GLint y,
                                         GLsizei width, GLsizei height);
+void GLAPIENTRY
+_mesa_InvalidateFramebuffer_no_error(GLenum target, GLsizei numAttachments,
+                                     const GLenum *attachments);
 
 extern void GLAPIENTRY
 _mesa_InvalidateFramebuffer(GLenum target, GLsizei numAttachments,
index e52ad22645ba46263f4e6dd6b762fbdd04e412e5..95f2b34337d32a930905a8fa74cea96011395c29 100644 (file)
@@ -2028,6 +2028,16 @@ _mesa_unlock_context_textures( struct gl_context *ctx )
 }
 
 
+void GLAPIENTRY
+_mesa_InvalidateTexSubImage_no_error(GLuint texture, GLint level, GLint xoffset,
+                                     GLint yoffset, GLint zoffset,
+                                     GLsizei width, GLsizei height,
+                                     GLsizei depth)
+{
+   /* no-op */
+}
+
+
 void GLAPIENTRY
 _mesa_InvalidateTexSubImage(GLuint texture, GLint level, GLint xoffset,
                             GLint yoffset, GLint zoffset, GLsizei width,
@@ -2175,6 +2185,13 @@ _mesa_InvalidateTexSubImage(GLuint texture, GLint level, GLint xoffset,
 }
 
 
+void GLAPIENTRY
+_mesa_InvalidateTexImage_no_error(GLuint texture, GLint level)
+{
+   /* no-op */
+}
+
+
 void GLAPIENTRY
 _mesa_InvalidateTexImage(GLuint texture, GLint level)
 {
index f10623899fcb09dfe222e4580b4b71e6d6de1363..9b9e4185d7b69cc3adc49021e5fcea302571411a 100644 (file)
@@ -218,10 +218,18 @@ _mesa_AreTexturesResident( GLsizei n, const GLuint *textures,
 extern GLboolean GLAPIENTRY
 _mesa_IsTexture( GLuint texture );
 
+void GLAPIENTRY
+_mesa_InvalidateTexSubImage_no_error(GLuint texture, GLint level, GLint xoffset,
+                                     GLint yoffset, GLint zoffset,
+                                     GLsizei width, GLsizei height,
+                                     GLsizei depth);
+
 extern void GLAPIENTRY
 _mesa_InvalidateTexSubImage(GLuint texture, GLint level, GLint xoffset,
                             GLint yoffset, GLint zoffset, GLsizei width,
                             GLsizei height, GLsizei depth);
+void GLAPIENTRY
+_mesa_InvalidateTexImage_no_error(GLuint texture, GLint level);
 
 extern void GLAPIENTRY
 _mesa_InvalidateTexImage(GLuint texture, GLint level);