[Mesa-dev] [PATCH 08/25] ac/surface: 3D and cube surfaces are never displayable

Nicolai Hähnle nhaehnle at gmail.com
Thu Dec 6 14:00:29 UTC 2018


From: Nicolai Hähnle <nicolai.haehnle at amd.com>

---
 src/amd/common/ac_surface.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/amd/common/ac_surface.c b/src/amd/common/ac_surface.c
index d8d927ee1c5..aeba5e161c9 100644
--- a/src/amd/common/ac_surface.c
+++ b/src/amd/common/ac_surface.c
@@ -1509,24 +1509,26 @@ static int gfx9_compute_surface(ADDR_HANDLE addrlib,
 		r = gfx9_compute_miptree(addrlib, config, surf, compressed,
 					 &AddrSurfInfoIn);
 		if (r)
 			return r;
 	}
 
 	surf->is_linear = surf->u.gfx9.surf.swizzle_mode == ADDR_SW_LINEAR;
 
 	/* Query whether the surface is displayable. */
 	bool displayable = false;
-	r = Addr2IsValidDisplaySwizzleMode(addrlib, surf->u.gfx9.surf.swizzle_mode,
+	if (!config->is_3d && !config->is_cube) {
+		r = Addr2IsValidDisplaySwizzleMode(addrlib, surf->u.gfx9.surf.swizzle_mode,
 					   surf->bpe * 8, &displayable);
-	if (r)
-		return r;
+		if (r)
+			return r;
+	}
 	surf->is_displayable = displayable;
 
 	switch (surf->u.gfx9.surf.swizzle_mode) {
 		/* S = standard. */
 		case ADDR_SW_256B_S:
 		case ADDR_SW_4KB_S:
 		case ADDR_SW_64KB_S:
 		case ADDR_SW_VAR_S:
 		case ADDR_SW_64KB_S_T:
 		case ADDR_SW_4KB_S_X:
-- 
2.19.1



More information about the mesa-dev mailing list