[Mesa-dev] [PATCH] radeonsi: Handle arbitrary 2-byte formats in resource_copy_region

Michel Dänzer michel at daenzer.net
Wed Mar 27 04:44:15 PDT 2013


From: Michel Dänzer <michel.daenzer at amd.com>

Fixes mplayer -vo vdpau OSD.

Reported-by: Igor Vagulin <igor.vagulin at gmail.com>
Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
---
 src/gallium/drivers/radeonsi/r600_blit.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/gallium/drivers/radeonsi/r600_blit.c b/src/gallium/drivers/radeonsi/r600_blit.c
index eb69cd5..f9d2568 100644
--- a/src/gallium/drivers/radeonsi/r600_blit.c
+++ b/src/gallium/drivers/radeonsi/r600_blit.c
@@ -417,6 +417,12 @@ static void r600_resource_copy_region(struct pipe_context *ctx,
 			r600_change_format(dst, dst_level, &orig_info[1],
 					   PIPE_FORMAT_R8_UNORM);
 			break;
+		case 2:
+			r600_change_format(src, src_level, &orig_info[0],
+					   PIPE_FORMAT_R8G8_UNORM);
+			r600_change_format(dst, dst_level, &orig_info[1],
+					   PIPE_FORMAT_R8G8_UNORM);
+			break;
 		case 4:
 			r600_change_format(src, src_level, &orig_info[0],
 					   PIPE_FORMAT_R8G8B8A8_UNORM);
-- 
1.8.2.rc3



More information about the mesa-dev mailing list