r600g: add more cases for copying unsupported formats to resource_copy_region
authorMarek Olšák <maraeo@gmail.com>
Fri, 25 Jan 2013 17:36:19 +0000 (18:36 +0100)
committerMarek Olšák <maraeo@gmail.com>
Sat, 26 Jan 2013 13:59:04 +0000 (14:59 +0100)
just in case a new format is added to gallium

src/gallium/drivers/r600/r600_blit.c

index ed23052f54802d3b2317b99cdeba1b425ea0ad84..046eab54c42359f4f4108188fcabcef7423c392c 100644 (file)
@@ -624,10 +624,22 @@ static void r600_resource_copy_region(struct pipe_context *ctx,
                                dst_templ.format = PIPE_FORMAT_R8_UNORM;
                                src_templ.format = PIPE_FORMAT_R8_UNORM;
                                break;
+                        case 2:
+                               dst_templ.format = PIPE_FORMAT_R8G8_UNORM;
+                               src_templ.format = PIPE_FORMAT_R8G8_UNORM;
+                               break;
                        case 4:
                                dst_templ.format = PIPE_FORMAT_R8G8B8A8_UNORM;
                                src_templ.format = PIPE_FORMAT_R8G8B8A8_UNORM;
                                break;
+                        case 8:
+                                dst_templ.format = PIPE_FORMAT_R16G16B16A16_UINT;
+                                src_templ.format = PIPE_FORMAT_R16G16B16A16_UINT;
+                                break;
+                        case 16:
+                                dst_templ.format = PIPE_FORMAT_R32G32B32A32_UINT;
+                                src_templ.format = PIPE_FORMAT_R32G32B32A32_UINT;
+                                break;
                        default:
                                fprintf(stderr, "Unhandled format %s with blocksize %u\n",
                                        util_format_short_name(src->format), blocksize);