Mesa (staging/20.0): radeonsi: add a hack to disable TRUNC_COORD for shadow samplers

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jun 9 18:01:48 UTC 2020


Module: Mesa
Branch: staging/20.0
Commit: 41092aa00847305b0a3e8850d8136adab27a4363
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=41092aa00847305b0a3e8850d8136adab27a4363

Author: Marek Olšák <marek.olsak at amd.com>
Date:   Tue May 26 05:39:08 2020 -0400

radeonsi: add a hack to disable TRUNC_COORD for shadow samplers

This fixes dEQP-GLES3.functional.shaders.texture_functions.textureprojlodoffset.sampler2dshadow_vertex.

This is probably a dEQP bug.

Fixes: d573d1d82524b8a2e5f56938069cabc0f0176a0e

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5209>
(cherry picked from commit fe3947632ce9946562a39ef95a6796b8604f1f42)

---

 .pick_status.json                       | 2 +-
 src/gallium/drivers/radeonsi/si_state.c | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index 98705f33a5d..43936aba4dd 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -1930,7 +1930,7 @@
         "description": "radeonsi: add a hack to disable TRUNC_COORD for shadow samplers",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "master_sha": null,
         "because_sha": "d573d1d82524b8a2e5f56938069cabc0f0176a0e"
     },
diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c
index a6e1f60eb28..7074c35e805 100644
--- a/src/gallium/drivers/radeonsi/si_state.c
+++ b/src/gallium/drivers/radeonsi/si_state.c
@@ -4728,7 +4728,8 @@ static void *si_create_sampler_state(struct pipe_context *ctx,
                          : state->max_anisotropy;
    unsigned max_aniso_ratio = si_tex_aniso_filter(max_aniso);
    bool trunc_coord = state->min_img_filter == PIPE_TEX_FILTER_NEAREST &&
-                      state->mag_img_filter == PIPE_TEX_FILTER_NEAREST;
+                      state->mag_img_filter == PIPE_TEX_FILTER_NEAREST &&
+                      state->compare_mode == PIPE_TEX_COMPARE_NONE;
    union pipe_color_union clamped_border_color;
 
    if (!rstate) {



More information about the mesa-commit mailing list