r600g: do not try to use staging resource for depth textures
authorKeith Whitwell <keithw@vmware.com>
Thu, 11 Nov 2010 15:41:49 +0000 (15:41 +0000)
committerKeith Whitwell <keithw@vmware.com>
Thu, 11 Nov 2010 15:43:31 +0000 (15:43 +0000)
Currently r600_resource_copy_region() will turn these copies into
transfers + memcpys, so to avoid recursion we must not turn those
transfers back into blits.

src/gallium/drivers/r600/r600_texture.c

index a590858c85287c7d936c5de457e9915a9c369521..56313e992d87cab0390420c3d1bcc47828fc5135 100644 (file)
@@ -479,6 +479,15 @@ static boolean permit_hardware_blit(struct pipe_screen *screen,
         else
                 bind = PIPE_BIND_RENDER_TARGET;
 
+       /* See r600_resource_copy_region: there is something wrong
+         * with depth resource copies at the moment so avoid them for
+         * now.
+         */
+       if (util_format_get_component_bits(res->format,
+                                           UTIL_FORMAT_COLORSPACE_ZS,
+                                           0) != 0)
+                return FALSE;
+
         if (!screen->is_format_supported(screen,
                                          res->format,
                                          res->target,