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 6015c5c305c8158721f1338953fa0af9594d4f08..357d0ea69c1aec8e1a6e2d42998ed72ff1c6fd5c 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 8905d868f4e2b4ab2321fc09d9682a674372cc1a..3eada623fbe7c6adad5069ac0ed21ef4b1452107 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.