diff options
author | Marek Olšák <[email protected]> | 2017-07-28 23:05:38 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-08-04 02:10:04 +0200 |
commit | 90594002474fa2118555d1a08d67c1fee8f2c24c (patch) | |
tree | e1b3633938f6d9ae07e683c7c32c9183e02bcb97 /src/amd/common/ac_surface.c | |
parent | 4e757d591db8d7e5038be0d22c5de1efa61cb724 (diff) |
ac/surface: compute tile swizzle only when it's allowed
Reviewed-by: Dave Airlie <[email protected]>
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/amd/common/ac_surface.c')
-rw-r--r-- | src/amd/common/ac_surface.c | 6 |
1 files 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}; |