gallivm/sample: fix texel type for stencil 8-bit
authorDave Airlie <airlied@redhat.com>
Wed, 10 Jun 2020 03:12:41 +0000 (13:12 +1000)
committerDave Airlie <airlied@redhat.com>
Thu, 11 Jun 2020 04:41:23 +0000 (14:41 +1000)
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@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5379>

src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c

index 79f569b..2565c9b 100644 (file)
@@ -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 ||