ac/llvm: add disable_aniso_single_level abi
RADV use dri option to enabled this for some apps, but it's done in nir lower currently. I'm afraid it still needs this option to handle the non-uniform case as desc is loaded in llvm. radeonsi always enable this for bind-textures. radeonsi will lower all bind-textures to bindless-textures, and only bind-textures use desc index, so add this abi for bindless desc index path. 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/18666>
This commit is contained in:
@@ -4682,9 +4682,14 @@ static void tex_fetch_ptrs(struct ac_nir_context *ctx, nir_tex_instr *instr,
|
||||
*res_ptr = ctx->abi->load_sampler_desc(ctx->abi, 0, 0, 0, texture_dynamic_handle,
|
||||
main_descriptor, false, false, true);
|
||||
|
||||
if (samp_ptr && sampler_dynamic_handle)
|
||||
if (samp_ptr && sampler_dynamic_handle) {
|
||||
*samp_ptr = ctx->abi->load_sampler_desc(ctx->abi, 0, 0, 0, sampler_dynamic_handle,
|
||||
AC_DESC_SAMPLER, false, false, true);
|
||||
|
||||
if (ctx->abi->disable_aniso_single_level &&
|
||||
instr->sampler_dim < GLSL_SAMPLER_DIM_RECT)
|
||||
*samp_ptr = sici_fix_sampler_aniso(ctx, *res_ptr, *samp_ptr);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
@@ -135,6 +135,9 @@ struct ac_shader_abi {
|
||||
* waterfall to avoid incorrect rendering. */
|
||||
bool use_waterfall_for_divergent_tex_samplers;
|
||||
|
||||
/* Whether to disable anisotropic filtering. */
|
||||
bool disable_aniso_single_level;
|
||||
|
||||
/* Number of all interpolated inputs */
|
||||
unsigned num_interp;
|
||||
};
|
||||
|
Reference in New Issue
Block a user