isl: Only allow Y-tiling for ASTC textures
authorNanley Chery <nanley.g.chery@intel.com>
Thu, 22 Sep 2016 21:51:37 +0000 (14:51 -0700)
committerNanley Chery <nanley.g.chery@intel.com>
Thu, 3 Nov 2016 18:22:58 +0000 (11:22 -0700)
Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/intel/isl/isl_gen7.c

index b6a86d23f370a8ad813662157b7c4c39730c85c9..18687b535def99497c2790c16427e22a960fe280 100644 (file)
@@ -215,6 +215,12 @@ isl_gen6_filter_tiling(const struct isl_device *dev,
       *flags &= ~ISL_TILING_W_BIT;
    }
 
+   /* From the SKL+ PRMs, RENDER_SURFACE_STATE:TileMode,
+    *    If Surface Format is ASTC*, this field must be TILEMODE_YMAJOR.
+    */
+   if (isl_format_get_layout(info->format)->txc == ISL_TXC_ASTC)
+      *flags &= ISL_TILING_Y0_BIT;
+
    /* MCS buffers are always Y-tiled */
    if (isl_format_get_layout(info->format)->txc == ISL_TXC_MCS)
       *flags &= ISL_TILING_Y0_BIT;