[Mesa-dev] [PATCH] radeonsi: add more cases for copying unsupported formats to resource_copy_region

Tom Stellard tom at stellard.net
Tue Apr 2 15:56:23 PDT 2013


From: Marek Olšák <maraeo at gmail.com>

Ported from r600g commit:

8891b2f9c91b2f6c8625184c23a10b8e55875dc0

NOTE: This is a candidate for the stable branches.
---
 src/gallium/drivers/radeonsi/r600_blit.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/src/gallium/drivers/radeonsi/r600_blit.c b/src/gallium/drivers/radeonsi/r600_blit.c
index f9d2568..f11f110 100644
--- a/src/gallium/drivers/radeonsi/r600_blit.c
+++ b/src/gallium/drivers/radeonsi/r600_blit.c
@@ -429,6 +429,18 @@ static void r600_resource_copy_region(struct pipe_context *ctx,
 			r600_change_format(dst, dst_level, &orig_info[1],
 					   PIPE_FORMAT_R8G8B8A8_UNORM);
 			break;
+		case 8:
+			r600_change_format(src, src_level, &orig_info[0],
+					   PIPE_FORMAT_R16G16B16A16_UINT);
+			r600_change_format(dst, dst_level, &orig_info[1],
+					   PIPE_FORMAT_R16G16B16A16_UINT);
+			break;
+		case 16:
+			r600_change_format(src, src_level, &orig_info[0],
+					   PIPE_FORMAT_R32G32B32A32_UINT);
+			r600_change_format(dst, dst_level, &orig_info[1],
+					   PIPE_FORMAT_R32G32B32A32_UINT);
+			break;
 		default:
 			fprintf(stderr, "Unhandled format %s with blocksize %u\n",
 				util_format_short_name(src->format), blocksize);
-- 
1.7.3.4



More information about the mesa-dev mailing list