isl: disallow TileYs/Yf on 3D storage images on Gfx9/11
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Sun, 25 Jun 2023 20:31:39 +0000 (23:31 +0300)
committerMarge Bot <emma+marge@anholt.net>
Fri, 1 Sep 2023 23:22:17 +0000 (23:22 +0000)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23620>

src/intel/isl/isl_gfx7.c

index aa0d76d..57de99f 100644 (file)
@@ -257,6 +257,24 @@ isl_gfx6_filter_tiling(const struct isl_device *dev,
    if (info->usage & ISL_SURF_USAGE_2D_3D_COMPATIBLE_BIT)
       *flags &= ~ISL_TILING_STD_Y_MASK;
 
+   /* For 3D storage images, we appear to have an undocumented dataport issue,
+    * where the RENDER_SURFACE_STATE::MinimumArrayElement is ignored with
+    * TileYs/TileYf.
+    *
+    * This is breaking VK_EXT_image_sliced_view_of_3d which is trying to
+    * access 3D images with an offset.
+    *
+    * It's unclear what the issue is but the behavior does not match
+    * simulation and there is no workaround related to 3D images & TileYs/Yf.
+    *
+    * We could workaround this issue by reading the offset from memory and add
+    * it to the imageLoad/Store() coordinates.
+    */
+   if (ISL_GFX_VER(dev) <= 11 &&
+       info->dim == ISL_SURF_DIM_3D &&
+       (info->usage & ISL_SURF_USAGE_STORAGE_BIT))
+      *flags &= ~ISL_TILING_STD_Y_MASK;
+
    if (isl_surf_usage_is_stencil(info->usage)) {
       if (ISL_GFX_VER(dev) >= 12) {
          /* Stencil requires Y. */