gallium/radeon: adjust the rule for using the LINEAR_ALIGNED layout
authorMarek Olšák <marek.olsak@amd.com>
Fri, 20 Jan 2017 16:57:38 +0000 (17:57 +0100)
committerMarek Olšák <marek.olsak@amd.com>
Mon, 23 Jan 2017 22:43:38 +0000 (23:43 +0100)
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/gallium/drivers/radeon/r600_texture.c

index cba4e7d734043f9357c7e80744edef158f7d5b28..0b77c82949012e457dd032ca0f1b74b156c3a9ff 100644 (file)
@@ -1184,7 +1184,9 @@ r600_choose_tiling(struct r600_common_screen *rscreen,
                /* Textures with a very small height are recommended to be linear. */
                if (templ->target == PIPE_TEXTURE_1D ||
                    templ->target == PIPE_TEXTURE_1D_ARRAY ||
-                   templ->height0 <= 4)
+                   /* Only very thin and long 2D textures should benefit from
+                    * linear_aligned. */
+                   (templ->width0 > 8 && templ->height0 <= 2))
                        return RADEON_SURF_MODE_LINEAR_ALIGNED;
 
                /* Textures likely to be mapped often. */