nir: intel/compiler: Lower TXD on array surfaces on DG2+

DG2 can only do sample_d and sample_d_c on 1D and 2D surfaces.  Cube
maps and 3D surfaces were already handled, but 1D array and 2D array
surfaces were not.

Fixes the following Vulkan CTS failures on DG2:

    dEQP-VK.glsl.texture_functions.texturegradclamp.isampler1darray_fragment
    dEQP-VK.glsl.texture_functions.texturegradclamp.isampler2darray_fragment
    dEQP-VK.glsl.texture_functions.texturegradclamp.sampler1darray_fixed_fragment
    dEQP-VK.glsl.texture_functions.texturegradclamp.sampler1darray_float_fragment
    dEQP-VK.glsl.texture_functions.texturegradclamp.sampler2darray_fixed_fragment
    dEQP-VK.glsl.texture_functions.texturegradclamp.sampler2darray_float_fragment
    dEQP-VK.glsl.texture_functions.texturegradclamp.usampler1darray_fragment
    dEQP-VK.glsl.texture_functions.texturegradclamp.usampler2darray_fragment

The Fixes: tag below is a bit misleading. This commit adds another
lowering, similar to the one in the Fixes: commit, that probably should
have been added at the same time.  I just want to make sure this commit
gets applied everywhere that commit was also applied.

Fixes: 635ed58e52 ("intel/compiler: Lower txd for 3D samplers on XeHP.")
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15681>
This commit is contained in:
Ian Romanick
2022-03-30 16:36:06 -07:00
parent 3f8224baee
commit 7fd1955412
3 changed files with 9 additions and 2 deletions

View File

@@ -821,7 +821,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,