From 90594002474fa2118555d1a08d67c1fee8f2c24c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Fri, 28 Jul 2017 23:05:38 +0200 Subject: [PATCH] ac/surface: compute tile swizzle only when it's allowed MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reviewed-by: Dave Airlie Reviewed-by: Nicolai Hähnle --- src/amd/common/ac_surface.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/amd/common/ac_surface.c b/src/amd/common/ac_surface.c index 4647ce46c59..61b4e41a3ba 100644 --- a/src/amd/common/ac_surface.c +++ b/src/amd/common/ac_surface.c @@ -705,8 +705,10 @@ static int gfx6_compute_surface(ADDR_HANDLE addrlib, surf->is_linear = surf->u.legacy.level[0].mode == RADEON_SURF_MODE_LINEAR_ALIGNED; - /* workout base swizzle */ - if (!(surf->flags & RADEON_SURF_Z_OR_SBUFFER)) { + /* Work out tile swizzle. */ + if (surf->u.legacy.level[0].mode == RADEON_SURF_MODE_2D && + !(surf->flags & (RADEON_SURF_Z_OR_SBUFFER | RADEON_SURF_SHAREABLE)) && + (config->info.samples > 1 || !(surf->flags & RADEON_SURF_SCANOUT))) { ADDR_COMPUTE_BASE_SWIZZLE_INPUT AddrBaseSwizzleIn = {0}; ADDR_COMPUTE_BASE_SWIZZLE_OUTPUT AddrBaseSwizzleOut = {0}; -- 2.30.2