mesa: add copy_texture_sub_image_no_error() helper
authorTimothy Arceri <tarceri@itsqueeze.com>
Mon, 26 Jun 2017 02:38:23 +0000 (12:38 +1000)
committerTimothy Arceri <tarceri@itsqueeze.com>
Mon, 26 Jun 2017 22:15:09 +0000 (08:15 +1000)
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
src/mesa/main/teximage.c

index a0397472057ad7e96e156b4e2f8c9f920648991a..ac259859b1f8c1dfe9dfc765f02a8cadde1c601f 100644 (file)
@@ -3783,6 +3783,23 @@ copy_texture_sub_image_err(struct gl_context *ctx, GLuint dims,
 }
 
 
+static void
+copy_texture_sub_image_no_error(struct gl_context *ctx, GLuint dims,
+                                struct gl_texture_object *texObj,
+                                GLenum target, GLint level,
+                                GLint xoffset, GLint yoffset, GLint zoffset,
+                                GLint x, GLint y, GLsizei width, GLsizei height)
+{
+   FLUSH_VERTICES(ctx, 0);
+
+   if (ctx->NewState & NEW_COPY_TEX_STATE)
+      _mesa_update_state(ctx);
+
+   copy_texture_sub_image(ctx, dims, texObj, target, level, xoffset, yoffset,
+                          zoffset, x, y, width, height);
+}
+
+
 /**
  * Implement the glCopyTexImage1/2D() functions.
  */