/** * Upload data for a particular image. */ void intel_miptree_image_data(struct intel_context *intel, struct intel_mipmap_tree *dst, GLuint face, GLuint level, void *src, GLuint src_row_pitch, GLuint src_image_pitch) { const GLuint depth = dst->level[level].depth; GLuint i; DBG("%s: %d/%d\n", __FUNCTION__, face, level); for (i = 0; i < depth; i++) { GLuint dst_x, dst_y, height; intel_miptree_get_image_offset(dst, level, face, i, &dst_x, &dst_y); height = dst->level[level].height; if(dst->compressed) height = (height + 3) / 4; intel_region_data(intel, dst->region, 0, dst_x, dst_y, src, src_row_pitch, 0, 0, /* source x, y */ dst->level[level].width, height); /* width, height */ src = (char *)src + src_image_pitch * dst->cpp; } }
/* Upload data for a particular image. */ void intel_miptree_image_data(struct intel_context *intel, struct intel_mipmap_tree *dst, GLuint face, GLuint level, void *src, GLuint src_row_pitch, GLuint src_image_pitch) { GLuint depth = dst->level[level].depth; GLuint dst_offset = intel_miptree_image_offset(dst, face, level); const GLuint *dst_depth_offset = intel_miptree_depth_offsets(dst, level); GLuint i; GLuint height = 0; DBG("%s: %d/%d\n", __FUNCTION__, face, level); for (i = 0; i < depth; i++) { height = dst->level[level].height; if(dst->compressed) height = (height + 3) / 4; intel_region_data(intel, dst->region, dst_offset + dst_depth_offset[i], /* dst_offset */ 0, 0, /* dstx, dsty */ src, src_row_pitch, 0, 0, /* source x, y */ dst->level[level].width, height); /* width, height */ src += src_image_pitch * dst->cpp; } }