From 50da8b8f5b5feb6787ed50f221529730d25b5467 Mon Sep 17 00:00:00 2001 From: Stephane Marchesin Date: Wed, 6 Feb 2008 17:44:52 +0100 Subject: [PATCH] Fix UV swapping on PPC. --- src/nv30_video_texture.c | 4 ++++ src/nv40_video_texture.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/nv30_video_texture.c b/src/nv30_video_texture.c index 12efd7f..b6e4066 100644 --- a/src/nv30_video_texture.c +++ b/src/nv30_video_texture.c @@ -142,7 +142,11 @@ NV30VideoTexture(ScrnInfoPtr pScrn, int offset, uint16_t width, uint16_t height, break; case 2: card_fmt = NV34TCL_TX_FORMAT_FORMAT_L8A8_RECT; +#if X_BYTE_ORDER == X_BIG_ENDIAN + card_swz = SWIZZLE(S1, S1, S1, S1, Z, W, X, Y); /* x = V, y = U */ +#else card_swz = SWIZZLE(S1, S1, S1, S1, W, Z, Y, X); /* x = V, y = U */ +#endif break; } diff --git a/src/nv40_video_texture.c b/src/nv40_video_texture.c index 2566873..c541750 100644 --- a/src/nv40_video_texture.c +++ b/src/nv40_video_texture.c @@ -144,7 +144,11 @@ NV40VideoTexture(ScrnInfoPtr pScrn, int offset, uint16_t width, uint16_t height, break; case 2: card_fmt = NV40TCL_TEX_FORMAT_FORMAT_A8L8; +#if X_BYTE_ORDER == X_BIG_ENDIAN + card_swz = SWIZZLE(S1, S1, S1, S1, Z, W, X, Y); /* x = V, y = U */ +#else card_swz = SWIZZLE(S1, S1, S1, S1, W, Z, Y, X); /* x = V, y = U */ +#endif break; } -- 2.32.0.93.g670b81a890