mesa: add KHR_no_error support for glCopyImageSubData()
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 1 Jun 2017 09:46:24 +0000 (11:46 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 7 Jun 2017 09:04:33 +0000 (11:04 +0200)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/mapi/glapi/gen/ARB_copy_image.xml
src/mesa/main/copyimage.c
src/mesa/main/copyimage.h

index 9ee2ba304ffcbf07c0183eb85f84db4571a26413..fb4c9b1c2429d3880643705cea52a10da7500ca9 100644 (file)
@@ -5,7 +5,7 @@
 
 <category name="GL_ARB_copy_image" number="123">
 
-    <function name="CopyImageSubData" es2="3.2">
+    <function name="CopyImageSubData" es2="3.2" no_error="true">
         <param name="srcName" type="GLuint"/>
         <param name="srcTarget" type="GLenum"/>
         <param name="srcLevel" type="GLint"/>
index e11d256aef4d53de9d714f64dde8aa425a87b251..2cb617ca811e662d0f45d03e7569177b6de9cc87 100644 (file)
@@ -516,6 +516,29 @@ copy_image_subdata(struct gl_context *ctx,
    }
 }
 
+void GLAPIENTRY
+_mesa_CopyImageSubData_no_error(GLuint srcName, GLenum srcTarget, GLint srcLevel,
+                                GLint srcX, GLint srcY, GLint srcZ,
+                                GLuint dstName, GLenum dstTarget, GLint dstLevel,
+                                GLint dstX, GLint dstY, GLint dstZ,
+                                GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth)
+{
+   struct gl_texture_image *srcTexImage, *dstTexImage;
+   struct gl_renderbuffer *srcRenderbuffer, *dstRenderbuffer;
+
+   GET_CURRENT_CONTEXT(ctx);
+
+   prepare_target(ctx, srcName, srcTarget, srcLevel, srcZ, &srcTexImage,
+                  &srcRenderbuffer);
+
+   prepare_target(ctx, dstName, dstTarget, dstLevel, dstZ, &dstTexImage,
+                  &dstRenderbuffer);
+
+   copy_image_subdata(ctx, srcTexImage, srcRenderbuffer, srcX, srcY, srcZ,
+                      srcLevel, dstTexImage, dstRenderbuffer, dstX, dstY, dstZ,
+                      dstLevel, srcWidth, srcHeight, srcDepth);
+}
+
 void GLAPIENTRY
 _mesa_CopyImageSubData(GLuint srcName, GLenum srcTarget, GLint srcLevel,
                        GLint srcX, GLint srcY, GLint srcZ,
index 40e95b66312b092f555918e08666164ba310fe09..ea2f15b4352ba81f30187689a0d23e59dc3122c0 100644 (file)
 extern "C" {
 #endif
 
+void GLAPIENTRY
+_mesa_CopyImageSubData_no_error(GLuint srcName, GLenum srcTarget, GLint srcLevel,
+                                GLint srcX, GLint srcY, GLint srcZ,
+                                GLuint destName, GLenum destTarget, GLint destLevel,
+                                GLint destX, GLint destY, GLint destZ,
+                                GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth);
+
 extern void GLAPIENTRY
 _mesa_CopyImageSubData(GLuint srcName, GLenum srcTarget, GLint srcLevel,
                        GLint srcX, GLint srcY, GLint srcZ,