From: Nicolai Hähnle Date: Thu, 29 Nov 2018 17:34:01 +0000 (+0100) Subject: ac/surface: 3D and cube surfaces are never displayable X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0ef263d62f450b5a064b7acd2252a3c7fe6838d0;p=mesa.git ac/surface: 3D and cube surfaces are never displayable Reviewed-by: Marek Olšák --- 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) {