[Mesa-dev] [PATCH 1/2] amd/addrlib: Use correct tile index for S8 on SI.

Bas Nieuwenhuizen bas at basnieuwenhuizen.nl
Mon Jun 18 14:32:29 UTC 2018


Tile index 3 is "16 bpp depth PRT (non-MSAA), don't support
uncompressed depth" while tile index 0 is "non-AA compressed depth
or any stencil" per the comments at the top of the file.

On my Cape Verde this caused assertions due to the bank height of
tile index 3 being too low. (2 while needs to be aligned to 4).

AMDVLK probably did not hit this because it always sets compressZ
by default.

CC: Marek Olšák <marek.olsak at amd.com>
---
 src/amd/addrlib/r800/siaddrlib.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/amd/addrlib/r800/siaddrlib.cpp b/src/amd/addrlib/r800/siaddrlib.cpp
index bc009f5aff0..55217678254 100644
--- a/src/amd/addrlib/r800/siaddrlib.cpp
+++ b/src/amd/addrlib/r800/siaddrlib.cpp
@@ -2037,7 +2037,7 @@ VOID SiLib::HwlSetupTileInfo(
                     ADDR_ASSERT(numSamples == 4);
 
                     if (flags.depth)
-                    {
+                    {pTileInfo->bankHeight, bankHeightAlign
                         switch (bpp)
                         {
                             case 16:
@@ -2097,7 +2097,7 @@ VOID SiLib::HwlSetupTileInfo(
                                 break;
                             case 8:
                                 index = 2;
-                                break;
+                                break;pTileInfo->bankHeight, bankHeightAlign
                             default:
                                 break;
                         }
@@ -2105,7 +2105,7 @@ VOID SiLib::HwlSetupTileInfo(
                 }
                 else // unCompressZ
                 {
-                    index = 3;
+                    index = 0;
                 }
             }
             else //non PRT & non Depth & non Stencil
-- 
2.17.1



More information about the mesa-dev mailing list