diff options
author | Roland Scheidegger <[email protected]> | 2020-02-19 01:22:11 +0100 |
---|---|---|
committer | Roland Scheidegger <[email protected]> | 2020-02-20 17:32:54 +0000 |
commit | 1b610aab583211210f189b46904b66c483f8e38b (patch) | |
tree | c197c74e9dc013813c438956c4e0a9f2498b52ca /src | |
parent | 8291d728dc997e87b4d2e4e451692643a1dba881 (diff) |
gallivm: fix crash with bptc border color sampling
bptc uses fallback for decoding, but still need to handle border color
properly.
v2: adjust piglit gitlab-ci expectations
Reviewed-by: Brian Paul <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3886>
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c index 77dd08c1b10..a86ece1b0d0 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c @@ -2357,13 +2357,16 @@ lp_build_clamp_border_color(struct lp_build_sample_context *bld, max_clamp = vec4_bld.one; } else if (format_desc->layout == UTIL_FORMAT_LAYOUT_RGTC || - format_desc->layout == UTIL_FORMAT_LAYOUT_ETC) { + format_desc->layout == UTIL_FORMAT_LAYOUT_ETC || + format_desc->layout == UTIL_FORMAT_LAYOUT_BPTC) { switch (format_desc->format) { case PIPE_FORMAT_RGTC1_UNORM: case PIPE_FORMAT_RGTC2_UNORM: case PIPE_FORMAT_LATC1_UNORM: case PIPE_FORMAT_LATC2_UNORM: case PIPE_FORMAT_ETC1_RGB8: + case PIPE_FORMAT_BPTC_RGBA_UNORM: + case PIPE_FORMAT_BPTC_SRGBA: min_clamp = vec4_bld.zero; max_clamp = vec4_bld.one; break; @@ -2374,6 +2377,12 @@ lp_build_clamp_border_color(struct lp_build_sample_context *bld, min_clamp = lp_build_const_vec(gallivm, vec4_type, -1.0F); max_clamp = vec4_bld.one; break; + case PIPE_FORMAT_BPTC_RGB_FLOAT: + /* not sure if we should clamp to max half float? */ + break; + case PIPE_FORMAT_BPTC_RGB_UFLOAT: + min_clamp = vec4_bld.zero; + break; default: assert(0); break; |