From 6538c5bcd4e57bbad3e7dde06b196a68f5d6d4db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tapani=20P=C3=A4lli?= Date: Wed, 22 Mar 2023 13:23:16 +0200 Subject: [PATCH] intel/fs: restore message layout changes for cube array MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit bc04e2dacac that handled the change as a WA while this is about a new feature, change done in message layout. Patch also changes the original comment to not refer to Wa but bspec page. Fixes: bc04e2dacac ("intel/fs: use generated helpers for Wa_1209978020 / Wa_18012201914") Signed-off-by: Tapani Pälli Reviewed-by: Lionel Landwerlin Reviewed-by: Mark Janes Part-of: --- src/intel/compiler/brw_lower_logical_sends.cpp | 5 ++--- src/intel/compiler/brw_nir.c | 5 +++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/intel/compiler/brw_lower_logical_sends.cpp b/src/intel/compiler/brw_lower_logical_sends.cpp index 9799f54ec01..bac234e6dd4 100644 --- a/src/intel/compiler/brw_lower_logical_sends.cpp +++ b/src/intel/compiler/brw_lower_logical_sends.cpp @@ -1062,15 +1062,14 @@ lower_sampler_logical_send_gfx7(const fs_builder &bld, fs_inst *inst, opcode op, if (min_lod.file != BAD_FILE) { /* Account for all of the missing coordinate sources */ - if (op == SHADER_OPCODE_TXD && - intel_needs_workaround(devinfo, 18012201914)) { + if (op == SHADER_OPCODE_TXD && devinfo->verx10 >= 125) { /* On DG2 and newer platforms, sample_d can only be used with 1D and * 2D surfaces, so the maximum number of gradient components is 2. * In spite of this limitation, the Bspec lists a mysterious R * component before the min_lod, so the maximum coordinate components * is 3. * - * Wa_18012201914 + * See bspec 45942, "Enable new message layout for cube array" */ length += 3 - coord_components; length += (2 - grad_components) * 2; diff --git a/src/intel/compiler/brw_nir.c b/src/intel/compiler/brw_nir.c index 8df2c0ef563..d03bb90132c 100644 --- a/src/intel/compiler/brw_nir.c +++ b/src/intel/compiler/brw_nir.c @@ -956,8 +956,9 @@ brw_preprocess_nir(const struct brw_compiler *compiler, nir_shader *nir, .lower_txf_offset = true, .lower_rect_offset = true, .lower_txd_cube_map = true, - .lower_txd_3d = intel_needs_workaround(devinfo, 18012201914), - .lower_txd_array = intel_needs_workaround(devinfo, 18012201914), + /* For below, See bspec 45942, "Enable new message layout for cube array" */ + .lower_txd_3d = devinfo->verx10 >= 125, + .lower_txd_array = devinfo->verx10 >= 125, .lower_txb_shadow_clamp = true, .lower_txd_shadow_clamp = true, .lower_txd_offset_clamp = true,