radeonsi: Handle arbitrary 2-byte formats in resource_copy_region
authorMichel Dänzer <michel.daenzer@amd.com>
Wed, 27 Mar 2013 11:43:32 +0000 (12:43 +0100)
committerMichel Dänzer <michel@daenzer.net>
Tue, 2 Apr 2013 09:42:35 +0000 (11:42 +0200)
Fixes mplayer -vo vdpau OSD.

NOTE: This is a candidate for the 9.1 branch.

Reported-by: Igor Vagulin <igor.vagulin@gmail.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Tested-by: Christian König <christian.koenig@amd.com>
src/gallium/drivers/radeonsi/r600_blit.c

index eb69cd54ee0ac2049c4ad1b1b332efc2a0e61434..f9d2568d3aa469ef3408e9ad6a84070ef5e3d153 100644 (file)
@@ -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);