From ba17678ea79836f5a5ee74310b6050c139523673 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tapani=20P=C3=A4lli?= Date: Mon, 17 Jun 2024 10:48:05 +0300 Subject: [PATCH] isl: fix condition for enabling sampler route to lsc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This will disable cases with 2D array views (which could be views to 3D texture) but enables on regular 2D surfaces which seems to work fine. Fixes: 70382f7f065 ("intel/isl/xe2: Enable route of Sampler LD message to LSC") Signed-off-by: Tapani Pälli Reviewed-by: Lionel Landwerlin Reviewed-by: José Roberto de Souza Part-of: (cherry picked from commit 4a0a716b6a8c072f9ae16555db17ea8a3d73534c) --- .pick_status.json | 2 +- src/intel/isl/isl_format.c | 6 ------ src/intel/isl/isl_surface_state.c | 6 ++++-- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 57b639ba740..68ac1d485f8 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1344,7 +1344,7 @@ "description": "isl: fix condition for enabling sampler route to lsc", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "70382f7f06561dcd94e4d2e6f2bedc8dbeec5d8e", "notes": null diff --git a/src/intel/isl/isl_format.c b/src/intel/isl/isl_format.c index 59f6c551e3b..2ab710d58b7 100644 --- a/src/intel/isl/isl_format.c +++ b/src/intel/isl/isl_format.c @@ -1220,12 +1220,6 @@ isl_format_rgbx_to_rgba(enum isl_format rgbx) bool isl_format_support_sampler_route_to_lsc(enum isl_format fmt) { - /* TODO/FIXME: even only enabling the optimization with formats below this - * is causing some tests to fail so completely disabling this optimization - * for now. - */ - return false; - switch (fmt) { case ISL_FORMAT_R8_UNORM: case ISL_FORMAT_R8G8_UNORM: diff --git a/src/intel/isl/isl_surface_state.c b/src/intel/isl/isl_surface_state.c index 4e4d24cbe31..c2be341a595 100644 --- a/src/intel/isl/isl_surface_state.c +++ b/src/intel/isl/isl_surface_state.c @@ -578,8 +578,10 @@ isl_genX(surf_fill_state_s)(const struct isl_device *dev, void *state, s.ResourceMinLOD = info->view->min_lod_clamp; #if GFX_VERx10 >= 200 - s.EnableSamplerRoutetoLSC = isl_format_support_sampler_route_to_lsc(info->view->format); - s.EnableSamplerRoutetoLSC &= (s.SurfaceType == SURFTYPE_2D); + s.EnableSamplerRoutetoLSC = + isl_format_support_sampler_route_to_lsc(info->view->format); + s.EnableSamplerRoutetoLSC &= (s.SurfaceType == SURFTYPE_2D && + info->view->array_len == 1); /* Wa_14018471104: * For APIs that use ResourceMinLod, do the following: (remains same as before)