aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/v3d
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2018-06-20 10:22:44 -0700
committerEric Anholt <[email protected]>2018-06-20 12:31:54 -0700
commitedb7890750f8230021c1efa8e4d0d7a383f076c4 (patch)
tree566b0b21da25cba92aadcce806f7cf8ef165470f /src/gallium/drivers/v3d
parent3f960c1338713d317ce6463be68cee162c968d8d (diff)
v3d: Fix min vs mag determination when not doing mip filtering.
Fixes all 128 failing tests in dEQP-GLES3.functional.texture.filtering.*.combinations
Diffstat (limited to 'src/gallium/drivers/v3d')
-rw-r--r--src/gallium/drivers/v3d/v3dx_state.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/gallium/drivers/v3d/v3dx_state.c b/src/gallium/drivers/v3d/v3dx_state.c
index 70c596855f9..c0f43d800ea 100644
--- a/src/gallium/drivers/v3d/v3dx_state.c
+++ b/src/gallium/drivers/v3d/v3dx_state.c
@@ -556,9 +556,17 @@ v3d_create_sampler_state(struct pipe_context *pctx,
15);
sampler.max_level_of_detail = MIN2(cso->max_lod, 15);
+ /* If we're not doing inter-miplevel filtering, we need to
+ * clamp the LOD so that we only sample from baselevel.
+ * However, we need to still allow the calculated LOD to be
+ * fractionally over the baselevel, so that the HW can decide
+ * between the min and mag filters.
+ */
if (cso->min_mip_filter == PIPE_TEX_MIPFILTER_NONE) {
- sampler.min_level_of_detail = 0;
- sampler.max_level_of_detail = 0;
+ sampler.min_level_of_detail =
+ MIN2(sampler.min_level_of_detail, 1.0 / 256.0);
+ sampler.max_level_of_detail =
+ MIN2(sampler.max_level_of_detail, 1.0 / 256.0);
}
if (cso->max_anisotropy) {