diff options
author | Oded Gabbay <oded.gabbay@gmail.com> | 2016-02-24 14:43:28 +0200 |
---|---|---|
committer | Emil Velikov <emil.l.velikov@gmail.com> | 2016-02-29 10:19:23 +0000 |
commit | abf09d1764de88e6ae404c66e4115c3f91ba0161 (patch) | |
tree | 09b5f51bb8b6cde1f03531b6b4ab0749d8c187a6 | |
parent | 1cb2108d9b4e588900a6db05b78b44bf44bdae9b (diff) |
gallium/radeon: return correct values for BE in r600_translate_colorswap
Because I changed the swizzle check, I also need to adapt the return
values for each check.
It's basically almost the same as before, we just cross between STD and
STD_REV, and cross between ALT and ALT_REV
This fixes the rgba test in gl-1.0-readpixsanity (piglit) and also
fixes tri-flat (mesa demos).
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Cc: "11.1 11.2" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
(cherry picked from commit 439b5b008fc7b4fd694fbb52cfcdeaec945143ad)
-rw-r--r-- | src/gallium/drivers/radeon/r600_texture.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gallium/drivers/radeon/r600_texture.c b/src/gallium/drivers/radeon/r600_texture.c index 1df0c300e85..9a3ccb5a6cf 100644 --- a/src/gallium/drivers/radeon/r600_texture.c +++ b/src/gallium/drivers/radeon/r600_texture.c @@ -1304,13 +1304,13 @@ unsigned r600_translate_colorswap(enum pipe_format format) return V_0280A0_SWAP_ALT_REV; /* WXYZ */ #else if (HAS_SWIZZLE(1,W) && HAS_SWIZZLE(2,X)) - return V_0280A0_SWAP_STD; /* ZWXY */ + return V_0280A0_SWAP_STD_REV; /* ZWXY */ else if (HAS_SWIZZLE(1,X) && HAS_SWIZZLE(2,W)) - return V_0280A0_SWAP_STD_REV; /* YXWZ */ + return V_0280A0_SWAP_STD; /* YXWZ */ else if (HAS_SWIZZLE(1,W) && HAS_SWIZZLE(2,Z)) - return V_0280A0_SWAP_ALT; /* XWZY */ + return V_0280A0_SWAP_ALT_REV; /* XWZY */ else if (HAS_SWIZZLE(1,Z) && HAS_SWIZZLE(2,W)) - return V_0280A0_SWAP_ALT_REV; /* YZWX */ + return V_0280A0_SWAP_ALT; /* YZWX */ #endif break; } |