From: Icecream95 Date: Wed, 16 Dec 2020 10:57:20 +0000 (+1300) Subject: panfrost: Set the anisotropy level when cso->max_anisotropy is set X-Git-Tag: upstream/21.0.0~1184 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0322653b71138c6f7f9d2d8815611688b75af76b;p=platform%2Fupstream%2Fmesa.git panfrost: Set the anisotropy level when cso->max_anisotropy is set Reviewed-by: Alyssa Rosenzweig Part-of: --- diff --git a/src/gallium/drivers/panfrost/pan_cmdstream.c b/src/gallium/drivers/panfrost/pan_cmdstream.c index 183dfff5962..21f72965a8e 100644 --- a/src/gallium/drivers/panfrost/pan_cmdstream.c +++ b/src/gallium/drivers/panfrost/pan_cmdstream.c @@ -219,6 +219,11 @@ void panfrost_sampler_desc_init_bifrost(const struct pipe_sampler_state *cso, cfg.minimum_lod = FIXED_16(cso->min_lod, false); cfg.maximum_lod = FIXED_16(cso->max_lod, false); + if (cso->max_anisotropy > 1) { + cfg.maximum_anisotropy = cso->max_anisotropy; + cfg.lod_algorithm = MALI_LOD_ALGORITHM_ANISOTROPIC; + } + cfg.wrap_mode_s = translate_tex_wrap(cso->wrap_s, false, using_nearest); cfg.wrap_mode_t = translate_tex_wrap(cso->wrap_t, false, using_nearest); cfg.wrap_mode_r = translate_tex_wrap(cso->wrap_r, false, using_nearest);