Signed-off-by: Topi Pohjolainen <topi.pohjolai...@intel.com> --- src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 9 +++++++++ 1 file changed, 9 insertions(+)
diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c index a0b129adb4..1b8c0da80d 100644 --- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c +++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c @@ -1462,6 +1462,15 @@ intel_miptree_get_image_offset(const struct intel_mipmap_tree *mt, isl_surf_get_image_offset_sa(&mt->surf, level, slice, z, &x_offset_sa, &y_offset_sa); + /* In case of compressed formats offsets are expected as blocks. */ + if (mt->compressed) { + const struct isl_format_layout *fmtl = + isl_format_get_layout(mt->surf.format); + + x_offset_sa /= fmtl->bw; + y_offset_sa /= fmtl->bh; + } + *x = x_offset_sa; *y = y_offset_sa; return; -- 2.11.0 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev