intel/nir: add lower for sparse images & textures

We have to lower images into image load + sampler residency.

There is also a restriction on sampler access with a compare, lower
those as 2 sampler instructions to meet the restriction.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23882>
This commit is contained in:
Lionel Landwerlin
2023-06-27 17:54:05 +03:00
parent 300cc829de
commit fe81d40bff
4 changed files with 252 additions and 0 deletions

View File

@@ -1561,6 +1561,8 @@ brw_postprocess_nir(nir_shader *nir, const struct brw_compiler *compiler,
UNUSED bool progress; /* Written by OPT */
OPT(brw_nir_lower_sparse_intrinsics);
OPT(nir_lower_bit_size, lower_bit_size_callback, (void *)compiler);
OPT(nir_opt_combine_barriers, combine_all_memory_barriers, NULL);