Module: Mesa
Branch: master
Commit: 9559071ed602e62c3619b8b8b02ac7e47a7eff8c
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=9559071ed602e62c3619b8b8b02ac7e47a7eff8c

Author: Oded Gabbay <[email protected]>
Date:   Thu Feb 25 22:35:00 2016 +0200

gallium/radeon: remove separate BE path in r600_translate_colorswap

After further testing, it appears there is no need for
separate BE path in r600_translate_colorswap()

The only fix remaining is the change of the last if statement, in the 4
channels case. Originally, it contained an invalid swizzle configuration
that never got hit, in LE or BE. So the fix is relevant for both systems.

This patch adds an additional 120 available visuals for LE and BE,
as seen in glxinfo

v2:
Tested for regressions by running piglit gpu.py with CAICOS (r600g) on
x86-64 machine. No regressions found.

Signed-off-by: Oded Gabbay <[email protected]>
Cc: "11.1 11.2" <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>

---

 src/gallium/drivers/radeon/r600_texture.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/src/gallium/drivers/radeon/r600_texture.c 
b/src/gallium/drivers/radeon/r600_texture.c
index 9a3ccb5..454d0f1 100644
--- a/src/gallium/drivers/radeon/r600_texture.c
+++ b/src/gallium/drivers/radeon/r600_texture.c
@@ -1293,25 +1293,14 @@ unsigned r600_translate_colorswap(enum pipe_format 
format)
                break;
        case 4:
                /* check the middle channels, the 1st and 4th channel can be 
NONE */
-#ifdef PIPE_ARCH_LITTLE_ENDIAN
                if (HAS_SWIZZLE(1,Y) && HAS_SWIZZLE(2,Z))
                        return V_0280A0_SWAP_STD; /* XYZW */
                else if (HAS_SWIZZLE(1,Z) && HAS_SWIZZLE(2,Y))
                        return V_0280A0_SWAP_STD_REV; /* WZYX */
                else if (HAS_SWIZZLE(1,Y) && HAS_SWIZZLE(2,X))
                        return V_0280A0_SWAP_ALT; /* ZYXW */
-               else if (HAS_SWIZZLE(1,X) && HAS_SWIZZLE(2,Y))
-                       return V_0280A0_SWAP_ALT_REV; /* WXYZ */
-#else
-               if (HAS_SWIZZLE(1,W) && HAS_SWIZZLE(2,X))
-                       return V_0280A0_SWAP_STD_REV; /* ZWXY */
-               else if (HAS_SWIZZLE(1,X) && HAS_SWIZZLE(2,W))
-                       return V_0280A0_SWAP_STD; /* YXWZ */
-               else if (HAS_SWIZZLE(1,W) && HAS_SWIZZLE(2,Z))
-                       return V_0280A0_SWAP_ALT_REV; /* XWZY */
                else if (HAS_SWIZZLE(1,Z) && HAS_SWIZZLE(2,W))
-                       return V_0280A0_SWAP_ALT; /* YZWX */
-#endif
+                       return V_0280A0_SWAP_ALT_REV; /* YZWX */
                break;
        }
        return ~0U;

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to