}
// Thick modes don't support multisample
- if (ComputeSurfaceThickness(pIn->tileMode) > 1 && pIn->numSamples > 1)
+ if (Thickness(pIn->tileMode) > 1 && pIn->numSamples > 1)
{
returnCode = ADDR_INVALIDPARAMS;
}
}
// No thick MSAA
- if (ComputeSurfaceThickness(pIn->tileMode) > 1)
+ if (Thickness(pIn->tileMode) > 1)
{
returnCode = ADDR_INVALIDPARAMS;
}
/**
***************************************************************************************************
-* AddrLib1::ComputeSurfaceThickness
+* AddrLib1::Thickness
*
* @brief
* Compute surface thickness
* Surface thickness
***************************************************************************************************
*/
-UINT_32 AddrLib1::ComputeSurfaceThickness(
+UINT_32 AddrLib1::Thickness(
AddrTileMode tileMode) ///< [in] tile mode
{
return m_modeFlags[tileMode].thickness;
UINT_32 z1 = _BIT(z, 1);
UINT_32 z2 = _BIT(z, 2);
- UINT_32 thickness = ComputeSurfaceThickness(tileMode);
+ UINT_32 thickness = Thickness(tileMode);
// Compute the pixel number within the micro tile.
UINT_32 sliceAlign ///< [in] number of slice alignment
) const
{
- UINT_32 thickness = ComputeSurfaceThickness(tileMode);
+ UINT_32 thickness = Thickness(tileMode);
ADDR_ASSERT(padDims <= 3);
) const
{
AddrTileMode tileMode = pIn->tileMode;
- UINT_32 thickness = ComputeSurfaceThickness(tileMode);
+ UINT_32 thickness = Thickness(tileMode);
// Optimization can only be done on level 0 and samples <= 1
if ((pIn->flags.opt4Space == TRUE) &&
// Override tilemode
// When tile_width (8) * tile_height (8) * thickness * element_bytes is > row_size,
// it is better to just use THIN mode in this case
- UINT_32 thickness = ComputeSurfaceThickness(tileMode);
+ UINT_32 thickness = Thickness(tileMode);
if (thickness > 1 && m_configFlags.allowLargeThickTile == 0)
{
{
if (bpp > 0)
{
- UINT_32 thickness = ComputeSurfaceThickness(pCfgTable->mode);
+ UINT_32 thickness = Thickness(pCfgTable->mode);
UINT_32 tileBytes1x = BITS_TO_BYTES(bpp * MicroTilePixels * thickness);
// Non-depth entries store a split factor
UINT_32 sampleSplit = m_tileTable[index].info.tileSplitBytes;
// UBTS#404321, we do not need such overriding, as THICK+THICK entries removed from the tile-mode table
if (!m_settings.isBonaire)
{
- UINT_32 thickness = ComputeSurfaceThickness(tileMode);
+ UINT_32 thickness = Thickness(tileMode);
// tile_thickness = (array_mode == XTHICK) ? 8 : ((array_mode == THICK) ? 4 : 1)
if (thickness > 1)
ADDR_COMPUTE_SURFACE_INFO_OUTPUT* pOut ///< [out] Output
) const
{
- UINT_32 thickness = ComputeSurfaceThickness(tileMode);
+ UINT_32 thickness = Thickness(tileMode);
ADDR_TILEINFO* pTileInfo = pTileInfoOut;
INT index = TileIndexInvalid;
INT macroModeIndex = TileIndexInvalid;
AddrTileMode tileMode = m_tileTable[tileIndex].mode;
AddrTileType tileType = m_tileTable[tileIndex].type;
- UINT_32 thickness = ComputeSurfaceThickness(tileMode);
+ UINT_32 thickness = Thickness(tileMode);
if (!IsMacroTiled(tileMode))
{
//
// Compute the micro tile thickness.
//
- microTileThickness = ComputeSurfaceThickness(expTileMode);
+ microTileThickness = Thickness(expTileMode);
//
// Extra override for mip levels
//
// Compute the micro tile thickness.
//
- microTileThickness = ComputeSurfaceThickness(expTileMode);
+ microTileThickness = Thickness(expTileMode);
//
// Find the correct tiling mode for mip levels
}
else
{
- if (microTileThickness != ComputeSurfaceThickness(expTileMode))
+ if (microTileThickness != Thickness(expTileMode))
{
//
// Re-compute if thickness changed since bank-height may be changed!
UINT_32 bankHeightAlign;
UINT_32 macroAspectAlign;
- UINT_32 thickness = ComputeSurfaceThickness(tileMode);
+ UINT_32 thickness = Thickness(tileMode);
UINT_32 pipes = HwlGetPipes(pTileInfo);
//
UINT_32 bytesPerTile;
AddrTileMode expTileMode = baseTileMode;
- UINT_32 microTileThickness = ComputeSurfaceThickness(expTileMode);
+ UINT_32 microTileThickness = Thickness(expTileMode);
UINT_32 interleaveSize = m_pipeInterleaveBytes * m_bankInterleave;
//
UINT_32* pBytesPerTile ///< [in/out] pointer to bytes per slice
) const
{
- ADDR_ASSERT(numSlices < ComputeSurfaceThickness(baseTileMode));
+ ADDR_ASSERT(numSlices < Thickness(baseTileMode));
// if pBytesPerTile is NULL, this is a don't-care....
UINT_32 bytesPerTile = pBytesPerTile != NULL ? *pBytesPerTile : 64;
/// mipmap chain must have the same tileType, so please fill tileType correctly
if (IsLinear(pIn->tileMode) == FALSE)
{
- if (bpp >= 128 || ComputeSurfaceThickness(tileMode) > 1)
+ if (bpp >= 128 || Thickness(tileMode) > 1)
{
ADDR_ASSERT(microTileType != ADDR_DISPLAYABLE);
}
UINT_32 tileIndex;
UINT_32 tileOffset;
- UINT_32 microTileThickness = ComputeSurfaceThickness(tileMode);
+ UINT_32 microTileThickness = Thickness(tileMode);
//
// Compute the number of group, pipe, and bank bits.
UINT_32 pixelIndex;
UINT_32 pixelOffset;
- UINT_32 microTileThickness = ComputeSurfaceThickness(tileMode);
+ UINT_32 microTileThickness = Thickness(tileMode);
//
// Compute the micro tile size.
UINT_32 x = 0;
UINT_32 y = 0;
UINT_32 z = 0;
- UINT_32 thickness = ComputeSurfaceThickness(tileMode);
+ UINT_32 thickness = Thickness(tileMode);
// For planar surface, we adjust offset acoording to tile base
if ((bpp != compBits) && (compBits != 0) && isDepthSampleOrder)
/// mipmap chain must have the same tileType, so please fill tileType correctly
if (IsLinear(pIn->tileMode) == FALSE)
{
- if (bpp >= 128 || ComputeSurfaceThickness(tileMode) > 1)
+ if (bpp >= 128 || Thickness(tileMode) > 1)
{
ADDR_ASSERT(microTileType != ADDR_DISPLAYABLE);
}
(((addrBits / groupBits / pipes) % bankInterleave) * groupBits) +
(((addrBits / groupBits / pipes) / bankInterleave) / banks) * groupBits * bankInterleave;
- UINT_32 microTileThickness = ComputeSurfaceThickness(tileMode);
+ UINT_32 microTileThickness = Thickness(tileMode);
UINT_32 microTileBits = bpp * microTileThickness * MicroTilePixels * numSamples;
break;
}
- UINT_32 microTileThickness = ComputeSurfaceThickness(tileMode);
+ UINT_32 microTileThickness = Thickness(tileMode);
bank ^= tileSplitRotation * tileSlices;
if (pipeRotation == 0)
if (IsMacroTiled(tileMode)) // Swizzle only for macro tile mode
{
- UINT_32 firstSlice = slice / ComputeSurfaceThickness(tileMode);
+ UINT_32 firstSlice = slice / Thickness(tileMode);
UINT_32 numPipes = HwlGetPipes(pTileInfo);
UINT_32 numBanks = pTileInfo->banks;
//
// Compute bank rotation for the slice.
//
- UINT_32 microTileThickness = ComputeSurfaceThickness(tileMode);
+ UINT_32 microTileThickness = Thickness(tileMode);
switch (tileMode)
{
UINT_64 addr = 0;
ADDR_ASSERT(numSamples > 1);
- ADDR_ASSERT(ComputeSurfaceThickness(tileMode) == 1);
+ ADDR_ASSERT(Thickness(tileMode) == 1);
switch (tileMode)
{
{
UINT_32 pitchAlign;
- UINT_32 microTileThickness = ComputeSurfaceThickness(tileMode);
+ UINT_32 microTileThickness = Thickness(tileMode);
UINT_32 pixelsPerMicroTile;
UINT_32 pixelsPerPipeInterleave;