+
+ /* Try transfer_inline_write, which should be the fastest memcpy path. */
+ if (pixels &&
+ !_mesa_is_bufferobj(unpack->BufferObj) &&
+ _mesa_texstore_can_use_memcpy(ctx, texImage->_BaseFormat,
+ texImage->TexFormat, format, type,
+ unpack)) {
+ struct pipe_box box;
+ unsigned stride, layer_stride;
+ void *data;
+
+ stride = _mesa_image_row_stride(unpack, width, format, type);
+ layer_stride = _mesa_image_image_stride(unpack, width, height, format,
+ type);
+ data = _mesa_image_address(dims, unpack, pixels, width, height, format,
+ type, 0, 0, 0);
+
+ /* Convert to Gallium coordinates. */
+ if (gl_target == GL_TEXTURE_1D_ARRAY) {
+ zoffset = yoffset;
+ yoffset = 0;
+ depth = height;
+ height = 1;
+ layer_stride = stride;
+ }
+
+ u_box_3d(xoffset, yoffset, zoffset + dstz, width, height, depth, &box);
+ pipe->transfer_inline_write(pipe, dst, dst_level, 0,
+ &box, data, stride, layer_stride);
+ return;