From 4d24995adb17d99e999f398b64574be73f969886 Mon Sep 17 00:00:00 2001 From: Patrick Lerda Date: Fri, 15 Nov 2024 20:19:54 +0100 Subject: [PATCH] r600: fix the evergreen sampler when the minification and the magnification are not identical This change fixes the evergreen nonconformity issue on non-mipmap textures when the minification and the magnification are not in the same state. This modification disables 5278436d6742 when the minification and the magnification are different. This fixes the nonconformity without new regressions. Anyway, I was unable to reproduce the issue described by 5278436d6742 on palm and cayman. This change was tested on cayman and palm. It fixes 84 deqp-gles2 tests and 128 deqp-gles3 tests: deqp-gles2/functional/texture/filtering/2d/linear_nearest_* deqp-gles2/functional/texture/filtering/2d/nearest_linear_* deqp-gles2/functional/texture/filtering/cube/linear_nearest_* deqp-gles2/functional/texture/filtering/cube/nearest_linear_* deqp-gles2/functional/texture/vertex/2d/filtering/linear_nearest_* deqp-gles2/functional/texture/vertex/2d/filtering/nearest_linear_* deqp-gles2/functional/texture/vertex/cube/filtering/linear_nearest_* deqp-gles2/functional/texture/vertex/cube/filtering/nearest_linear_* deqp-gles3/functional/texture/filtering/2d/combinations/linear_nearest_* deqp-gles3/functional/texture/filtering/2d/combinations/nearest_linear_* deqp-gles3/functional/texture/filtering/2d_array/combinations/linear_nearest_* deqp-gles3/functional/texture/filtering/2d_array/combinations/nearest_linear_* deqp-gles3/functional/texture/filtering/3d/combinations/linear_nearest_* deqp-gles3/functional/texture/filtering/3d/combinations/nearest_linear_* deqp-gles3/functional/texture/filtering/cube/combinations/linear_nearest_* deqp-gles3/functional/texture/filtering/cube/combinations/nearest_linear_* deqp-gles3/functional/texture/vertex/2d/filtering/linear_nearest_* deqp-gles3/functional/texture/vertex/2d/filtering/nearest_linear_* deqp-gles3/functional/texture/vertex/2d_array/filtering/linear_nearest_* deqp-gles3/functional/texture/vertex/2d_array/filtering/nearest_linear_* deqp-gles3/functional/texture/vertex/3d/filtering/linear_nearest_* deqp-gles3/functional/texture/vertex/3d/filtering/nearest_linear_* deqp-gles3/functional/texture/vertex/cube/filtering/linear_nearest_* deqp-gles3/functional/texture/vertex/cube/filtering/nearest_linear_* Fixes: 5278436d6742 ("r600: force LOD range to be only one value when mip.min filter is NONE") Signed-off-by: Patrick Lerda Part-of: --- src/gallium/drivers/r600/evergreen_state.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/r600/evergreen_state.c b/src/gallium/drivers/r600/evergreen_state.c index a9c200c6657..47b386a599a 100644 --- a/src/gallium/drivers/r600/evergreen_state.c +++ b/src/gallium/drivers/r600/evergreen_state.c @@ -595,7 +595,8 @@ static void *evergreen_create_sampler_state(struct pipe_context *ctx, * MIP_FILTER will also be set to NONE. However, if more then one LOD is * configured, then the texture lookup seems to fail for some specific texture * formats. Forcing the number of LODs to one in this case fixes it. */ - if (state->min_mip_filter == PIPE_TEX_MIPFILTER_NONE) + if (state->min_mip_filter == PIPE_TEX_MIPFILTER_NONE && + state->mag_img_filter == state->min_img_filter) max_lod = state->min_lod; ss->border_color_use = sampler_state_needs_border_color(state);