From a857caebd2f799a1ede1dc3b38fb849f6491d2ec Mon Sep 17 00:00:00 2001 From: Sagar Ghuge Date: Fri, 22 Sep 2023 10:23:04 -0700 Subject: [PATCH] iris: Switch to ANISOTROPIC_FAST filter mode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Same thing as ANISOTROPIC including all restrictions except HW is allowed to take liberties with precision to speed things up, Currently only has an affect on formats of type *_sRGB. Signed-off-by: Sagar Ghuge Reviewed-by: Lionel Landwerlin Reviewed-by: José Roberto de Souza Part-of: --- src/gallium/drivers/iris/iris_state.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c index bbea195b3f5..27750d88ff8 100644 --- a/src/gallium/drivers/iris/iris_state.c +++ b/src/gallium/drivers/iris/iris_state.c @@ -2491,12 +2491,21 @@ fill_sampler_state(uint32_t *sampler_state, if (max_anisotropy >= 2) { if (state->min_img_filter == PIPE_TEX_FILTER_LINEAR) { +#if GFX_VER >= 30 + samp.MinModeFilter = MAPFILTER_ANISOTROPIC_FAST; +#else samp.MinModeFilter = MAPFILTER_ANISOTROPIC; +#endif samp.AnisotropicAlgorithm = EWAApproximation; } - if (state->mag_img_filter == PIPE_TEX_FILTER_LINEAR) + if (state->mag_img_filter == PIPE_TEX_FILTER_LINEAR) { +#if GFX_VER >= 30 + samp.MagModeFilter = MAPFILTER_ANISOTROPIC_FAST; +#else samp.MagModeFilter = MAPFILTER_ANISOTROPIC; +#endif + } samp.MaximumAnisotropy = MIN2((max_anisotropy - 2) / 2, RATIO161);