intel/compiler: Lower texture operation to combine LOD and AI
We have to push the lowering of texture operations a bit further in pipeline since nir_lower_tex gets invoked twice and if there is no LOD source present, nir_lower_tex adds that as a source. Once that's all done we can easily combine the LOD and array index into a single 32-bit value. Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27458>
This commit is contained in:
@@ -1886,6 +1886,11 @@ brw_nir_apply_key(nir_shader *nir,
|
||||
|
||||
OPT(brw_nir_apply_sampler_key, compiler, &key->tex);
|
||||
|
||||
const struct brw_nir_lower_texture_opts tex_opts = {
|
||||
.combined_lod_and_array_index = compiler->devinfo->ver >= 20,
|
||||
};
|
||||
OPT(brw_nir_lower_texture, &tex_opts);
|
||||
|
||||
const nir_lower_subgroups_options subgroups_options = {
|
||||
.subgroup_size = get_subgroup_size(&nir->info, max_subgroup_size),
|
||||
.ballot_bit_size = 32,
|
||||
|
Reference in New Issue
Block a user