From 0ef263d62f450b5a064b7acd2252a3c7fe6838d0 Mon Sep 17 00:00:00 2001 From: Nicolai Hähnle Date: Thu, 29 Nov 2018 18:34:01 +0100 Subject: ac/surface: 3D and cube surfaces are never displayable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Marek Olšák --- src/amd/common/ac_surface.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/amd/common/ac_surface.c') 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 @@ -1516,10 +1516,12 @@ static int gfx9_compute_surface(ADDR_HANDLE addrlib, /* 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) { -- cgit v1.2.3