- if (likely(mt)) {
- void *base = intel_region_map(intel, mt->region);
- unsigned int image_x, image_y;
-
- intel_miptree_get_image_offset(mt, tex_image->Level, tex_image->Face,
- slice, &image_x, &image_y);
- x += image_x;
- y += image_y;
-
- *stride = mt->region->pitch * mt->cpp;
- *map = base + y * *stride + x * mt->cpp;
-
- DBG("%s: %d,%d %dx%d from mt %p %d,%d = %p/%d\n", __FUNCTION__,
- x - image_x, y - image_y, w, h,
- mt, x, y, *map, *stride);
- } else {
- /* texture data is in malloc'd memory */
- GLuint width = tex_image->Width;
- GLuint height = ALIGN(tex_image->Height, bh) / bh;
- GLuint texelSize = _mesa_get_format_bytes(tex_image->TexFormat);