diff options
author | Chad Versace <[email protected]> | 2016-01-25 11:45:12 -0800 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2016-01-27 15:12:42 -0800 |
commit | 45ecfcd63777499dd809259dec6beabacbf022df (patch) | |
tree | 5aeb5a537c2e0e7ea34d582f26fae1c9760830d1 | |
parent | 9f954310e82a1500a7b1370e95b60670f8a84ac0 (diff) |
isl: Add func isl_surf_get_tile_info()
-rw-r--r-- | src/isl/isl.c | 9 | ||||
-rw-r--r-- | src/isl/isl.h | 5 |
2 files changed, 14 insertions, 0 deletions
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. |