+static void
+nouveau_compressed_copy(struct gl_context *ctx, GLint dims,
+ struct gl_texture_image *ti,
+ GLsizei width, GLsizei height, GLsizei depth,
+ const GLvoid *src, GLvoid *dst, int row_stride)
+{
+ struct compressed_pixelstore store;
+ int i;
+
+ _mesa_compute_compressed_pixelstore(dims, ti->TexFormat,
+ width, height, depth,
+ &ctx->Unpack, &store);
+
+ src += store.SkipBytes;
+
+ assert(store.CopySlices == 1);
+
+ /* copy rows of blocks */
+ for (i = 0; i < store.CopyRowsPerSlice; i++) {
+ memcpy(dst, src, store.CopyBytesPerRow);
+ dst += row_stride;
+ src += store.TotalBytesPerRow;
+ }
+}
+