From b95bc0e07d657cf20f62cfc994d505fc2d911f4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Tue, 26 May 2020 05:39:08 -0400 Subject: [PATCH] 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 Part-of: (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 d14d9287c49..10f9ac74588 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -2380,7 +2380,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 3a1870503cc..5fdd441fe6b 100644 --- a/src/gallium/drivers/radeonsi/si_state.c +++ b/src/gallium/drivers/radeonsi/si_state.c @@ -4467,7 +4467,8 @@ static void *si_create_sampler_state(struct pipe_context *ctx, unsigned max_aniso = sscreen->force_aniso >= 0 ? sscreen->force_aniso : 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) {