From: Eric Anholt Date: Wed, 11 Mar 2020 23:39:04 +0000 (-0700) Subject: freedreno/a5xx: Fix min-vs-mag filtering decisions on non-mipmap tex. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5960dadd1f2494da6ea8fa04a46271beb66dea49;p=mesa.git freedreno/a5xx: Fix min-vs-mag filtering decisions on non-mipmap tex. This a port of 3338d6e5f8b5 ("freedreno/a3xx: Mostly fix min-vs-mag filtering decisions on non-mipmap tex.") Reviewed-by: Kristian H. Kristensen Tested-by: Marge Bot Part-of: --- diff --git a/.gitlab-ci/deqp-freedreno-a530-fails.txt b/.gitlab-ci/deqp-freedreno-a530-fails.txt index a7d767e7817..d3cf94cbebd 100644 --- a/.gitlab-ci/deqp-freedreno-a530-fails.txt +++ b/.gitlab-ci/deqp-freedreno-a530-fails.txt @@ -4,94 +4,10 @@ dEQP-GLES2.functional.clipping.point.wide_point_clip dEQP-GLES2.functional.clipping.point.wide_point_clip_viewport_center dEQP-GLES2.functional.clipping.point.wide_point_clip_viewport_corner dEQP-GLES2.functional.clipping.triangle_vertex.clip_three.clip_neg_x_neg_z_and_pos_x_pos_z_and_neg_x_neg_y_pos_z -dEQP-GLES2.functional.texture.filtering.2d.linear_nearest_clamp_etc1 -dEQP-GLES2.functional.texture.filtering.2d.linear_nearest_clamp_l8_npot -dEQP-GLES2.functional.texture.filtering.2d.linear_nearest_clamp_l8_pot -dEQP-GLES2.functional.texture.filtering.2d.linear_nearest_clamp_rgb888_npot -dEQP-GLES2.functional.texture.filtering.2d.linear_nearest_clamp_rgb888_pot -dEQP-GLES2.functional.texture.filtering.2d.linear_nearest_clamp_rgba4444_npot -dEQP-GLES2.functional.texture.filtering.2d.linear_nearest_clamp_rgba4444_pot -dEQP-GLES2.functional.texture.filtering.2d.linear_nearest_clamp_rgba8888_npot -dEQP-GLES2.functional.texture.filtering.2d.linear_nearest_clamp_rgba8888_pot -dEQP-GLES2.functional.texture.filtering.2d.linear_nearest_mirror_etc1 -dEQP-GLES2.functional.texture.filtering.2d.linear_nearest_mirror_l8_pot -dEQP-GLES2.functional.texture.filtering.2d.linear_nearest_mirror_rgb888_pot -dEQP-GLES2.functional.texture.filtering.2d.linear_nearest_mirror_rgba4444_pot -dEQP-GLES2.functional.texture.filtering.2d.linear_nearest_mirror_rgba8888_pot -dEQP-GLES2.functional.texture.filtering.2d.linear_nearest_repeat_etc1 -dEQP-GLES2.functional.texture.filtering.2d.linear_nearest_repeat_l8_pot -dEQP-GLES2.functional.texture.filtering.2d.linear_nearest_repeat_rgb888_pot -dEQP-GLES2.functional.texture.filtering.2d.linear_nearest_repeat_rgba4444_pot -dEQP-GLES2.functional.texture.filtering.2d.linear_nearest_repeat_rgba8888_pot -dEQP-GLES2.functional.texture.filtering.2d.nearest_linear_clamp_etc1 -dEQP-GLES2.functional.texture.filtering.2d.nearest_linear_clamp_l8_npot -dEQP-GLES2.functional.texture.filtering.2d.nearest_linear_clamp_l8_pot -dEQP-GLES2.functional.texture.filtering.2d.nearest_linear_clamp_rgb888_npot -dEQP-GLES2.functional.texture.filtering.2d.nearest_linear_clamp_rgb888_pot -dEQP-GLES2.functional.texture.filtering.2d.nearest_linear_clamp_rgba4444_npot -dEQP-GLES2.functional.texture.filtering.2d.nearest_linear_clamp_rgba4444_pot -dEQP-GLES2.functional.texture.filtering.2d.nearest_linear_clamp_rgba8888_npot -dEQP-GLES2.functional.texture.filtering.2d.nearest_linear_clamp_rgba8888_pot -dEQP-GLES2.functional.texture.filtering.2d.nearest_linear_mirror_etc1 -dEQP-GLES2.functional.texture.filtering.2d.nearest_linear_mirror_l8_pot -dEQP-GLES2.functional.texture.filtering.2d.nearest_linear_mirror_rgb888_pot -dEQP-GLES2.functional.texture.filtering.2d.nearest_linear_mirror_rgba4444_pot -dEQP-GLES2.functional.texture.filtering.2d.nearest_linear_mirror_rgba8888_pot -dEQP-GLES2.functional.texture.filtering.2d.nearest_linear_repeat_etc1 -dEQP-GLES2.functional.texture.filtering.2d.nearest_linear_repeat_l8_pot -dEQP-GLES2.functional.texture.filtering.2d.nearest_linear_repeat_rgb888_pot -dEQP-GLES2.functional.texture.filtering.2d.nearest_linear_repeat_rgba4444_pot -dEQP-GLES2.functional.texture.filtering.2d.nearest_linear_repeat_rgba8888_pot -dEQP-GLES2.functional.texture.filtering.cube.linear_nearest_clamp_etc1 -dEQP-GLES2.functional.texture.filtering.cube.linear_nearest_clamp_l8_npot -dEQP-GLES2.functional.texture.filtering.cube.linear_nearest_clamp_l8_pot -dEQP-GLES2.functional.texture.filtering.cube.linear_nearest_clamp_rgb888_npot -dEQP-GLES2.functional.texture.filtering.cube.linear_nearest_clamp_rgb888_pot -dEQP-GLES2.functional.texture.filtering.cube.linear_nearest_clamp_rgba4444_npot -dEQP-GLES2.functional.texture.filtering.cube.linear_nearest_clamp_rgba4444_pot -dEQP-GLES2.functional.texture.filtering.cube.linear_nearest_clamp_rgba8888_npot -dEQP-GLES2.functional.texture.filtering.cube.linear_nearest_clamp_rgba8888_pot -dEQP-GLES2.functional.texture.filtering.cube.linear_nearest_mirror_l8_pot -dEQP-GLES2.functional.texture.filtering.cube.linear_nearest_mirror_rgb888_pot -dEQP-GLES2.functional.texture.filtering.cube.linear_nearest_mirror_rgba4444_pot -dEQP-GLES2.functional.texture.filtering.cube.linear_nearest_mirror_rgba8888_pot -dEQP-GLES2.functional.texture.filtering.cube.linear_nearest_repeat_l8_pot -dEQP-GLES2.functional.texture.filtering.cube.linear_nearest_repeat_rgb888_pot -dEQP-GLES2.functional.texture.filtering.cube.linear_nearest_repeat_rgba4444_pot -dEQP-GLES2.functional.texture.filtering.cube.linear_nearest_repeat_rgba8888_pot -dEQP-GLES2.functional.texture.filtering.cube.nearest_linear_clamp_etc1 -dEQP-GLES2.functional.texture.filtering.cube.nearest_linear_clamp_l8_npot -dEQP-GLES2.functional.texture.filtering.cube.nearest_linear_clamp_l8_pot -dEQP-GLES2.functional.texture.filtering.cube.nearest_linear_clamp_rgb888_npot -dEQP-GLES2.functional.texture.filtering.cube.nearest_linear_clamp_rgb888_pot -dEQP-GLES2.functional.texture.filtering.cube.nearest_linear_clamp_rgba4444_npot -dEQP-GLES2.functional.texture.filtering.cube.nearest_linear_clamp_rgba4444_pot -dEQP-GLES2.functional.texture.filtering.cube.nearest_linear_clamp_rgba8888_npot -dEQP-GLES2.functional.texture.filtering.cube.nearest_linear_clamp_rgba8888_pot -dEQP-GLES2.functional.texture.filtering.cube.nearest_linear_mirror_l8_pot -dEQP-GLES2.functional.texture.filtering.cube.nearest_linear_mirror_rgb888_pot -dEQP-GLES2.functional.texture.filtering.cube.nearest_linear_mirror_rgba4444_pot -dEQP-GLES2.functional.texture.filtering.cube.nearest_linear_mirror_rgba8888_pot -dEQP-GLES2.functional.texture.filtering.cube.nearest_linear_repeat_l8_pot -dEQP-GLES2.functional.texture.filtering.cube.nearest_linear_repeat_rgb888_pot -dEQP-GLES2.functional.texture.filtering.cube.nearest_linear_repeat_rgba4444_pot -dEQP-GLES2.functional.texture.filtering.cube.nearest_linear_repeat_rgba8888_pot dEQP-GLES2.functional.texture.specification.basic_copytexsubimage2d.2d_alpha dEQP-GLES2.functional.texture.specification.basic_copytexsubimage2d.2d_luminance dEQP-GLES2.functional.texture.specification.basic_copytexsubimage2d.2d_rgb dEQP-GLES2.functional.texture.specification.basic_copytexsubimage2d.2d_rgba -dEQP-GLES2.functional.texture.vertex.2d.filtering.linear_nearest_clamp -dEQP-GLES2.functional.texture.vertex.2d.filtering.linear_nearest_mirror -dEQP-GLES2.functional.texture.vertex.2d.filtering.linear_nearest_repeat -dEQP-GLES2.functional.texture.vertex.2d.filtering.nearest_linear_clamp -dEQP-GLES2.functional.texture.vertex.2d.filtering.nearest_linear_mirror -dEQP-GLES2.functional.texture.vertex.2d.filtering.nearest_linear_repeat -dEQP-GLES2.functional.texture.vertex.cube.filtering.linear_nearest_clamp -dEQP-GLES2.functional.texture.vertex.cube.filtering.linear_nearest_mirror -dEQP-GLES2.functional.texture.vertex.cube.filtering.linear_nearest_repeat -dEQP-GLES2.functional.texture.vertex.cube.filtering.nearest_linear_clamp -dEQP-GLES2.functional.texture.vertex.cube.filtering.nearest_linear_mirror -dEQP-GLES2.functional.texture.vertex.cube.filtering.nearest_linear_repeat dEQP-GLES3.functional.clipping.line.wide_line_clip_viewport_center dEQP-GLES3.functional.clipping.line.wide_line_clip_viewport_corner dEQP-GLES3.functional.clipping.point.wide_point_clip @@ -585,58 +501,6 @@ dEQP-GLES3.functional.shaders.texture_functions.textureprojlod.sampler3d_float_f dEQP-GLES3.functional.shaders.texture_functions.textureprojlod.sampler3d_float_vertex dEQP-GLES3.functional.shaders.texture_functions.textureproj.sampler3d_bias_float_fragment dEQP-GLES3.functional.shaders.texture_functions.texture.sampler3d_bias_float_fragment -dEQP-GLES3.functional.texture.filtering.2d_array.combinations.linear_nearest_clamp_mirror -dEQP-GLES3.functional.texture.filtering.2d_array.combinations.linear_nearest_clamp_repeat -dEQP-GLES3.functional.texture.filtering.2d_array.combinations.linear_nearest_mirror_clamp -dEQP-GLES3.functional.texture.filtering.2d_array.combinations.linear_nearest_mirror_mirror -dEQP-GLES3.functional.texture.filtering.2d_array.combinations.linear_nearest_mirror_repeat -dEQP-GLES3.functional.texture.filtering.2d_array.combinations.linear_nearest_repeat_clamp -dEQP-GLES3.functional.texture.filtering.2d_array.combinations.linear_nearest_repeat_mirror -dEQP-GLES3.functional.texture.filtering.2d_array.combinations.linear_nearest_repeat_repeat -dEQP-GLES3.functional.texture.filtering.2d_array.combinations.nearest_linear_clamp_mirror -dEQP-GLES3.functional.texture.filtering.2d_array.combinations.nearest_linear_clamp_repeat -dEQP-GLES3.functional.texture.filtering.2d_array.combinations.nearest_linear_mirror_clamp -dEQP-GLES3.functional.texture.filtering.2d_array.combinations.nearest_linear_mirror_mirror -dEQP-GLES3.functional.texture.filtering.2d_array.combinations.nearest_linear_mirror_repeat -dEQP-GLES3.functional.texture.filtering.2d_array.combinations.nearest_linear_repeat_clamp -dEQP-GLES3.functional.texture.filtering.2d_array.combinations.nearest_linear_repeat_mirror -dEQP-GLES3.functional.texture.filtering.2d_array.combinations.nearest_linear_repeat_repeat -dEQP-GLES3.functional.texture.filtering.2d.combinations.linear_nearest_clamp_clamp -dEQP-GLES3.functional.texture.filtering.2d.combinations.linear_nearest_clamp_mirror -dEQP-GLES3.functional.texture.filtering.2d.combinations.linear_nearest_clamp_repeat -dEQP-GLES3.functional.texture.filtering.2d.combinations.linear_nearest_mirror_clamp -dEQP-GLES3.functional.texture.filtering.2d.combinations.linear_nearest_mirror_mirror -dEQP-GLES3.functional.texture.filtering.2d.combinations.linear_nearest_mirror_repeat -dEQP-GLES3.functional.texture.filtering.2d.combinations.linear_nearest_repeat_clamp -dEQP-GLES3.functional.texture.filtering.2d.combinations.linear_nearest_repeat_mirror -dEQP-GLES3.functional.texture.filtering.2d.combinations.linear_nearest_repeat_repeat -dEQP-GLES3.functional.texture.filtering.2d.combinations.nearest_linear_clamp_clamp -dEQP-GLES3.functional.texture.filtering.2d.combinations.nearest_linear_clamp_mirror -dEQP-GLES3.functional.texture.filtering.2d.combinations.nearest_linear_clamp_repeat -dEQP-GLES3.functional.texture.filtering.2d.combinations.nearest_linear_mirror_clamp -dEQP-GLES3.functional.texture.filtering.2d.combinations.nearest_linear_mirror_mirror -dEQP-GLES3.functional.texture.filtering.2d.combinations.nearest_linear_mirror_repeat -dEQP-GLES3.functional.texture.filtering.2d.combinations.nearest_linear_repeat_clamp -dEQP-GLES3.functional.texture.filtering.2d.combinations.nearest_linear_repeat_mirror -dEQP-GLES3.functional.texture.filtering.2d.combinations.nearest_linear_repeat_repeat -dEQP-GLES3.functional.texture.filtering.cube.combinations.linear_nearest_clamp_clamp -dEQP-GLES3.functional.texture.filtering.cube.combinations.linear_nearest_clamp_mirror -dEQP-GLES3.functional.texture.filtering.cube.combinations.linear_nearest_clamp_repeat -dEQP-GLES3.functional.texture.filtering.cube.combinations.linear_nearest_mirror_clamp -dEQP-GLES3.functional.texture.filtering.cube.combinations.linear_nearest_mirror_mirror -dEQP-GLES3.functional.texture.filtering.cube.combinations.linear_nearest_mirror_repeat -dEQP-GLES3.functional.texture.filtering.cube.combinations.linear_nearest_repeat_clamp -dEQP-GLES3.functional.texture.filtering.cube.combinations.linear_nearest_repeat_mirror -dEQP-GLES3.functional.texture.filtering.cube.combinations.linear_nearest_repeat_repeat -dEQP-GLES3.functional.texture.filtering.cube.combinations.nearest_linear_clamp_clamp -dEQP-GLES3.functional.texture.filtering.cube.combinations.nearest_linear_clamp_mirror -dEQP-GLES3.functional.texture.filtering.cube.combinations.nearest_linear_clamp_repeat -dEQP-GLES3.functional.texture.filtering.cube.combinations.nearest_linear_mirror_clamp -dEQP-GLES3.functional.texture.filtering.cube.combinations.nearest_linear_mirror_mirror -dEQP-GLES3.functional.texture.filtering.cube.combinations.nearest_linear_mirror_repeat -dEQP-GLES3.functional.texture.filtering.cube.combinations.nearest_linear_repeat_clamp -dEQP-GLES3.functional.texture.filtering.cube.combinations.nearest_linear_repeat_mirror -dEQP-GLES3.functional.texture.filtering.cube.combinations.nearest_linear_repeat_repeat dEQP-GLES3.functional.texture.specification.basic_copytexsubimage2d.2d_alpha dEQP-GLES3.functional.texture.specification.basic_copytexsubimage2d.2d_luminance dEQP-GLES3.functional.texture.specification.basic_copytexsubimage2d.2d_rgba @@ -729,18 +593,6 @@ dEQP-GLES3.functional.texture.specification.texstorage3d.format.srgb8_alpha8_3d dEQP-GLES3.functional.texture.specification.texstorage3d.size.3d_32x64x16_4_levels dEQP-GLES3.functional.texture.specification.texstorage3d.size.3d_57x63x11_2_levels dEQP-GLES3.functional.texture.specification.texstorage3d.size.3d_57x63x11_6_levels -dEQP-GLES3.functional.texture.vertex.2d_array.filtering.linear_nearest_clamp -dEQP-GLES3.functional.texture.vertex.2d_array.filtering.linear_nearest_mirror -dEQP-GLES3.functional.texture.vertex.2d_array.filtering.linear_nearest_repeat -dEQP-GLES3.functional.texture.vertex.2d_array.filtering.nearest_linear_clamp -dEQP-GLES3.functional.texture.vertex.2d_array.filtering.nearest_linear_mirror -dEQP-GLES3.functional.texture.vertex.2d_array.filtering.nearest_linear_repeat -dEQP-GLES3.functional.texture.vertex.2d.filtering.linear_nearest_clamp -dEQP-GLES3.functional.texture.vertex.2d.filtering.linear_nearest_mirror -dEQP-GLES3.functional.texture.vertex.2d.filtering.linear_nearest_repeat -dEQP-GLES3.functional.texture.vertex.2d.filtering.nearest_linear_clamp -dEQP-GLES3.functional.texture.vertex.2d.filtering.nearest_linear_mirror -dEQP-GLES3.functional.texture.vertex.2d.filtering.nearest_linear_repeat dEQP-GLES3.functional.texture.vertex.3d.wrap.clamp_clamp_clamp dEQP-GLES3.functional.texture.vertex.3d.wrap.clamp_clamp_mirror dEQP-GLES3.functional.texture.vertex.3d.wrap.clamp_clamp_repeat @@ -768,12 +620,6 @@ dEQP-GLES3.functional.texture.vertex.3d.wrap.repeat_mirror_repeat dEQP-GLES3.functional.texture.vertex.3d.wrap.repeat_repeat_clamp dEQP-GLES3.functional.texture.vertex.3d.wrap.repeat_repeat_mirror dEQP-GLES3.functional.texture.vertex.3d.wrap.repeat_repeat_repeat -dEQP-GLES3.functional.texture.vertex.cube.filtering.linear_nearest_clamp -dEQP-GLES3.functional.texture.vertex.cube.filtering.linear_nearest_mirror -dEQP-GLES3.functional.texture.vertex.cube.filtering.linear_nearest_repeat -dEQP-GLES3.functional.texture.vertex.cube.filtering.nearest_linear_clamp -dEQP-GLES3.functional.texture.vertex.cube.filtering.nearest_linear_mirror -dEQP-GLES3.functional.texture.vertex.cube.filtering.nearest_linear_repeat dEQP-GLES3.functional.transform_feedback.array_element.interleaved.lines.highp_float dEQP-GLES3.functional.transform_feedback.array_element.interleaved.lines.highp_int dEQP-GLES3.functional.transform_feedback.array_element.interleaved.lines.highp_ivec2 diff --git a/src/gallium/drivers/freedreno/a5xx/fd5_texture.c b/src/gallium/drivers/freedreno/a5xx/fd5_texture.c index 5da1a3022e9..5ec8e546eca 100644 --- a/src/gallium/drivers/freedreno/a5xx/fd5_texture.c +++ b/src/gallium/drivers/freedreno/a5xx/fd5_texture.c @@ -126,11 +126,20 @@ fd5_sampler_state_create(struct pipe_context *pctx, COND(!cso->seamless_cube_map, A5XX_TEX_SAMP_1_CUBEMAPSEAMLESSFILTOFF) | COND(!cso->normalized_coords, A5XX_TEX_SAMP_1_UNNORM_COORDS); + so->texsamp0 |= A5XX_TEX_SAMP_0_LOD_BIAS(cso->lod_bias); + if (cso->min_mip_filter != PIPE_TEX_MIPFILTER_NONE) { - so->texsamp0 |= A5XX_TEX_SAMP_0_LOD_BIAS(cso->lod_bias); so->texsamp1 |= A5XX_TEX_SAMP_1_MIN_LOD(cso->min_lod) | A5XX_TEX_SAMP_1_MAX_LOD(cso->max_lod); + } else { + /* If we're not doing mipmap filtering, we still need a slightly > 0 + * LOD clamp so the HW can decide between min and mag filtering of + * level 0. + */ + so->texsamp1 |= + A5XX_TEX_SAMP_1_MIN_LOD(MIN2(cso->min_lod, 0.125)) | + A5XX_TEX_SAMP_1_MAX_LOD(MIN2(cso->max_lod, 0.125)); } if (cso->compare_mode)