summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland Scheidegger <sroland@vmware.com>2020-02-19 01:22:11 +0100
committerRoland Scheidegger <rscheidegger_lists@hispeed.ch>2020-02-20 17:32:54 +0000
commit1b610aab583211210f189b46904b66c483f8e38b (patch)
treec197c74e9dc013813c438956c4e0a9f2498b52ca
parent8291d728dc997e87b4d2e4e451692643a1dba881 (diff)
downloadmesa-1b610aab583211210f189b46904b66c483f8e38b.tar.gz
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 <brianp@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3886>
-rw-r--r--.gitlab-ci/piglit/quick_gl.txt8
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c11
2 files changed, 13 insertions, 6 deletions
diff --git a/.gitlab-ci/piglit/quick_gl.txt b/.gitlab-ci/piglit/quick_gl.txt
index 586ec3c046d..f23284b8080 100644
--- a/.gitlab-ci/piglit/quick_gl.txt
+++ b/.gitlab-ci/piglit/quick_gl.txt
@@ -975,8 +975,6 @@ spec/arb_texture_barrier/arb_texture_barrier-blending-in-shader 512 42 8 8 8: sk
spec/arb_texture_buffer_object/indexed: skip
spec/arb_texture_buffer_object/negative-unsupported: skip
spec/arb_texture_compression_bptc/bptc-float-modes: fail
-spec/arb_texture_compression_bptc/texwrap formats bordercolor: crash
-spec/arb_texture_compression_bptc/texwrap formats bordercolor-swizzled: crash
spec/arb_texture_cube_map/copyteximage cube samples=16: skip
spec/arb_texture_cube_map/copyteximage cube samples=2: skip
spec/arb_texture_cube_map/copyteximage cube samples=32: skip
@@ -2205,9 +2203,9 @@ wgl/wgl-sanity: skip
summary:
name: results
---- --------
- pass: 19320
+ pass: 19328
fail: 234
- crash: 2
+ crash: 0
skip: 1948
timeout: 0
warn: 2
@@ -2217,4 +2215,4 @@ summary:
changes: 0
fixes: 0
regressions: 0
- total: 21524
+ total: 21530
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;