diff options
author | Roland Scheidegger <[email protected]> | 2020-03-24 21:56:40 +0100 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-03-25 17:56:11 +0000 |
commit | 4897e70ccd3987d470ec8622d473ee3405f6e96f (patch) | |
tree | dd477f7532d10cefe2a5429d56d4fc2f38a2a426 | |
parent | 8c30b9d9878b14098d01a4bae5d51f1392e3baff (diff) |
gallivm: disable rgtc/latc SNORM accellerated fetches
Unfortunately this appears to be bugged (it seems the piglit tests aren't
quite exhaustive enough). I'm almost certain it's the lerp
(lp_build_lerpdxta()) which doesn't handle signed numbers correctly, let's
disable for now.
Reviewed-by: Dave Airlie <[email protected]>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4311>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4311>
-rw-r--r-- | src/gallium/auxiliary/gallivm/lp_bld_format_aos.c | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_format_aos.c b/src/gallium/auxiliary/gallivm/lp_bld_format_aos.c index f8e1a963bb4..781ceb8b03d 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_format_aos.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_format_aos.c @@ -770,19 +770,25 @@ lp_build_fetch_rgba_aos(struct gallivm_state *gallivm, format_desc->format == PIPE_FORMAT_LATC1_SNORM || format_desc->format == PIPE_FORMAT_LATC2_SNORM); - tmp = lp_build_fetch_rgtc_rgba_aos(gallivm, - format_desc, - num_pixels, - base_ptr, - offset, - i, j, - cache); - - lp_build_conv(gallivm, - tmp_type, type, - &tmp, 1, &tmp, 1); - - return tmp; + if (!tmp_type.sign) { + /* + * FIXME: this is buggy for snorm formats, likely the lerp is + * busted. + */ + tmp = lp_build_fetch_rgtc_rgba_aos(gallivm, + format_desc, + num_pixels, + base_ptr, + offset, + i, j, + cache); + + lp_build_conv(gallivm, + tmp_type, type, + &tmp, 1, &tmp, 1); + + return tmp; + } } /* |