summaryrefslogtreecommitdiffstats
path: root/src/amd/addrlib/r800
diff options
context:
space:
mode:
Diffstat (limited to 'src/amd/addrlib/r800')
-rw-r--r--src/amd/addrlib/r800/egbaddrlib.cpp30
-rw-r--r--src/amd/addrlib/r800/siaddrlib.cpp2
2 files changed, 19 insertions, 13 deletions
diff --git a/src/amd/addrlib/r800/egbaddrlib.cpp b/src/amd/addrlib/r800/egbaddrlib.cpp
index 854d5725df2..0c1ddca10a3 100644
--- a/src/amd/addrlib/r800/egbaddrlib.cpp
+++ b/src/amd/addrlib/r800/egbaddrlib.cpp
@@ -4486,19 +4486,25 @@ ADDR_E_RETURNCODE EgBasedAddrLib::HwlComputeSurfaceInfo(
retCode = ADDR_INVALIDPARAMS;
}
- // Returns an index
- pOut->tileIndex = HwlPostCheckTileIndex(pOut->pTileInfo,
- pOut->tileMode,
- pOut->tileType,
- pOut->tileIndex);
-
- if (IsMacroTiled(pOut->tileMode) && (pOut->macroModeIndex == TileIndexInvalid))
+ // In case client uses tile info as input and would like to calculate a correct size and
+ // alignment together with tile info as output when the tile info is not suppose to have any
+ // matching indices in tile mode tables.
+ if (pIn->flags.skipIndicesOutput == FALSE)
{
- pOut->macroModeIndex = HwlComputeMacroModeIndex(pOut->tileIndex,
- pIn->flags,
- pIn->bpp,
- pIn->numSamples,
- pOut->pTileInfo);
+ // Returns an index
+ pOut->tileIndex = HwlPostCheckTileIndex(pOut->pTileInfo,
+ pOut->tileMode,
+ pOut->tileType,
+ pOut->tileIndex);
+
+ if (IsMacroTiled(pOut->tileMode) && (pOut->macroModeIndex == TileIndexInvalid))
+ {
+ pOut->macroModeIndex = HwlComputeMacroModeIndex(pOut->tileIndex,
+ pIn->flags,
+ pIn->bpp,
+ pIn->numSamples,
+ pOut->pTileInfo);
+ }
}
// Resets pTileInfo to NULL if the internal tile info is used
diff --git a/src/amd/addrlib/r800/siaddrlib.cpp b/src/amd/addrlib/r800/siaddrlib.cpp
index 686bb7fc343..4822d77a4c2 100644
--- a/src/amd/addrlib/r800/siaddrlib.cpp
+++ b/src/amd/addrlib/r800/siaddrlib.cpp
@@ -3274,7 +3274,7 @@ VOID SiAddrLib::InitEquationTable()
UINT_32 bpp = 1 << (log2ElementBytes + 3);
// Loop all possible tile index
- for (INT_32 tileIndex = 0; tileIndex < m_noOfEntries; tileIndex++)
+ for (INT_32 tileIndex = 0; tileIndex < static_cast<INT_32>(m_noOfEntries); tileIndex++)
{
UINT_32 equationIndex = ADDR_INVALID_EQUATION_INDEX;