summaryrefslogtreecommitdiffstats
path: root/src/amd/addrlib/r800
diff options
context:
space:
mode:
authorRoy Zhan <[email protected]>2015-06-09 04:46:59 -0400
committerMarek Olšák <[email protected]>2017-03-30 14:44:33 +0200
commit554c1b9f2dcbfdcd82bfeb352b103d1af9edc455 (patch)
tree0c8f6fe49de3766aab39eb1aa50a5e97d7809d04 /src/amd/addrlib/r800
parent120a5d0e42ce7b9fc935a959d3faf10e79c4720e (diff)
amdgpu/addrlib: Disable tcComaptible when depth surface is not macro tiled
Experiment show 1D tiling + TcCompatible cannot work together.
Diffstat (limited to 'src/amd/addrlib/r800')
-rw-r--r--src/amd/addrlib/r800/ciaddrlib.cpp37
1 files changed, 20 insertions, 17 deletions
diff --git a/src/amd/addrlib/r800/ciaddrlib.cpp b/src/amd/addrlib/r800/ciaddrlib.cpp
index 3322d952165..f88741e84d1 100644
--- a/src/amd/addrlib/r800/ciaddrlib.cpp
+++ b/src/amd/addrlib/r800/ciaddrlib.cpp
@@ -1317,30 +1317,33 @@ VOID CiAddrLib::HwlSetupTileInfo(
*pTileInfo = m_tileTable[8].info;
}
- // Turn off tcCompatible for color surface if tileSplit happens. Depth/stencil is
- // handled at tileIndex selecting time.
- if (pOut->tcCompatible && (inTileType != ADDR_DEPTH_SAMPLE_ORDER))
+ if (pOut->tcCompatible)
{
if (IsMacroTiled(tileMode))
{
- INT_32 tileIndex = pOut->tileIndex;
-
- if ((tileIndex == TileIndexInvalid) && (IsTileInfoAllZero(pTileInfo) == FALSE))
+ if (inTileType != ADDR_DEPTH_SAMPLE_ORDER)
{
- tileIndex = HwlPostCheckTileIndex(pTileInfo, tileMode, inTileType, tileIndex);
- }
+ // Turn off tcCompatible for color surface if tileSplit happens. Depth/stencil
+ // tileSplit case was handled at tileIndex selecting time.
+ INT_32 tileIndex = pOut->tileIndex;
- if (tileIndex != TileIndexInvalid)
- {
- ADDR_ASSERT(static_cast<UINT_32>(tileIndex) < TileTableSize);
- // Non-depth entries store a split factor
- UINT_32 sampleSplit = m_tileTable[tileIndex].info.tileSplitBytes;
- UINT_32 tileBytes1x = BITS_TO_BYTES(bpp * MicroTilePixels * thickness);
- UINT_32 colorTileSplit = Max(256u, sampleSplit * tileBytes1x);
+ if ((tileIndex == TileIndexInvalid) && (IsTileInfoAllZero(pTileInfo) == FALSE))
+ {
+ tileIndex = HwlPostCheckTileIndex(pTileInfo, tileMode, inTileType, tileIndex);
+ }
- if (m_rowSize < colorTileSplit)
+ if (tileIndex != TileIndexInvalid)
{
- pOut->tcCompatible = FALSE;
+ ADDR_ASSERT(static_cast<UINT_32>(tileIndex) < TileTableSize);
+ // Non-depth entries store a split factor
+ UINT_32 sampleSplit = m_tileTable[tileIndex].info.tileSplitBytes;
+ UINT_32 tileBytes1x = BITS_TO_BYTES(bpp * MicroTilePixels * thickness);
+ UINT_32 colorTileSplit = Max(256u, sampleSplit * tileBytes1x);
+
+ if (m_rowSize < colorTileSplit)
+ {
+ pOut->tcCompatible = FALSE;
+ }
}
}
}