From 45ecfcd63777499dd809259dec6beabacbf022df Mon Sep 17 00:00:00 2001 From: Chad Versace Date: Mon, 25 Jan 2016 11:45:12 -0800 Subject: [PATCH] isl: Add func isl_surf_get_tile_info() --- src/isl/isl.c | 9 +++++++++ src/isl/isl.h | 5 +++++ 2 files changed, 14 insertions(+) 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. -- 2.30.2