- unsigned int bw, bh;
-
- if (intel_image->stencil_rb) {
- /*
- * The texture has packed depth/stencil format, but uses separate
- * stencil. The texture's embedded stencil buffer contains the real
- * stencil data, so copy that into the miptree.
- */
- intel_tex_image_s8z24_gather(intel, intel_image);
- }
-
- /* For compressed formats, the stride is the number of bytes per
- * row of blocks. intel_miptree_get_image_offset() already does
- * the divide.
- */
- _mesa_get_format_block_size(tex_image->TexFormat, &bw, &bh);
- assert(y % bh == 0);
- y /= bh;
-
- 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;