From b53856aca31b1a1fde8cd87a6978934cd6ae94b1 Mon Sep 17 00:00:00 2001 From: Bas Nieuwenhuizen Date: Thu, 12 Dec 2019 12:10:58 +0100 Subject: [PATCH] amd/common: Always use addrlib for HTILE tc-compat. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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: --- src/amd/common/ac_surface.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) 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; -- 2.30.2