isl: Prefer linear tiling for 1D surfaces
authorChad Versace <chad.versace@intel.com>
Tue, 5 Jan 2016 18:39:21 +0000 (10:39 -0800)
committerChad Versace <chad.versace@intel.com>
Tue, 5 Jan 2016 19:35:13 +0000 (11:35 -0800)
src/isl/isl.c

index f6b392cfe72cbab451c9897f437d48950018132a..4a1c9f4a94a9feef2e2034af397c164f075548d1 100644 (file)
@@ -166,6 +166,16 @@ isl_surf_choose_tiling(const struct isl_device *dev,
    /* Of the tiling modes remaining, choose the one that offers the best
     * performance.
     */
+
+   if (info->dim == ISL_SURF_DIM_1D) {
+      /* Prefer linear for 1D surfaces because they do not benefit from
+       * tiling. To the contrary, tiling leads to wasted memory and poor
+       * memory locality due to the swizzling and alignment restrictions
+       * required in tiled surfaces.
+       */
+      CHOOSE(ISL_TILING_LINEAR);
+   }
+
    CHOOSE(ISL_TILING_Ys);
    CHOOSE(ISL_TILING_Yf);
    CHOOSE(ISL_TILING_Y0);