Squashed commit of the following:
[mesa.git] / src / gallium / drivers / r300 / r300_blit.c
index f99f9dffaa544160ab9dc4678e5d09d762087d36..b99879afdd3095476beb1a041de3b5b0b87746f7 100644 (file)
@@ -137,8 +137,8 @@ void r300_surface_copy(struct pipe_context* pipe,
 
     if (!pipe->screen->is_format_supported(pipe->screen,
                                            old_format, src->texture->target,
-                                           PIPE_TEXTURE_USAGE_RENDER_TARGET |
-                                           PIPE_TEXTURE_USAGE_SAMPLER, 0)) {
+                                           PIPE_BIND_RENDER_TARGET |
+                                           PIPE_BIND_SAMPLER_VIEW, 0)) {
         switch (util_format_get_blocksize(old_format)) {
             case 1:
                 new_format = PIPE_FORMAT_I8_UNORM;
@@ -149,6 +149,9 @@ void r300_surface_copy(struct pipe_context* pipe,
             case 4:
                 new_format = PIPE_FORMAT_B8G8R8A8_UNORM;
                 break;
+            case 8:
+                new_format = PIPE_FORMAT_R16G16B16A16_UNORM;
+                break;
             default:
                 debug_printf("r300: surface_copy: Unhandled format: %s. Falling back to software.\n"
                              "r300: surface_copy: Software fallback doesn't work for tiled textures.\n",