From 66b8b1513464aa3258ae6a024fcaea7a02e2def0 Mon Sep 17 00:00:00 2001
From: Jochen Rollwagen <[email protected]>
Date: Fri, 4 Nov 2016 09:11:38 +0100
Subject: [PATCH] Fix RadeonCopyData bpp=2 case for big-endian
The current code in RadeonCopyData blocks the bpp=2 case setting
swappiness to RADEON_HOST_DATA_SWAP_16BIT.
This patch fixes this.
---
src/radeon_video.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/src/radeon_video.c b/src/radeon_video.c
index d058986..2de0b48 100644
--- a/src/radeon_video.c
+++ b/src/radeon_video.c
@@ -198,15 +198,10 @@ RADEONCopyData(
unsigned int w,
unsigned int bpp
){
- /* Get the byte-swapping right for big endian systems */
- if ( bpp == 2 ) {
- w *= 2;
- bpp = 1;
- }
-
- {
int swap = RADEON_HOST_DATA_SWAP_NONE;
+ /* Get the byte-swapping right for big endian systems */
+
#if X_BYTE_ORDER == X_BIG_ENDIAN
switch(bpp) {
case 2:
@@ -229,7 +224,6 @@ RADEONCopyData(
dst += dstPitch;
}
}
- }
}
--
1.7.9.5
>From 66b8b1513464aa3258ae6a024fcaea7a02e2def0 Mon Sep 17 00:00:00 2001
From: Jochen Rollwagen <[email protected]>
Date: Fri, 4 Nov 2016 09:11:38 +0100
Subject: [PATCH] Fix RadeonCopyData bpp=2 case for big-endian
The current code in RadeonCopyData blocks the bpp=2 case setting swappiness to RADEON_HOST_DATA_SWAP_16BIT.
This patch fixes this.
---
src/radeon_video.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/src/radeon_video.c b/src/radeon_video.c
index d058986..2de0b48 100644
--- a/src/radeon_video.c
+++ b/src/radeon_video.c
@@ -198,15 +198,10 @@ RADEONCopyData(
unsigned int w,
unsigned int bpp
){
- /* Get the byte-swapping right for big endian systems */
- if ( bpp == 2 ) {
- w *= 2;
- bpp = 1;
- }
-
- {
int swap = RADEON_HOST_DATA_SWAP_NONE;
+ /* Get the byte-swapping right for big endian systems */
+
#if X_BYTE_ORDER == X_BIG_ENDIAN
switch(bpp) {
case 2:
@@ -229,7 +224,6 @@ RADEONCopyData(
dst += dstPitch;
}
}
- }
}
--
1.7.9.5
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx