[Mesa-dev] [PATCH 02/10] ac/surface/gfx9: flags.texture currently refers to TC-compatible HTILE

Marek Olšák maraeo at gmail.com
Mon Jul 10 21:21:37 UTC 2017


From: Marek Olšák <marek.olsak at amd.com>

This should lead to better MSAA performance on GFX9.
---
 src/amd/common/ac_surface.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/amd/common/ac_surface.c b/src/amd/common/ac_surface.c
index a4df595..5f38205 100644
--- a/src/amd/common/ac_surface.c
+++ b/src/amd/common/ac_surface.c
@@ -940,21 +940,23 @@ static int gfx9_compute_surface(ADDR_HANDLE addrlib,
 		default:
 			assert(0);
 		}
 	} else {
 		AddrSurfInfoIn.bpp = surf->bpe * 8;
 	}
 
 	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;
 	AddrSurfInfoIn.numSamples = config->info.samples ? config->info.samples : 1;
 	AddrSurfInfoIn.numFrags = AddrSurfInfoIn.numSamples;
 
 	/* GFX9 doesn't support 1D depth textures, so allocate all 1D textures
 	 * as 2D to avoid having shader variants for 1D vs 2D, so all shaders
 	 * must sample 1D textures as 2D. */
 	if (config->is_3d)
-- 
2.7.4



More information about the mesa-dev mailing list