mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 13:10:10 +01:00
radeonsi: add has_non_uniform_tex_access shader info
Can be used to skip nir_lower_non_uniform_access pass. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Signed-off-by: Qiang Yu <yuq825@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22573>
This commit is contained in:
parent
563bdcc7fc
commit
f859436b55
2 changed files with 4 additions and 0 deletions
|
|
@ -479,6 +479,7 @@ struct si_shader_info {
|
|||
bool uses_indirect_descriptor;
|
||||
bool has_divergent_loop;
|
||||
bool uses_sampleid;
|
||||
bool has_non_uniform_tex_access;
|
||||
|
||||
bool uses_vmem_sampler_or_bvh;
|
||||
bool uses_vmem_load_other; /* all other VMEM loads and atomics with return */
|
||||
|
|
|
|||
|
|
@ -426,6 +426,9 @@ static void scan_instruction(const struct nir_shader *nir, struct si_shader_info
|
|||
if (nir_deref_instr_has_indirect(nir_src_as_deref(*deref)))
|
||||
info->uses_indirect_descriptor = true;
|
||||
}
|
||||
|
||||
info->has_non_uniform_tex_access =
|
||||
tex->texture_non_uniform || tex->sampler_non_uniform;
|
||||
} else if (instr->type == nir_instr_type_intrinsic) {
|
||||
nir_intrinsic_instr *intr = nir_instr_as_intrinsic(instr);
|
||||
const char *intr_name = nir_intrinsic_infos[intr->intrinsic].name;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue