r300g: fix surface_copy for compressed formats
authorMarek Olšák <maraeo@gmail.com>
Sun, 2 May 2010 15:19:03 +0000 (17:19 +0200)
committerMarek Olšák <maraeo@gmail.com>
Sun, 2 May 2010 18:59:47 +0000 (20:59 +0200)
No accelerated blitting for these, it's too messy.

src/gallium/drivers/r300/r300_blit.c

index 928ad300eeea307147f99398f24541f5b6eafda5..819d5e3f0c8633df6ba7f2a201f72560d5f28c37 100644 (file)
@@ -137,7 +137,8 @@ void r300_surface_copy(struct pipe_context* pipe,
     if (!pipe->screen->is_format_supported(pipe->screen,
                                            old_format, src->texture->target,
                                            PIPE_BIND_RENDER_TARGET |
-                                           PIPE_BIND_SAMPLER_VIEW, 0)) {
+                                           PIPE_BIND_SAMPLER_VIEW, 0) &&
+        util_format_description(old_format)->layout == UTIL_FORMAT_LAYOUT_PLAIN) {
         switch (util_format_get_blocksize(old_format)) {
             case 1:
                 new_format = PIPE_FORMAT_I8_UNORM;