Mesa (master): gallivm: switch the mask6/mask7 cases for signed rgtc formats
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Apr 2 16:15:45 UTC 2020
Module: Mesa
Branch: master
Commit: 0a3a8806707b7ba4fc2e79896b63c35b1d9f80f6
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=0a3a8806707b7ba4fc2e79896b63c35b1d9f80f6
Author: Roland Scheidegger <sroland at vmware.com>
Date: Thu Apr 2 04:19:51 2020 +0200
gallivm: switch the mask6/mask7 cases for signed rgtc formats
This fixes some regressions where -1.0/1.0 results got flipped, but it's still
broken in some cases.
Reviewed-by: Dave Airlie <airlied at redhat.com>
Reviewed-by: Brian Paul <brianp at vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4416>
---
src/gallium/auxiliary/gallivm/lp_bld_format_s3tc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_format_s3tc.c b/src/gallium/auxiliary/gallivm/lp_bld_format_s3tc.c
index 50addad486a..d799a5d45a9 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_format_s3tc.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_format_s3tc.c
@@ -1017,8 +1017,8 @@ s3tc_dxt5_alpha_channel(struct gallivm_state *gallivm,
mask7 = lp_build_compare(gallivm, type, PIPE_FUNC_EQUAL,
code_s, lp_build_const_int_vec(gallivm, type, 7));
if (is_signed) {
- alpha = lp_build_select(&bld32, mask6, lp_build_const_int_vec(gallivm, type, 127), alpha);
- alpha = lp_build_select(&bld32, mask7, lp_build_const_int_vec(gallivm, type, -127), alpha);
+ alpha = lp_build_select(&bld32, mask6, lp_build_const_int_vec(gallivm, type, -127), alpha);
+ alpha = lp_build_select(&bld32, mask7, lp_build_const_int_vec(gallivm, type, 127), alpha);
} else {
alpha = LLVMBuildAnd(builder, alpha, LLVMBuildNot(builder, mask6, ""), "");
alpha = LLVMBuildOr(builder, alpha, mask7, "");
More information about the mesa-commit
mailing list