r600g: don't enable tiling for STAGING and STREAM usage cases
authorMarek Olšák <maraeo@gmail.com>
Mon, 5 Mar 2012 13:13:19 +0000 (14:13 +0100)
committerMarek Olšák <maraeo@gmail.com>
Mon, 5 Mar 2012 13:55:46 +0000 (14:55 +0100)
Reviewed by: Christian König <christian.koenig@amd.com>

src/gallium/drivers/r600/r600_texture.c

index 6222410f6c31feed5bef2ddc0129698508db8be1..e55e0d215a4330249b717ca963c978f230d77693 100644 (file)
@@ -623,12 +623,13 @@ struct pipe_resource *r600_texture_create(struct pipe_screen *screen,
        unsigned array_mode = 0;
        int r;
 
-       if (!(templ->flags & R600_RESOURCE_FLAG_TRANSFER) &&
-           !(templ->bind & PIPE_BIND_SCANOUT)) {
-               if (rscreen->use_surface_alloc) {
-                       if (permit_hardware_blit(screen, templ)) {
-                               array_mode = V_038000_ARRAY_2D_TILED_THIN1;
-                       }
+       if (!(templ->flags & R600_RESOURCE_FLAG_TRANSFER)) {
+               if (rscreen->use_surface_alloc &&
+                   !(templ->bind & PIPE_BIND_SCANOUT) &&
+                   templ->usage != PIPE_USAGE_STAGING &&
+                   templ->usage != PIPE_USAGE_STREAM &&
+                   permit_hardware_blit(screen, templ)) {
+                       array_mode = V_038000_ARRAY_2D_TILED_THIN1;
                } else if (util_format_is_compressed(templ->format)) {
                        array_mode = V_038000_ARRAY_1D_TILED_THIN1;
                }