From: Marek Olšák Date: Fri, 28 Jul 2017 21:05:38 +0000 (+0200) Subject: ac/surface: compute tile swizzle only when it's allowed X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=90594002474fa2118555d1a08d67c1fee8f2c24c;p=mesa.git ac/surface: compute tile swizzle only when it's allowed Reviewed-by: Dave Airlie Reviewed-by: Nicolai Hähnle --- 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};