From 33f06842be7cc0ee51fa80e5442d18d02ca0e114 Mon Sep 17 00:00:00 2001 From: Chad Versace Date: Tue, 5 Jan 2016 10:39:21 -0800 Subject: [PATCH] isl: Prefer linear tiling for 1D surfaces --- src/isl/isl.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/isl/isl.c b/src/isl/isl.c index f6b392cfe72..4a1c9f4a94a 100644 --- a/src/isl/isl.c +++ b/src/isl/isl.c @@ -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); -- 2.30.2