aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2020-03-11 16:39:04 -0700
committerEric Anholt <[email protected]>2020-03-17 11:11:51 -0700
commit5960dadd1f2494da6ea8fa04a46271beb66dea49 (patch)
tree0f00b74111c92a6ea30534136a0ce33567524dbe
parent4bc15e78fa51e6c0df491a9fef4f99b2dfad77a9 (diff)
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 <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4177> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4177>
-rw-r--r--.gitlab-ci/deqp-freedreno-a530-fails.txt154
-rw-r--r--src/gallium/drivers/freedreno/a5xx/fd5_texture.c11
2 files changed, 10 insertions, 155 deletions
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)