Mesa (master): gallivm/sample: fix texel type for stencil 8-bit

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Jun 11 05:03:21 UTC 2020


Module: Mesa
Branch: master
Commit: 30f94b3e7d37466a6da948ea58ca12ddcf6cf9d5
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=30f94b3e7d37466a6da948ea58ca12ddcf6cf9d5

Author: Dave Airlie <airlied at redhat.com>
Date:   Wed Jun 10 13:12:41 2020 +1000

gallivm/sample: fix texel type for stencil 8-bit

This has to be unsigned, so clamping works properly for border
colors.

Fixes dEQP-GLES31.functional.texture.border_clamp.range_clamp.nearest_uint_stencil

Reviewed-by: Roland Scheidegger <sroland at vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5379>

---

 src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c
index 79f569baf93..2565c9b1420 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c
@@ -2910,7 +2910,7 @@ lp_build_sample_soa_code(struct gallivm_state *gallivm,
    else if (util_format_has_stencil(bld.format_desc) &&
        !util_format_has_depth(bld.format_desc)) {
       /* for stencil only formats, sample stencil (uint) */
-      bld.texel_type = lp_type_int_vec(type.width, type.width * type.length);
+      bld.texel_type = lp_type_uint_vec(type.width, type.width * type.length);
    }
 
    if (!static_texture_state->level_zero_only ||



More information about the mesa-commit mailing list