From: Bas Nieuwenhuizen Date: Thu, 12 Dec 2019 11:10:58 +0000 (+0100) Subject: amd/common: Always use addrlib for HTILE tc-compat. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b53856aca31b1a1fde8cd87a6978934cd6ae94b1;p=mesa.git amd/common: Always use addrlib for HTILE tc-compat. Even without depth+stencil addrlib can (correctly!) decide to disable tc compatible HTILE. One example is 8x sampling with 32-bit depth on Stoney. The row size on Stoney is 1024, while the tile size is 2048, which results in tile splits which are not supported with tc-compat. On Stoney, this fixes dEQP-VK.glsl.builtin_var.fragdepth.*_list_d32_sfloat_multisample_8 CC: Reviewed-by: Marek Olšák Tested-by: Marge Bot Part-of: --- diff --git a/src/amd/common/ac_surface.c b/src/amd/common/ac_surface.c index 0376f5d79c7..016590fc085 100644 --- a/src/amd/common/ac_surface.c +++ b/src/amd/common/ac_surface.c @@ -779,19 +779,12 @@ static int gfx6_compute_surface(ADDR_HANDLE addrlib, if (level > 0) continue; - /* Check that we actually got a TC-compatible HTILE if - * we requested it (only for level 0, since we're not - * supporting HTILE on higher mip levels anyway). */ - assert(AddrSurfInfoOut.tcCompatible || - !AddrSurfInfoIn.flags.tcCompatible || - AddrSurfInfoIn.flags.matchStencilTileCfg); + if (!AddrSurfInfoOut.tcCompatible) { + AddrSurfInfoIn.flags.tcCompatible = 0; + surf->flags &= ~RADEON_SURF_TC_COMPATIBLE_HTILE; + } if (AddrSurfInfoIn.flags.matchStencilTileCfg) { - if (!AddrSurfInfoOut.tcCompatible) { - AddrSurfInfoIn.flags.tcCompatible = 0; - surf->flags &= ~RADEON_SURF_TC_COMPATIBLE_HTILE; - } - AddrSurfInfoIn.flags.matchStencilTileCfg = 0; AddrSurfInfoIn.tileIndex = AddrSurfInfoOut.tileIndex; stencil_tile_idx = AddrSurfInfoOut.stencilTileIdx;