From: Chad Versace Date: Mon, 25 Jan 2016 19:45:12 +0000 (-0800) Subject: isl: Add func isl_surf_get_tile_info() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=45ecfcd63777499dd809259dec6beabacbf022df;p=mesa.git isl: Add func isl_surf_get_tile_info() --- diff --git a/src/isl/isl.c b/src/isl/isl.c index 6015c5c305c..357d0ea69c1 100644 --- a/src/isl/isl.c +++ b/src/isl/isl.c @@ -1150,6 +1150,15 @@ isl_surf_init_s(const struct isl_device *dev, return true; } +void +isl_surf_get_tile_info(const struct isl_device *dev, + const struct isl_surf *surf, + struct isl_tile_info *tile_info) +{ + const struct isl_format_layout *fmtl = isl_format_get_layout(surf->format); + isl_tiling_get_info(dev, surf->tiling, fmtl->bs, tile_info); +} + /** * A variant of isl_surf_get_image_offset_sa() specific to * ISL_DIM_LAYOUT_GEN4_2D. diff --git a/src/isl/isl.h b/src/isl/isl.h index 8905d868f4e..3eada623fbe 100644 --- a/src/isl/isl.h +++ b/src/isl/isl.h @@ -884,6 +884,11 @@ isl_surf_init_s(const struct isl_device *dev, struct isl_surf *surf, const struct isl_surf_init_info *restrict info); +void +isl_surf_get_tile_info(const struct isl_device *dev, + const struct isl_surf *surf, + struct isl_tile_info *tile_info); + /** * Alignment of the upper-left sample of each subimage, in units of surface * elements.