r600g: prevent hardware blitting based on resource usage
authorChristian König <deathsimple@vodafone.de>
Wed, 13 Jul 2011 14:35:19 +0000 (16:35 +0200)
committerChristian König <deathsimple@vodafone.de>
Wed, 13 Jul 2011 14:37:15 +0000 (16:37 +0200)
It doesn't make much sense for STAGING and STREAM resources to be
hardware blitted into VRAM.

src/gallium/drivers/r600/r600_texture.c

index 37e75be6cf2b27bbdc5f417d13c4659ce6024266..10c32c53a6dd66ed2e9c60d39b9e881cc63d0111 100644 (file)
@@ -313,7 +313,14 @@ static boolean permit_hardware_blit(struct pipe_screen *screen,
                                 PIPE_BIND_SAMPLER_VIEW))
                return FALSE;
 
-       return TRUE;
+       switch (res->usage) {
+       case PIPE_USAGE_STREAM:
+       case PIPE_USAGE_STAGING:
+               return FALSE;
+
+       default:
+               return TRUE;
+       }
 }
 
 static boolean r600_texture_get_handle(struct pipe_screen* screen,