isl: Add func isl_surf_get_tile_info()
authorChad Versace <chad.versace@intel.com>
Mon, 25 Jan 2016 19:45:12 +0000 (11:45 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Wed, 27 Jan 2016 23:12:42 +0000 (15:12 -0800)
src/isl/isl.c
src/isl/isl.h

index 6015c5c..357d0ea 100644 (file)
@@ -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.
index 8905d86..3eada62 100644 (file)
@@ -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.