diff options
author | Caio Oliveira <caio.oliveira@intel.com> | 2024-02-23 14:07:15 -0800 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2024-02-28 05:45:39 +0000 |
commit | d3e451780b0f4a5c1d6d0bfdc851faa205543312 (patch) | |
tree | 684c161f3dd04f258286d75863ded60f93102cf7 | |
parent | 8f3c52c1da5c6500f18cc8d044decae7e8946f32 (diff) | |
download | mesa3d-d3e451780b0f4a5c1d6d0bfdc851faa205543312.tar.gz |
intel/brw: Inline brw_nir_apply_sampler_key code
It doesn't use the prog_key anymore, so just move the nir_lower_tex
call pass to the single callsite.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27691>
-rw-r--r-- | src/intel/compiler/brw_nir.c | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/src/intel/compiler/brw_nir.c b/src/intel/compiler/brw_nir.c index 1e8af6c89c3..1dc38011dab 100644 --- a/src/intel/compiler/brw_nir.c +++ b/src/intel/compiler/brw_nir.c @@ -1834,21 +1834,6 @@ brw_postprocess_nir(nir_shader *nir, const struct brw_compiler *compiler, } } -static bool -brw_nir_apply_sampler_key(nir_shader *nir, - const struct brw_compiler *compiler, - const struct brw_sampler_prog_key_data *key_tex) -{ - nir_lower_tex_options tex_options = { - .lower_txd_clamp_bindless_sampler = true, - .lower_txd_clamp_if_sampler_index_not_lt_16 = true, - .lower_invalid_implicit_lod = true, - .lower_index_to_offset = true, - }; - - return nir_lower_tex(nir, &tex_options); -} - static unsigned get_subgroup_size(const struct shader_info *info, unsigned max_subgroup_size) { @@ -1915,7 +1900,13 @@ brw_nir_apply_key(nir_shader *nir, { bool progress = false; - OPT(brw_nir_apply_sampler_key, compiler, &key->tex); + nir_lower_tex_options nir_tex_opts = { + .lower_txd_clamp_bindless_sampler = true, + .lower_txd_clamp_if_sampler_index_not_lt_16 = true, + .lower_invalid_implicit_lod = true, + .lower_index_to_offset = true, + }; + OPT(nir_lower_tex, &nir_tex_opts); const struct intel_nir_lower_texture_opts tex_opts = { .combined_lod_and_array_index = compiler->devinfo->ver >= 20, |