diff --git a/.pick_status.json b/.pick_status.json index f28e158180c..6f6e5010027 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -6460,7 +6460,7 @@ "description": "nir: intel/compiler: Lower TXD on array surfaces on DG2+", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "because_sha": "635ed58e527f1a1c0b11eca0552e892f56f8ccf6" }, { diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index 272e1d175da..4ea0be0b666 100644 --- a/src/compiler/nir/nir.h +++ b/src/compiler/nir/nir.h @@ -4839,6 +4839,11 @@ typedef struct nir_lower_tex_options { */ bool lower_txd_3d; + /** + * If true, lower nir_texop_txd any array surfaces with nir_texop_txl. + */ + bool lower_txd_array; + /** * If true, lower nir_texop_txd on shadow samplers (except cube maps) * with nir_texop_txl. Notice that cube map shadow samplers are lowered diff --git a/src/compiler/nir/nir_lower_tex.c b/src/compiler/nir/nir_lower_tex.c index 2664925568f..60e49984bab 100644 --- a/src/compiler/nir/nir_lower_tex.c +++ b/src/compiler/nir/nir_lower_tex.c @@ -1449,7 +1449,8 @@ nir_lower_tex_block(nir_block *block, nir_builder *b, (options->lower_txd_cube_map && tex->sampler_dim == GLSL_SAMPLER_DIM_CUBE) || (options->lower_txd_3d && - tex->sampler_dim == GLSL_SAMPLER_DIM_3D))) { + tex->sampler_dim == GLSL_SAMPLER_DIM_3D) || + (options->lower_txd_array && tex->is_array))) { lower_gradient(b, tex); progress = true; continue; diff --git a/src/intel/compiler/brw_nir.c b/src/intel/compiler/brw_nir.c index 9998edfc735..377bb5c3e3d 100644 --- a/src/intel/compiler/brw_nir.c +++ b/src/intel/compiler/brw_nir.c @@ -814,7 +814,8 @@ 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 = devinfo->verx10 >= 125, + .lower_txd_3d = devinfo->verx10 >= 125, /* Wa_1209978020 */ + .lower_txd_array = devinfo->verx10 >= 125, /* Wa_1209978020 */ .lower_txb_shadow_clamp = true, .lower_txd_shadow_clamp = true, .lower_txd_offset_clamp = true,