Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
packing->SkipRows);
/* Adjust x and y offset based on miplevel */
- xoffset += image->mt->level[level].level_x;
- yoffset += image->mt->level[level].level_y;
+ unsigned level_x, level_y;
+ intel_miptree_get_image_offset(image->mt, level, 0, &level_x, &level_y);
+ xoffset += level_x;
+ yoffset += level_y;
tiled_to_linear(
xoffset * cpp, (xoffset + width) * cpp,
packing->SkipRows, for_glTexImage);
/* Adjust x and y offset based on miplevel */
- xoffset += image->mt->level[level].level_x;
- yoffset += image->mt->level[level].level_y;
+ unsigned level_x, level_y;
+ intel_miptree_get_image_offset(image->mt, level, 0, &level_x, &level_y);
+ xoffset += level_x;
+ yoffset += level_y;
linear_to_tiled(
xoffset * cpp, (xoffset + width) * cpp,