diff --git a/src/gallium/drivers/r600/r600_texture.c b/src/gallium/drivers/r600/r600_texture.c index e9e8b27..9caf478 100644 --- a/src/gallium/drivers/r600/r600_texture.c +++ b/src/gallium/drivers/r600/r600_texture.c @@ -410,25 +410,28 @@ r600_texture_create_object(struct pipe_screen *screen, struct pipe_resource *r600_texture_create(struct pipe_screen *screen, const struct pipe_resource *templ) { - unsigned array_mode = 0; - static int force_tiling = -1; + unsigned array_mode = V_038000_ARRAY_LINEAR_GENERAL; + static int force_2d_tiling = -1; /* Would like some magic "get_bool_option_once" routine. */ - if (force_tiling == -1) { + if (force_2d_tiling == -1) { #if 0 /* reenable when 2D tiling is fixed better */ struct r600_screen *rscreen = (struct r600_screen *)screen; if (r600_get_minor_version(rscreen->radeon) >= 9) - force_tiling = debug_get_bool_option("R600_TILING", TRUE); + force_2d_tiling = debug_get_bool_option("R600_TILING", TRUE); #endif - force_tiling = debug_get_bool_option("R600_TILING", FALSE); + force_2d_tiling = debug_get_bool_option("R600_TILING", FALSE); } - if (force_tiling && permit_hardware_blit(screen, templ)) { + if (permit_hardware_blit(screen, templ)) { if (!(templ->flags & R600_RESOURCE_FLAG_TRANSFER) && !(templ->bind & PIPE_BIND_SCANOUT)) { - array_mode = V_038000_ARRAY_2D_TILED_THIN1; + if (force_2d_tiling) + array_mode = V_038000_ARRAY_2D_TILED_THIN1; + else + array_mode = V_038000_ARRAY_1D_TILED_THIN1; } }