ac/surface/gfx9: flags.texture currently refers to TC-compatible HTILE
authorMarek Olšák <marek.olsak@amd.com>
Sat, 8 Jul 2017 18:22:54 +0000 (20:22 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Mon, 17 Jul 2017 14:56:46 +0000 (10:56 -0400)
This should lead to better MSAA performance on GFX9.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/amd/common/ac_surface.c

index 1a43b23d32fa8919b68d32ce209873342273537f..cd3d7b715cfe1268269ffd43d6a4fccbb9927af5 100644 (file)
@@ -961,7 +961,9 @@ static int gfx9_compute_surface(ADDR_HANDLE addrlib,
        AddrSurfInfoIn.flags.color = !(surf->flags & RADEON_SURF_Z_OR_SBUFFER);
        AddrSurfInfoIn.flags.depth = (surf->flags & RADEON_SURF_ZBUFFER) != 0;
        AddrSurfInfoIn.flags.display = (surf->flags & RADEON_SURF_SCANOUT) != 0;
-       AddrSurfInfoIn.flags.texture = 1;
+       /* flags.texture currently refers to TC-compatible HTILE */
+       AddrSurfInfoIn.flags.texture = AddrSurfInfoIn.flags.color ||
+                                      surf->flags & RADEON_SURF_TC_COMPATIBLE_HTILE;
        AddrSurfInfoIn.flags.opt4space = 1;
 
        AddrSurfInfoIn.numMipLevels = config->info.levels;