diff options
Diffstat (limited to 'src/amd/addrlib/r800')
-rw-r--r-- | src/amd/addrlib/r800/ciaddrlib.cpp | 205 | ||||
-rw-r--r-- | src/amd/addrlib/r800/ciaddrlib.h | 28 | ||||
-rw-r--r-- | src/amd/addrlib/r800/egbaddrlib.cpp | 261 | ||||
-rw-r--r-- | src/amd/addrlib/r800/egbaddrlib.h | 16 | ||||
-rw-r--r-- | src/amd/addrlib/r800/siaddrlib.cpp | 245 | ||||
-rw-r--r-- | src/amd/addrlib/r800/siaddrlib.h | 40 |
6 files changed, 418 insertions, 377 deletions
diff --git a/src/amd/addrlib/r800/ciaddrlib.cpp b/src/amd/addrlib/r800/ciaddrlib.cpp index ebaf3e5623b..839a26833a6 100644 --- a/src/amd/addrlib/r800/ciaddrlib.cpp +++ b/src/amd/addrlib/r800/ciaddrlib.cpp @@ -27,7 +27,7 @@ /** **************************************************************************************************** * @file ciaddrlib.cpp -* @brief Contains the implementation for the CiAddrLib class. +* @brief Contains the implementation for the CiLib class. **************************************************************************************************** */ @@ -48,9 +48,31 @@ /////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////// +namespace Addr +{ + +/** +**************************************************************************************************** +* CiHwlInit +* +* @brief +* Creates an CiLib object. +* +* @return +* Returns an CiLib object pointer. +**************************************************************************************************** +*/ +Lib* CiHwlInit(const Client* pClient) +{ + return V1::CiLib::CreateObj(pClient); +} + +namespace V1 +{ + /** **************************************************************************************************** -* AddrMask +* Mask * * @brief * Gets a mask of "width" @@ -58,7 +80,7 @@ * Bit mask **************************************************************************************************** */ -static UINT_64 AddrMask( +static UINT_64 Mask( UINT_32 width) ///< Width of bits { UINT_64 ret; @@ -76,7 +98,7 @@ static UINT_64 AddrMask( /** **************************************************************************************************** -* AddrGetBits +* GetBits * * @brief * Gets bits within a range of [msb, lsb] @@ -84,7 +106,7 @@ static UINT_64 AddrMask( * Bits of this range **************************************************************************************************** */ -static UINT_64 AddrGetBits( +static UINT_64 GetBits( UINT_64 bits, ///< Source bits UINT_32 msb, ///< Most signicant bit UINT_32 lsb) ///< Least signicant bit @@ -93,14 +115,14 @@ static UINT_64 AddrGetBits( if (msb >= lsb) { - ret = (bits >> lsb) & (AddrMask(1 + msb - lsb)); + ret = (bits >> lsb) & (Mask(1 + msb - lsb)); } return ret; } /** **************************************************************************************************** -* AddrRemoveBits +* RemoveBits * * @brief * Removes bits within the range of [msb, lsb] @@ -108,7 +130,7 @@ static UINT_64 AddrGetBits( * Modified bits **************************************************************************************************** */ -static UINT_64 AddrRemoveBits( +static UINT_64 RemoveBits( UINT_64 bits, ///< Source bits UINT_32 msb, ///< Most signicant bit UINT_32 lsb) ///< Least signicant bit @@ -117,15 +139,15 @@ static UINT_64 AddrRemoveBits( if (msb >= lsb) { - ret = AddrGetBits(bits, lsb - 1, 0) // low bits - | (AddrGetBits(bits, 8 * sizeof(bits) - 1, msb + 1) << lsb); //high bits + ret = GetBits(bits, lsb - 1, 0) // low bits + | (GetBits(bits, 8 * sizeof(bits) - 1, msb + 1) << lsb); //high bits } return ret; } /** **************************************************************************************************** -* AddrInsertBits +* InsertBits * * @brief * Inserts new bits into the range of [msb, lsb] @@ -133,7 +155,7 @@ static UINT_64 AddrRemoveBits( * Modified bits **************************************************************************************************** */ -static UINT_64 AddrInsertBits( +static UINT_64 InsertBits( UINT_64 bits, ///< Source bits UINT_64 newBits, ///< New bits to be inserted UINT_32 msb, ///< Most signicant bit @@ -143,41 +165,25 @@ static UINT_64 AddrInsertBits( if (msb >= lsb) { - ret = AddrGetBits(bits, lsb - 1, 0) // old low bitss - | (AddrGetBits(newBits, msb - lsb, 0) << lsb) //new bits - | (AddrGetBits(bits, 8 * sizeof(bits) - 1, lsb) << (msb + 1)); //old high bits + ret = GetBits(bits, lsb - 1, 0) // old low bitss + | (GetBits(newBits, msb - lsb, 0) << lsb) //new bits + | (GetBits(bits, 8 * sizeof(bits) - 1, lsb) << (msb + 1)); //old high bits } return ret; } - -/** -**************************************************************************************************** -* AddrCiHwlInit -* -* @brief -* Creates an CiAddrLib object. -* -* @return -* Returns an CiAddrLib object pointer. -**************************************************************************************************** -*/ -AddrLib* AddrCIHwlInit(const AddrClient* pClient) -{ - return CiAddrLib::CreateObj(pClient); -} - /** **************************************************************************************************** -* CiAddrLib::CiAddrLib +* CiLib::CiLib * * @brief * Constructor * **************************************************************************************************** */ -CiAddrLib::CiAddrLib(const AddrClient* pClient) : - SiAddrLib(pClient), +CiLib::CiLib(const Client* pClient) + : + SiLib(pClient), m_noOfMacroEntries(0), m_allowNonDispThickModes(FALSE) { @@ -187,19 +193,19 @@ CiAddrLib::CiAddrLib(const AddrClient* pClient) : /** **************************************************************************************************** -* CiAddrLib::~CiAddrLib +* CiLib::~CiLib * * @brief * Destructor **************************************************************************************************** */ -CiAddrLib::~CiAddrLib() +CiLib::~CiLib() { } /** **************************************************************************************************** -* CiAddrLib::HwlComputeDccInfo +* CiLib::HwlComputeDccInfo * * @brief * Compute DCC key size, base alignment @@ -207,7 +213,7 @@ CiAddrLib::~CiAddrLib() * ADDR_E_RETURNCODE **************************************************************************************************** */ -ADDR_E_RETURNCODE CiAddrLib::HwlComputeDccInfo( +ADDR_E_RETURNCODE CiLib::HwlComputeDccInfo( const ADDR_COMPUTE_DCCINFO_INPUT* pIn, ADDR_COMPUTE_DCCINFO_OUTPUT* pOut) const { @@ -281,7 +287,7 @@ ADDR_E_RETURNCODE CiAddrLib::HwlComputeDccInfo( /** **************************************************************************************************** -* CiAddrLib::HwlComputeCmaskAddrFromCoord +* CiLib::HwlComputeCmaskAddrFromCoord * * @brief * Compute tc compatible Cmask address from fmask ram address @@ -290,7 +296,7 @@ ADDR_E_RETURNCODE CiAddrLib::HwlComputeDccInfo( * ADDR_E_RETURNCODE **************************************************************************************************** */ -ADDR_E_RETURNCODE CiAddrLib::HwlComputeCmaskAddrFromCoord( +ADDR_E_RETURNCODE CiLib::HwlComputeCmaskAddrFromCoord( const ADDR_COMPUTE_CMASK_ADDRFROMCOORD_INPUT* pIn, ///< [in] fmask addr/bpp/tile input ADDR_COMPUTE_CMASK_ADDRFROMCOORD_OUTPUT* pOut ///< [out] cmask address ) const @@ -325,7 +331,7 @@ ADDR_E_RETURNCODE CiAddrLib::HwlComputeCmaskAddrFromCoord( /** **************************************************************************************************** -* CiAddrLib::HwlComputeHtileAddrFromCoord +* CiLib::HwlComputeHtileAddrFromCoord * * @brief * Compute tc compatible Htile address from depth/stencil address @@ -334,7 +340,7 @@ ADDR_E_RETURNCODE CiAddrLib::HwlComputeCmaskAddrFromCoord( * ADDR_E_RETURNCODE **************************************************************************************************** */ -ADDR_E_RETURNCODE CiAddrLib::HwlComputeHtileAddrFromCoord( +ADDR_E_RETURNCODE CiLib::HwlComputeHtileAddrFromCoord( const ADDR_COMPUTE_HTILE_ADDRFROMCOORD_INPUT* pIn, ///< [in] depth/stencil addr/bpp/tile input ADDR_COMPUTE_HTILE_ADDRFROMCOORD_OUTPUT* pOut ///< [out] htile address ) const @@ -369,19 +375,19 @@ ADDR_E_RETURNCODE CiAddrLib::HwlComputeHtileAddrFromCoord( /** **************************************************************************************************** -* CiAddrLib::HwlConvertChipFamily +* CiLib::HwlConvertChipFamily * * @brief -* Convert familyID defined in atiid.h to AddrChipFamily and set m_chipFamily/m_chipRevision +* Convert familyID defined in atiid.h to ChipFamily and set m_chipFamily/m_chipRevision * @return -* AddrChipFamily +* ChipFamily **************************************************************************************************** */ -AddrChipFamily CiAddrLib::HwlConvertChipFamily( +ChipFamily CiLib::HwlConvertChipFamily( UINT_32 uChipFamily, ///< [in] chip family defined in atiih.h UINT_32 uChipRevision) ///< [in] chip revision defined in "asic_family"_id.h { - AddrChipFamily family = ADDR_CHIP_FAMILY_CI; + ChipFamily family = ADDR_CHIP_FAMILY_CI; switch (uChipFamily) { @@ -419,7 +425,7 @@ AddrChipFamily CiAddrLib::HwlConvertChipFamily( /** **************************************************************************************************** -* CiAddrLib::HwlInitGlobalParams +* CiLib::HwlInitGlobalParams * * @brief * Initializes global parameters @@ -429,7 +435,7 @@ AddrChipFamily CiAddrLib::HwlConvertChipFamily( * **************************************************************************************************** */ -BOOL_32 CiAddrLib::HwlInitGlobalParams( +BOOL_32 CiLib::HwlInitGlobalParams( const ADDR_CREATE_INPUT* pCreateIn) ///< [in] create input { BOOL_32 valid = TRUE; @@ -492,7 +498,7 @@ BOOL_32 CiAddrLib::HwlInitGlobalParams( /** **************************************************************************************************** -* CiAddrLib::HwlPostCheckTileIndex +* CiLib::HwlPostCheckTileIndex * * @brief * Map a tile setting to index if curIndex is invalid, otherwise check if curIndex matches @@ -501,7 +507,7 @@ BOOL_32 CiAddrLib::HwlInitGlobalParams( * Tile index. **************************************************************************************************** */ -INT_32 CiAddrLib::HwlPostCheckTileIndex( +INT_32 CiLib::HwlPostCheckTileIndex( const ADDR_TILEINFO* pInfo, ///< [in] Tile Info AddrTileMode mode, ///< [in] Tile mode AddrTileType type, ///< [in] Tile type @@ -583,7 +589,7 @@ INT_32 CiAddrLib::HwlPostCheckTileIndex( /** **************************************************************************************************** -* CiAddrLib::HwlSetupTileCfg +* CiLib::HwlSetupTileCfg * * @brief * Map tile index to tile setting. @@ -591,7 +597,7 @@ INT_32 CiAddrLib::HwlPostCheckTileIndex( * ADDR_E_RETURNCODE **************************************************************************************************** */ -ADDR_E_RETURNCODE CiAddrLib::HwlSetupTileCfg( +ADDR_E_RETURNCODE CiLib::HwlSetupTileCfg( UINT_32 bpp, ///< [in] Bits per pixel INT_32 index, ///< [in] Tile index INT_32 macroModeIndex, ///< [in] Index in macro tile mode table(CI) @@ -620,7 +626,7 @@ ADDR_E_RETURNCODE CiAddrLib::HwlSetupTileCfg( } else { - const AddrTileConfig* pCfgTable = GetTileSetting(index); + const TileConfig* pCfgTable = GetTileSetting(index); if (pInfo != NULL) { @@ -682,15 +688,15 @@ ADDR_E_RETURNCODE CiAddrLib::HwlSetupTileCfg( /** **************************************************************************************************** -* CiAddrLib::HwlComputeSurfaceInfo +* CiLib::HwlComputeSurfaceInfo * * @brief -* Entry of ci's ComputeSurfaceInfo +* Entry of CI's ComputeSurfaceInfo * @return * ADDR_E_RETURNCODE **************************************************************************************************** */ -ADDR_E_RETURNCODE CiAddrLib::HwlComputeSurfaceInfo( +ADDR_E_RETURNCODE CiLib::HwlComputeSurfaceInfo( const ADDR_COMPUTE_SURFACE_INFO_INPUT* pIn, ///< [in] input structure ADDR_COMPUTE_SURFACE_INFO_OUTPUT* pOut ///< [out] output structure ) const @@ -704,7 +710,7 @@ ADDR_E_RETURNCODE CiAddrLib::HwlComputeSurfaceInfo( // Pass tcCompatible flag from input to output; and turn off it if tile split occurs pOut->tcCompatible = pIn->flags.tcCompatible; - ADDR_E_RETURNCODE retCode = SiAddrLib::HwlComputeSurfaceInfo(pIn,pOut); + ADDR_E_RETURNCODE retCode = SiLib::HwlComputeSurfaceInfo(pIn,pOut); if (pOut->macroModeIndex == TileIndexNoMacroIndex) { @@ -716,14 +722,14 @@ ADDR_E_RETURNCODE CiAddrLib::HwlComputeSurfaceInfo( /** **************************************************************************************************** -* CiAddrLib::HwlFmaskSurfaceInfo +* CiLib::HwlFmaskSurfaceInfo * @brief * Entry of r800's ComputeFmaskInfo * @return * ADDR_E_RETURNCODE **************************************************************************************************** */ -ADDR_E_RETURNCODE CiAddrLib::HwlComputeFmaskInfo( +ADDR_E_RETURNCODE CiLib::HwlComputeFmaskInfo( const ADDR_COMPUTE_FMASK_INFO_INPUT* pIn, ///< [in] input structure ADDR_COMPUTE_FMASK_INFO_OUTPUT* pOut ///< [out] output structure ) @@ -803,7 +809,7 @@ ADDR_E_RETURNCODE CiAddrLib::HwlComputeFmaskInfo( /** **************************************************************************************************** -* CiAddrLib::HwlFmaskPreThunkSurfInfo +* CiLib::HwlFmaskPreThunkSurfInfo * * @brief * Some preparation before thunking a ComputeSurfaceInfo call for Fmask @@ -811,7 +817,7 @@ ADDR_E_RETURNCODE CiAddrLib::HwlComputeFmaskInfo( * ADDR_E_RETURNCODE **************************************************************************************************** */ -VOID CiAddrLib::HwlFmaskPreThunkSurfInfo( +VOID CiLib::HwlFmaskPreThunkSurfInfo( const ADDR_COMPUTE_FMASK_INFO_INPUT* pFmaskIn, ///< [in] Input of fmask info const ADDR_COMPUTE_FMASK_INFO_OUTPUT* pFmaskOut, ///< [in] Output of fmask info ADDR_COMPUTE_SURFACE_INFO_INPUT* pSurfIn, ///< [out] Input of thunked surface info @@ -824,7 +830,7 @@ VOID CiAddrLib::HwlFmaskPreThunkSurfInfo( /** **************************************************************************************************** -* CiAddrLib::HwlFmaskPostThunkSurfInfo +* CiLib::HwlFmaskPostThunkSurfInfo * * @brief * Copy hwl extra field after calling thunked ComputeSurfaceInfo @@ -832,7 +838,7 @@ VOID CiAddrLib::HwlFmaskPreThunkSurfInfo( * ADDR_E_RETURNCODE **************************************************************************************************** */ -VOID CiAddrLib::HwlFmaskPostThunkSurfInfo( +VOID CiLib::HwlFmaskPostThunkSurfInfo( const ADDR_COMPUTE_SURFACE_INFO_OUTPUT* pSurfOut, ///< [in] Output of surface info ADDR_COMPUTE_FMASK_INFO_OUTPUT* pFmaskOut ///< [out] Output of fmask info ) const @@ -843,7 +849,7 @@ VOID CiAddrLib::HwlFmaskPostThunkSurfInfo( /** **************************************************************************************************** -* CiAddrLib::HwlDegradeThickTileMode +* CiLib::HwlDegradeThickTileMode * * @brief * Degrades valid tile mode for thick modes if needed @@ -852,7 +858,7 @@ VOID CiAddrLib::HwlFmaskPostThunkSurfInfo( * Suitable tile mode **************************************************************************************************** */ -AddrTileMode CiAddrLib::HwlDegradeThickTileMode( +AddrTileMode CiLib::HwlDegradeThickTileMode( AddrTileMode baseTileMode, ///< [in] base tile mode UINT_32 numSlices, ///< [in] current number of slices UINT_32* pBytesPerTile ///< [in/out] pointer to bytes per slice @@ -863,7 +869,7 @@ AddrTileMode CiAddrLib::HwlDegradeThickTileMode( /** **************************************************************************************************** -* CiAddrLib::HwlOverrideTileMode +* CiLib::HwlOverrideTileMode * * @brief * Override THICK to THIN, for specific formats on CI @@ -873,7 +879,7 @@ AddrTileMode CiAddrLib::HwlDegradeThickTileMode( * **************************************************************************************************** */ -VOID CiAddrLib::HwlOverrideTileMode( +VOID CiLib::HwlOverrideTileMode( ADDR_COMPUTE_SURFACE_INFO_INPUT* pInOut ///< [in/out] input output structure ) const { @@ -1024,7 +1030,7 @@ VOID CiAddrLib::HwlOverrideTileMode( /** **************************************************************************************************** -* CiAddrLib::HwlSelectTileMode +* CiLib::HwlSelectTileMode * * @brief * Select tile modes. @@ -1034,7 +1040,7 @@ VOID CiAddrLib::HwlOverrideTileMode( * **************************************************************************************************** */ -VOID CiAddrLib::HwlSelectTileMode( +VOID CiLib::HwlSelectTileMode( ADDR_COMPUTE_SURFACE_INFO_INPUT* pInOut ///< [in/out] input output structure ) const { @@ -1120,13 +1126,13 @@ VOID CiAddrLib::HwlSelectTileMode( /** **************************************************************************************************** -* CiAddrLib::HwlSetupTileInfo +* CiLib::HwlSetupTileInfo * * @brief * Setup default value of tile info for SI **************************************************************************************************** */ -VOID CiAddrLib::HwlSetupTileInfo( +VOID CiLib::HwlSetupTileInfo( AddrTileMode tileMode, ///< [in] Tile mode ADDR_SURFACE_FLAGS flags, ///< [in] Surface type flags UINT_32 bpp, ///< [in] Bits per pixel @@ -1453,7 +1459,7 @@ VOID CiAddrLib::HwlSetupTileInfo( /** **************************************************************************************************** -* CiAddrLib::ReadGbTileMode +* CiLib::ReadGbTileMode * * @brief * Convert GB_TILE_MODE HW value to ADDR_TILE_CONFIG. @@ -1461,9 +1467,9 @@ VOID CiAddrLib::HwlSetupTileInfo( * NA. **************************************************************************************************** */ -VOID CiAddrLib::ReadGbTileMode( - UINT_32 regValue, ///< [in] GB_TILE_MODE register - AddrTileConfig* pCfg ///< [out] output structure +VOID CiLib::ReadGbTileMode( + UINT_32 regValue, ///< [in] GB_TILE_MODE register + TileConfig* pCfg ///< [out] output structure ) const { GB_TILE_MODE gbTileMode; @@ -1529,7 +1535,7 @@ VOID CiAddrLib::ReadGbTileMode( /** **************************************************************************************************** -* CiAddrLib::InitTileSettingTable +* CiLib::InitTileSettingTable * * @brief * Initialize the ADDR_TILE_CONFIG table. @@ -1537,7 +1543,7 @@ VOID CiAddrLib::ReadGbTileMode( * TRUE if tile table is correctly initialized **************************************************************************************************** */ -BOOL_32 CiAddrLib::InitTileSettingTable( +BOOL_32 CiLib::InitTileSettingTable( const UINT_32* pCfg, ///< [in] Pointer to table of tile configs UINT_32 noOfEntries ///< [in] Numbe of entries in the table above ) @@ -1598,7 +1604,7 @@ BOOL_32 CiAddrLib::InitTileSettingTable( /** **************************************************************************************************** -* CiAddrLib::ReadGbMacroTileCfg +* CiLib::ReadGbMacroTileCfg * * @brief * Convert GB_MACRO_TILE_CFG HW value to ADDR_TILE_CONFIG. @@ -1606,7 +1612,7 @@ BOOL_32 CiAddrLib::InitTileSettingTable( * NA. **************************************************************************************************** */ -VOID CiAddrLib::ReadGbMacroTileCfg( +VOID CiLib::ReadGbMacroTileCfg( UINT_32 regValue, ///< [in] GB_MACRO_TILE_MODE register ADDR_TILEINFO* pCfg ///< [out] output structure ) const @@ -1622,7 +1628,7 @@ VOID CiAddrLib::ReadGbMacroTileCfg( /** **************************************************************************************************** -* CiAddrLib::InitMacroTileCfgTable +* CiLib::InitMacroTileCfgTable * * @brief * Initialize the ADDR_MACRO_TILE_CONFIG table. @@ -1630,7 +1636,7 @@ VOID CiAddrLib::ReadGbMacroTileCfg( * TRUE if macro tile table is correctly initialized **************************************************************************************************** */ -BOOL_32 CiAddrLib::InitMacroTileCfgTable( +BOOL_32 CiLib::InitMacroTileCfgTable( const UINT_32* pCfg, ///< [in] Pointer to table of tile configs UINT_32 noOfMacroEntries ///< [in] Numbe of entries in the table above ) @@ -1669,7 +1675,7 @@ BOOL_32 CiAddrLib::InitMacroTileCfgTable( /** **************************************************************************************************** -* CiAddrLib::HwlComputeMacroModeIndex +* CiLib::HwlComputeMacroModeIndex * * @brief * Computes macro tile mode index @@ -1677,7 +1683,7 @@ BOOL_32 CiAddrLib::InitMacroTileCfgTable( * TRUE if macro tile table is correctly initialized **************************************************************************************************** */ -INT_32 CiAddrLib::HwlComputeMacroModeIndex( +INT_32 CiLib::HwlComputeMacroModeIndex( INT_32 tileIndex, ///< [in] Tile mode index ADDR_SURFACE_FLAGS flags, ///< [in] Surface flags UINT_32 bpp, ///< [in] Bit per pixel @@ -1769,7 +1775,7 @@ INT_32 CiAddrLib::HwlComputeMacroModeIndex( /** **************************************************************************************************** -* CiAddrLib::HwlComputeTileDataWidthAndHeightLinear +* CiLib::HwlComputeTileDataWidthAndHeightLinear * * @brief * Compute the squared cache shape for per-tile data (CMASK and HTILE) for linear layout @@ -1781,7 +1787,7 @@ INT_32 CiAddrLib::HwlComputeMacroModeIndex( * MacroWidth and macroHeight are measured in pixels **************************************************************************************************** */ -VOID CiAddrLib::HwlComputeTileDataWidthAndHeightLinear( +VOID CiLib::HwlComputeTileDataWidthAndHeightLinear( UINT_32* pMacroWidth, ///< [out] macro tile width UINT_32* pMacroHeight, ///< [out] macro tile height UINT_32 bpp, ///< [in] bits per pixel @@ -1814,7 +1820,7 @@ VOID CiAddrLib::HwlComputeTileDataWidthAndHeightLinear( /** **************************************************************************************************** -* CiAddrLib::HwlComputeMetadataNibbleAddress +* CiLib::HwlComputeMetadataNibbleAddress * * @brief * calculate meta data address based on input information @@ -1835,7 +1841,7 @@ VOID CiAddrLib::HwlComputeTileDataWidthAndHeightLinear( * **************************************************************************************************** */ -UINT_64 CiAddrLib::HwlComputeMetadataNibbleAddress( +UINT_64 CiLib::HwlComputeMetadataNibbleAddress( UINT_64 uncompressedDataByteAddress, UINT_64 dataBaseByteAddress, UINT_64 metadataBaseByteAddress, @@ -1883,7 +1889,7 @@ UINT_64 CiAddrLib::HwlComputeMetadataNibbleAddress( UINT_32 lsb = pipeBits + pipeInterleaveBits; UINT_32 msb = bankBits - 1 + lsb; - UINT_64 bankDataBits = AddrGetBits(offset, msb, lsb); + UINT_64 bankDataBits = GetBits(offset, msb, lsb); ///-------------------------------------------------------------------------------------------- /// Save pipe data bits @@ -1891,7 +1897,7 @@ UINT_64 CiAddrLib::HwlComputeMetadataNibbleAddress( lsb = pipeInterleaveBits; msb = pipeBits - 1 + lsb; - UINT_64 pipeDataBits = AddrGetBits(offset, msb, lsb); + UINT_64 pipeDataBits = GetBits(offset, msb, lsb); ///-------------------------------------------------------------------------------------------- /// Remove pipe and bank bits @@ -1899,7 +1905,7 @@ UINT_64 CiAddrLib::HwlComputeMetadataNibbleAddress( lsb = pipeInterleaveBits; msb = dataMacrotileBits - 1; - UINT_64 offsetWithoutPipeBankBits = AddrRemoveBits(offset, msb, lsb); + UINT_64 offsetWithoutPipeBankBits = RemoveBits(offset, msb, lsb); ADDR_ASSERT((0 != blockByteSize)); UINT_64 blockInBankpipe = offsetWithoutPipeBankBits / blockByteSize; @@ -1917,7 +1923,7 @@ UINT_64 CiAddrLib::HwlComputeMetadataNibbleAddress( } msb = bankBits - 1 + lsb; - UINT_64 blockInBankpipeWithBankBits = AddrInsertBits(blockInBankpipe, bankDataBits, msb, lsb); + UINT_64 blockInBankpipeWithBankBits = InsertBits(blockInBankpipe, bankDataBits, msb, lsb); /// NOTE *2 because we are converting to Nibble address in this step UINT_64 metaAddressInPipe = blockInBankpipeWithBankBits * 2 * metadataBitSize / 8; @@ -1928,14 +1934,14 @@ UINT_64 CiAddrLib::HwlComputeMetadataNibbleAddress( ///-------------------------------------------------------------------------------------------- lsb = pipeInterleaveBits + 1; ///<+1 due to Nibble address now gives interleave bits extra lsb. msb = pipeBits - 1 + lsb; - UINT_64 metadataAddress = AddrInsertBits(metaAddressInPipe, pipeDataBits, msb, lsb); + UINT_64 metadataAddress = InsertBits(metaAddressInPipe, pipeDataBits, msb, lsb); return metadataAddress; } /** **************************************************************************************************** -* CiAddrLib::HwlPadDimensions +* CiLib::HwlPadDimensions * * @brief * Helper function to pad dimensions @@ -1945,7 +1951,7 @@ UINT_64 CiAddrLib::HwlComputeMetadataNibbleAddress( * **************************************************************************************************** */ -VOID CiAddrLib::HwlPadDimensions( +VOID CiLib::HwlPadDimensions( AddrTileMode tileMode, ///< [in] tile mode UINT_32 bpp, ///< [in] bits per pixel ADDR_SURFACE_FLAGS flags, ///< [in] surface flags @@ -2021,7 +2027,7 @@ VOID CiAddrLib::HwlPadDimensions( /** **************************************************************************************************** -* CiAddrLib::HwlGetMaxAlignments +* CiLib::HwlGetMaxAlignments * * @brief * Gets maximum alignments @@ -2029,7 +2035,7 @@ VOID CiAddrLib::HwlPadDimensions( * ADDR_E_RETURNCODE **************************************************************************************************** */ -ADDR_E_RETURNCODE CiAddrLib::HwlGetMaxAlignments( +ADDR_E_RETURNCODE CiLib::HwlGetMaxAlignments( ADDR_GET_MAX_ALINGMENTS_OUTPUT* pOut ///< [out] output structure ) const { @@ -2060,4 +2066,5 @@ ADDR_E_RETURNCODE CiAddrLib::HwlGetMaxAlignments( return ADDR_OK; } - +} // V1 +} // Addr diff --git a/src/amd/addrlib/r800/ciaddrlib.h b/src/amd/addrlib/r800/ciaddrlib.h index 69ede03f51c..438790a5895 100644 --- a/src/amd/addrlib/r800/ciaddrlib.h +++ b/src/amd/addrlib/r800/ciaddrlib.h @@ -27,7 +27,7 @@ /** **************************************************************************************************** * @file ciaddrlib.h -* @brief Contains the CiAddrLib class definition. +* @brief Contains the CiLib class definition. **************************************************************************************************** */ @@ -37,6 +37,11 @@ #include "addrlib1.h" #include "siaddrlib.h" +namespace Addr +{ +namespace V1 +{ + /** **************************************************************************************************** * @brief CI specific settings structure. @@ -74,18 +79,18 @@ struct CIChipSettings * function set. **************************************************************************************************** */ -class CiAddrLib : public SiAddrLib +class CiLib : public SiLib { public: - /// Creates CiAddrLib object - static AddrLib* CreateObj(const AddrClient* pClient) + /// Creates CiLib object + static Addr::Lib* CreateObj(const Client* pClient) { - return new(pClient) CiAddrLib(pClient); + return new(pClient) CiLib(pClient); } private: - CiAddrLib(const AddrClient* pClient); - virtual ~CiAddrLib(); + CiLib(const Client* pClient); + virtual ~CiLib(); protected: @@ -98,7 +103,7 @@ protected: const ADDR_COMPUTE_FMASK_INFO_INPUT* pIn, ADDR_COMPUTE_FMASK_INFO_OUTPUT* pOut); - virtual AddrChipFamily HwlConvertChipFamily( + virtual ChipFamily HwlConvertChipFamily( UINT_32 uChipFamily, UINT_32 uChipRevision); virtual BOOL_32 HwlInitGlobalParams( @@ -117,7 +122,7 @@ protected: ADDR_TILEINFO* pTileInfo, AddrTileMode* pTileMode = NULL, AddrTileType* pTileType = NULL ) const; - // Sub-hwl interface - defined in EgBasedAddrLib + // Sub-hwl interface - defined in EgBasedLib virtual VOID HwlSetupTileInfo( AddrTileMode tileMode, ADDR_SURFACE_FLAGS flags, UINT_32 bpp, UINT_32 pitch, UINT_32 height, UINT_32 numSamples, @@ -167,7 +172,7 @@ protected: private: VOID ReadGbTileMode( - UINT_32 regValue, AddrTileConfig* pCfg) const; + UINT_32 regValue, TileConfig* pCfg) const; VOID ReadGbMacroTileCfg( UINT_32 regValue, ADDR_TILEINFO* pCfg) const; @@ -198,6 +203,9 @@ private: CIChipSettings m_settings; }; +} // V1 +} // Addr + #endif diff --git a/src/amd/addrlib/r800/egbaddrlib.cpp b/src/amd/addrlib/r800/egbaddrlib.cpp index 393557741bc..5de3f996f08 100644 --- a/src/amd/addrlib/r800/egbaddrlib.cpp +++ b/src/amd/addrlib/r800/egbaddrlib.cpp @@ -27,15 +27,20 @@ /** **************************************************************************************************** * @file egbaddrlib.cpp -* @brief Contains the EgBasedAddrLib class implementation +* @brief Contains the EgBasedLib class implementation **************************************************************************************************** */ #include "egbaddrlib.h" +namespace Addr +{ +namespace V1 +{ + /** **************************************************************************************************** -* EgBasedAddrLib::EgBasedAddrLib +* EgBasedLib::EgBasedLib * * @brief * Constructor @@ -44,8 +49,8 @@ * **************************************************************************************************** */ -EgBasedAddrLib::EgBasedAddrLib(const AddrClient* pClient) : - AddrLib1(pClient), +EgBasedLib::EgBasedLib(const Client* pClient) : + Lib(pClient), m_ranks(0), m_logicalBanks(0), m_bankInterleave(1) @@ -54,19 +59,19 @@ EgBasedAddrLib::EgBasedAddrLib(const AddrClient* pClient) : /** **************************************************************************************************** -* EgBasedAddrLib::~EgBasedAddrLib +* EgBasedLib::~EgBasedLib * * @brief * Destructor **************************************************************************************************** */ -EgBasedAddrLib::~EgBasedAddrLib() +EgBasedLib::~EgBasedLib() { } /** **************************************************************************************************** -* EgBasedAddrLib::DispatchComputeSurfaceInfo +* EgBasedLib::DispatchComputeSurfaceInfo * * @brief * Compute surface sizes include padded pitch,height,slices,total size in bytes, @@ -77,7 +82,7 @@ EgBasedAddrLib::~EgBasedAddrLib() * TRUE if no error occurs **************************************************************************************************** */ -BOOL_32 EgBasedAddrLib::DispatchComputeSurfaceInfo( +BOOL_32 EgBasedLib::DispatchComputeSurfaceInfo( const ADDR_COMPUTE_SURFACE_INFO_INPUT* pIn, ///< [in] input structure ADDR_COMPUTE_SURFACE_INFO_OUTPUT* pOut ///< [out] output structure ) const @@ -198,7 +203,7 @@ BOOL_32 EgBasedAddrLib::DispatchComputeSurfaceInfo( /** **************************************************************************************************** -* EgBasedAddrLib::ComputeSurfaceInfoLinear +* EgBasedLib::ComputeSurfaceInfoLinear * * @brief * Compute linear surface sizes include padded pitch, height, slices, total size in @@ -209,7 +214,7 @@ BOOL_32 EgBasedAddrLib::DispatchComputeSurfaceInfo( * TRUE if no error occurs **************************************************************************************************** */ -BOOL_32 EgBasedAddrLib::ComputeSurfaceInfoLinear( +BOOL_32 EgBasedLib::ComputeSurfaceInfoLinear( const ADDR_COMPUTE_SURFACE_INFO_INPUT* pIn, ///< [in] Input structure ADDR_COMPUTE_SURFACE_INFO_OUTPUT* pOut, ///< [out] Output structure UINT_32 padDims ///< [in] Dimensions to padd @@ -293,7 +298,7 @@ BOOL_32 EgBasedAddrLib::ComputeSurfaceInfoLinear( /** **************************************************************************************************** -* EgBasedAddrLib::ComputeSurfaceInfoMicroTiled +* EgBasedLib::ComputeSurfaceInfoMicroTiled * * @brief * Compute 1D/Micro Tiled surface sizes include padded pitch, height, slices, total @@ -304,7 +309,7 @@ BOOL_32 EgBasedAddrLib::ComputeSurfaceInfoLinear( * TRUE if no error occurs **************************************************************************************************** */ -BOOL_32 EgBasedAddrLib::ComputeSurfaceInfoMicroTiled( +BOOL_32 EgBasedLib::ComputeSurfaceInfoMicroTiled( const ADDR_COMPUTE_SURFACE_INFO_INPUT* pIn, ///< [in] Input structure ADDR_COMPUTE_SURFACE_INFO_OUTPUT* pOut, ///< [out] Output structure UINT_32 padDims, ///< [in] Dimensions to padd @@ -403,7 +408,7 @@ BOOL_32 EgBasedAddrLib::ComputeSurfaceInfoMicroTiled( /** **************************************************************************************************** -* EgBasedAddrLib::ComputeSurfaceInfoMacroTiled +* EgBasedLib::ComputeSurfaceInfoMacroTiled * * @brief * Compute 2D/macro tiled surface sizes include padded pitch, height, slices, total @@ -414,7 +419,7 @@ BOOL_32 EgBasedAddrLib::ComputeSurfaceInfoMicroTiled( * TRUE if no error occurs **************************************************************************************************** */ -BOOL_32 EgBasedAddrLib::ComputeSurfaceInfoMacroTiled( +BOOL_32 EgBasedLib::ComputeSurfaceInfoMacroTiled( const ADDR_COMPUTE_SURFACE_INFO_INPUT* pIn, ///< [in] Input structure ADDR_COMPUTE_SURFACE_INFO_OUTPUT* pOut, ///< [out] Output structure UINT_32 padDims, ///< [in] Dimensions to padd @@ -615,7 +620,7 @@ BOOL_32 EgBasedAddrLib::ComputeSurfaceInfoMacroTiled( /** **************************************************************************************************** -* EgBasedAddrLib::ComputeSurfaceAlignmentsLinear +* EgBasedLib::ComputeSurfaceAlignmentsLinear * * @brief * Compute linear surface alignment, calculation results are returned through @@ -625,7 +630,7 @@ BOOL_32 EgBasedAddrLib::ComputeSurfaceInfoMacroTiled( * TRUE if no error occurs **************************************************************************************************** */ -BOOL_32 EgBasedAddrLib::ComputeSurfaceAlignmentsLinear( +BOOL_32 EgBasedLib::ComputeSurfaceAlignmentsLinear( AddrTileMode tileMode, ///< [in] tile mode UINT_32 bpp, ///< [in] bits per pixel ADDR_SURFACE_FLAGS flags, ///< [in] surface flags @@ -671,7 +676,7 @@ BOOL_32 EgBasedAddrLib::ComputeSurfaceAlignmentsLinear( /** **************************************************************************************************** -* EgBasedAddrLib::ComputeSurfaceAlignmentsMicroTiled +* EgBasedLib::ComputeSurfaceAlignmentsMicroTiled * * @brief * Compute 1D tiled surface alignment, calculation results are returned through @@ -681,7 +686,7 @@ BOOL_32 EgBasedAddrLib::ComputeSurfaceAlignmentsLinear( * TRUE if no error occurs **************************************************************************************************** */ -BOOL_32 EgBasedAddrLib::ComputeSurfaceAlignmentsMicroTiled( +BOOL_32 EgBasedLib::ComputeSurfaceAlignmentsMicroTiled( AddrTileMode tileMode, ///< [in] tile mode UINT_32 bpp, ///< [in] bits per pixel ADDR_SURFACE_FLAGS flags, ///< [in] surface flags @@ -721,7 +726,7 @@ BOOL_32 EgBasedAddrLib::ComputeSurfaceAlignmentsMicroTiled( /** **************************************************************************************************** -* EgBasedAddrLib::HwlReduceBankWidthHeight +* EgBasedLib::HwlReduceBankWidthHeight * * @brief * Additional checks, reduce bankHeight/bankWidth if needed and possible @@ -731,7 +736,7 @@ BOOL_32 EgBasedAddrLib::ComputeSurfaceAlignmentsMicroTiled( * TRUE if no error occurs **************************************************************************************************** */ -BOOL_32 EgBasedAddrLib::HwlReduceBankWidthHeight( +BOOL_32 EgBasedLib::HwlReduceBankWidthHeight( UINT_32 tileSize, ///< [in] tile size UINT_32 bpp, ///< [in] bits per pixel ADDR_SURFACE_FLAGS flags, ///< [in] surface flags @@ -825,7 +830,7 @@ BOOL_32 EgBasedAddrLib::HwlReduceBankWidthHeight( /** **************************************************************************************************** -* EgBasedAddrLib::ComputeSurfaceAlignmentsMacroTiled +* EgBasedLib::ComputeSurfaceAlignmentsMacroTiled * * @brief * Compute 2D tiled surface alignment, calculation results are returned through @@ -835,7 +840,7 @@ BOOL_32 EgBasedAddrLib::HwlReduceBankWidthHeight( * TRUE if no error occurs **************************************************************************************************** */ -BOOL_32 EgBasedAddrLib::ComputeSurfaceAlignmentsMacroTiled( +BOOL_32 EgBasedLib::ComputeSurfaceAlignmentsMacroTiled( AddrTileMode tileMode, ///< [in] tile mode UINT_32 bpp, ///< [in] bits per pixel ADDR_SURFACE_FLAGS flags, ///< [in] surface flags @@ -949,7 +954,7 @@ BOOL_32 EgBasedAddrLib::ComputeSurfaceAlignmentsMacroTiled( /** **************************************************************************************************** -* EgBasedAddrLib::SanityCheckMacroTiled +* EgBasedLib::SanityCheckMacroTiled * * @brief * Check if macro-tiled parameters are valid @@ -957,7 +962,7 @@ BOOL_32 EgBasedAddrLib::ComputeSurfaceAlignmentsMacroTiled( * TRUE if valid **************************************************************************************************** */ -BOOL_32 EgBasedAddrLib::SanityCheckMacroTiled( +BOOL_32 EgBasedLib::SanityCheckMacroTiled( ADDR_TILEINFO* pTileInfo ///< [in] macro-tiled parameters ) const { @@ -1054,7 +1059,7 @@ BOOL_32 EgBasedAddrLib::SanityCheckMacroTiled( /** **************************************************************************************************** -* EgBasedAddrLib::ComputeSurfaceMipLevelTileMode +* EgBasedLib::ComputeSurfaceMipLevelTileMode * * @brief * Compute valid tile mode for surface mipmap sub-levels @@ -1063,7 +1068,7 @@ BOOL_32 EgBasedAddrLib::SanityCheckMacroTiled( * Suitable tile mode **************************************************************************************************** */ -AddrTileMode EgBasedAddrLib::ComputeSurfaceMipLevelTileMode( +AddrTileMode EgBasedLib::ComputeSurfaceMipLevelTileMode( AddrTileMode baseTileMode, ///< [in] base tile mode UINT_32 bpp, ///< [in] bits per pixels UINT_32 pitch, ///< [in] current level pitch @@ -1146,14 +1151,14 @@ AddrTileMode EgBasedAddrLib::ComputeSurfaceMipLevelTileMode( /** **************************************************************************************************** -* EgBasedAddrLib::HwlDegradeBaseLevel +* EgBasedLib::HwlDegradeBaseLevel * @brief * Check if degrade is needed for base level * @return * TRUE if degrade is suggested **************************************************************************************************** */ -BOOL_32 EgBasedAddrLib::HwlDegradeBaseLevel( +BOOL_32 EgBasedLib::HwlDegradeBaseLevel( const ADDR_COMPUTE_SURFACE_INFO_INPUT* pIn) const { BOOL_32 degrade = FALSE; @@ -1230,7 +1235,7 @@ BOOL_32 EgBasedAddrLib::HwlDegradeBaseLevel( /** **************************************************************************************************** -* EgBasedAddrLib::HwlDegradeThickTileMode +* EgBasedLib::HwlDegradeThickTileMode * * @brief * Degrades valid tile mode for thick modes if needed @@ -1239,7 +1244,7 @@ BOOL_32 EgBasedAddrLib::HwlDegradeBaseLevel( * Suitable tile mode **************************************************************************************************** */ -AddrTileMode EgBasedAddrLib::HwlDegradeThickTileMode( +AddrTileMode EgBasedLib::HwlDegradeThickTileMode( AddrTileMode baseTileMode, ///< [in] base tile mode UINT_32 numSlices, ///< [in] current number of slices UINT_32* pBytesPerTile ///< [in/out] pointer to bytes per slice @@ -1303,7 +1308,7 @@ AddrTileMode EgBasedAddrLib::HwlDegradeThickTileMode( /** **************************************************************************************************** -* EgBasedAddrLib::DispatchComputeSurfaceAddrFromCoord +* EgBasedLib::DispatchComputeSurfaceAddrFromCoord * * @brief * Compute surface address from given coord (x, y, slice,sample) @@ -1312,7 +1317,7 @@ AddrTileMode EgBasedAddrLib::HwlDegradeThickTileMode( * Address in bytes **************************************************************************************************** */ -UINT_64 EgBasedAddrLib::DispatchComputeSurfaceAddrFromCoord( +UINT_64 EgBasedLib::DispatchComputeSurfaceAddrFromCoord( const ADDR_COMPUTE_SURFACE_ADDRFROMCOORD_INPUT* pIn, ///< [in] input structure ADDR_COMPUTE_SURFACE_ADDRFROMCOORD_OUTPUT* pOut ///< [out] output structure ) const @@ -1468,7 +1473,7 @@ UINT_64 EgBasedAddrLib::DispatchComputeSurfaceAddrFromCoord( /** **************************************************************************************************** -* EgBasedAddrLib::ComputeMacroTileEquation +* EgBasedLib::ComputeMacroTileEquation * * @brief * Computes the address equation in macro tile @@ -1476,7 +1481,7 @@ UINT_64 EgBasedAddrLib::DispatchComputeSurfaceAddrFromCoord( * If equation can be computed **************************************************************************************************** */ -ADDR_E_RETURNCODE EgBasedAddrLib::ComputeMacroTileEquation( +ADDR_E_RETURNCODE EgBasedLib::ComputeMacroTileEquation( UINT_32 log2BytesPP, ///< [in] log2 of bytes per pixel AddrTileMode tileMode, ///< [in] tile mode AddrTileType microTileType, ///< [in] micro tiling type @@ -1599,7 +1604,7 @@ ADDR_E_RETURNCODE EgBasedAddrLib::ComputeMacroTileEquation( /** **************************************************************************************************** -* EgBasedAddrLib::ComputeSurfaceAddrFromCoordMicroTiled +* EgBasedLib::ComputeSurfaceAddrFromCoordMicroTiled * * @brief * Computes the surface address and bit position from a @@ -1608,7 +1613,7 @@ ADDR_E_RETURNCODE EgBasedAddrLib::ComputeMacroTileEquation( * The byte address **************************************************************************************************** */ -UINT_64 EgBasedAddrLib::ComputeSurfaceAddrFromCoordMacroTiled( +UINT_64 EgBasedLib::ComputeSurfaceAddrFromCoordMacroTiled( UINT_32 x, ///< [in] x coordinate UINT_32 y, ///< [in] y coordinate UINT_32 slice, ///< [in] slice index @@ -1874,7 +1879,7 @@ UINT_64 EgBasedAddrLib::ComputeSurfaceAddrFromCoordMacroTiled( /** **************************************************************************************************** -* EgBasedAddrLib::ComputeSurfaceAddrFromCoordMicroTiled +* EgBasedLib::ComputeSurfaceAddrFromCoordMicroTiled * * @brief * Computes the surface address and bit position from a coordinate for 1D tilied @@ -1883,7 +1888,7 @@ UINT_64 EgBasedAddrLib::ComputeSurfaceAddrFromCoordMacroTiled( * The byte address **************************************************************************************************** */ -UINT_64 EgBasedAddrLib::ComputeSurfaceAddrFromCoordMicroTiled( +UINT_64 EgBasedLib::ComputeSurfaceAddrFromCoordMicroTiled( UINT_32 x, ///< [in] x coordinate UINT_32 y, ///< [in] y coordinate UINT_32 slice, ///< [in] slice index @@ -1999,7 +2004,7 @@ UINT_64 EgBasedAddrLib::ComputeSurfaceAddrFromCoordMicroTiled( /** **************************************************************************************************** -* EgBasedAddrLib::HwlComputePixelCoordFromOffset +* EgBasedLib::HwlComputePixelCoordFromOffset * * @brief * Compute pixel coordinate from offset inside a micro tile @@ -2007,7 +2012,7 @@ UINT_64 EgBasedAddrLib::ComputeSurfaceAddrFromCoordMicroTiled( * N/A **************************************************************************************************** */ -VOID EgBasedAddrLib::HwlComputePixelCoordFromOffset( +VOID EgBasedLib::HwlComputePixelCoordFromOffset( UINT_32 offset, ///< [in] offset inside micro tile in bits UINT_32 bpp, ///< [in] bits per pixel UINT_32 numSamples, ///< [in] number of samples @@ -2188,7 +2193,7 @@ VOID EgBasedAddrLib::HwlComputePixelCoordFromOffset( /** **************************************************************************************************** -* EgBasedAddrLib::DispatchComputeSurfaceCoordFromAddrDispatch +* EgBasedLib::DispatchComputeSurfaceCoordFromAddrDispatch * * @brief * Compute (x,y,slice,sample) coordinates from surface address @@ -2196,7 +2201,7 @@ VOID EgBasedAddrLib::HwlComputePixelCoordFromOffset( * N/A **************************************************************************************************** */ -VOID EgBasedAddrLib::DispatchComputeSurfaceCoordFromAddr( +VOID EgBasedLib::DispatchComputeSurfaceCoordFromAddr( const ADDR_COMPUTE_SURFACE_COORDFROMADDR_INPUT* pIn, ///< [in] input structure ADDR_COMPUTE_SURFACE_COORDFROMADDR_OUTPUT* pOut ///< [out] output structure ) const @@ -2333,7 +2338,7 @@ VOID EgBasedAddrLib::DispatchComputeSurfaceCoordFromAddr( /** **************************************************************************************************** -* EgBasedAddrLib::ComputeSurfaceCoordFromAddrMacroTiled +* EgBasedLib::ComputeSurfaceCoordFromAddrMacroTiled * * @brief * Compute surface coordinates from address for macro tiled surface @@ -2341,7 +2346,7 @@ VOID EgBasedAddrLib::DispatchComputeSurfaceCoordFromAddr( * N/A **************************************************************************************************** */ -VOID EgBasedAddrLib::ComputeSurfaceCoordFromAddrMacroTiled( +VOID EgBasedLib::ComputeSurfaceCoordFromAddrMacroTiled( UINT_64 addr, ///< [in] byte address UINT_32 bitPosition, ///< [in] bit position UINT_32 bpp, ///< [in] bits per pixel @@ -2491,7 +2496,7 @@ VOID EgBasedAddrLib::ComputeSurfaceCoordFromAddrMacroTiled( /** **************************************************************************************************** -* EgBasedAddrLib::ComputeSurfaceCoord2DFromBankPipe +* EgBasedLib::ComputeSurfaceCoord2DFromBankPipe * * @brief * Compute surface x,y coordinates from bank/pipe info @@ -2499,7 +2504,7 @@ VOID EgBasedAddrLib::ComputeSurfaceCoordFromAddrMacroTiled( * N/A **************************************************************************************************** */ -VOID EgBasedAddrLib::ComputeSurfaceCoord2DFromBankPipe( +VOID EgBasedLib::ComputeSurfaceCoord2DFromBankPipe( AddrTileMode tileMode, ///< [in] tile mode UINT_32 x, ///< [in] x coordinate UINT_32 y, ///< [in] y coordinate @@ -2677,14 +2682,14 @@ VOID EgBasedAddrLib::ComputeSurfaceCoord2DFromBankPipe( /** **************************************************************************************************** -* EgBasedAddrLib::HwlExtractBankPipeSwizzle +* EgBasedLib::HwlExtractBankPipeSwizzle * @brief -* Entry of EgBasedAddrLib ExtractBankPipeSwizzle +* Entry of EgBasedLib ExtractBankPipeSwizzle * @return * ADDR_E_RETURNCODE **************************************************************************************************** */ -ADDR_E_RETURNCODE EgBasedAddrLib::HwlExtractBankPipeSwizzle( +ADDR_E_RETURNCODE EgBasedLib::HwlExtractBankPipeSwizzle( const ADDR_EXTRACT_BANKPIPE_SWIZZLE_INPUT* pIn, ///< [in] input structure ADDR_EXTRACT_BANKPIPE_SWIZZLE_OUTPUT* pOut ///< [out] output structure ) const @@ -2700,14 +2705,14 @@ ADDR_E_RETURNCODE EgBasedAddrLib::HwlExtractBankPipeSwizzle( /** **************************************************************************************************** -* EgBasedAddrLib::HwlCombineBankPipeSwizzle +* EgBasedLib::HwlCombineBankPipeSwizzle * @brief * Combine bank/pipe swizzle * @return * ADDR_E_RETURNCODE **************************************************************************************************** */ -ADDR_E_RETURNCODE EgBasedAddrLib::HwlCombineBankPipeSwizzle( +ADDR_E_RETURNCODE EgBasedLib::HwlCombineBankPipeSwizzle( UINT_32 bankSwizzle, ///< [in] bank swizzle UINT_32 pipeSwizzle, ///< [in] pipe swizzle ADDR_TILEINFO* pTileInfo, ///< [in] tile info @@ -2731,14 +2736,14 @@ ADDR_E_RETURNCODE EgBasedAddrLib::HwlCombineBankPipeSwizzle( /** **************************************************************************************************** -* EgBasedAddrLib::HwlComputeBaseSwizzle +* EgBasedLib::HwlComputeBaseSwizzle * @brief * Compute base swizzle * @return * ADDR_E_RETURNCODE **************************************************************************************************** */ -ADDR_E_RETURNCODE EgBasedAddrLib::HwlComputeBaseSwizzle( +ADDR_E_RETURNCODE EgBasedLib::HwlComputeBaseSwizzle( const ADDR_COMPUTE_BASE_SWIZZLE_INPUT* pIn, ADDR_COMPUTE_BASE_SWIZZLE_OUTPUT* pOut ) const @@ -2806,14 +2811,14 @@ ADDR_E_RETURNCODE EgBasedAddrLib::HwlComputeBaseSwizzle( /** **************************************************************************************************** -* EgBasedAddrLib::ExtractBankPipeSwizzle +* EgBasedLib::ExtractBankPipeSwizzle * @brief * Extract bank/pipe swizzle from base256b * @return * N/A **************************************************************************************************** */ -VOID EgBasedAddrLib::ExtractBankPipeSwizzle( +VOID EgBasedLib::ExtractBankPipeSwizzle( UINT_32 base256b, ///< [in] input base256b register value ADDR_TILEINFO* pTileInfo, ///< [in] 2D tile parameters. Client must provide all data UINT_32* pBankSwizzle, ///< [out] bank swizzle @@ -2844,14 +2849,14 @@ VOID EgBasedAddrLib::ExtractBankPipeSwizzle( /** **************************************************************************************************** -* EgBasedAddrLib::GetBankPipeSwizzle +* EgBasedLib::GetBankPipeSwizzle * @brief * Combine bank/pipe swizzle * @return * Base256b bits (only filled bank/pipe bits) **************************************************************************************************** */ -UINT_32 EgBasedAddrLib::GetBankPipeSwizzle( +UINT_32 EgBasedLib::GetBankPipeSwizzle( UINT_32 bankSwizzle, ///< [in] bank swizzle UINT_32 pipeSwizzle, ///< [in] pipe swizzle UINT_64 baseAddr, ///< [in] base address @@ -2870,14 +2875,14 @@ UINT_32 EgBasedAddrLib::GetBankPipeSwizzle( /** **************************************************************************************************** -* EgBasedAddrLib::ComputeSliceTileSwizzle +* EgBasedLib::ComputeSliceTileSwizzle * @brief * Compute cubemap/3d texture faces/slices tile swizzle * @return * Tile swizzle **************************************************************************************************** */ -UINT_32 EgBasedAddrLib::ComputeSliceTileSwizzle( +UINT_32 EgBasedLib::ComputeSliceTileSwizzle( AddrTileMode tileMode, ///< [in] Tile mode UINT_32 baseSwizzle, ///< [in] Base swizzle UINT_32 slice, ///< [in] Slice index, Cubemap face index, 0 means +X @@ -2935,7 +2940,7 @@ UINT_32 EgBasedAddrLib::ComputeSliceTileSwizzle( /** **************************************************************************************************** -* EgBasedAddrLib::HwlComputeQbStereoRightSwizzle +* EgBasedLib::HwlComputeQbStereoRightSwizzle * * @brief * Compute right eye swizzle @@ -2943,7 +2948,7 @@ UINT_32 EgBasedAddrLib::ComputeSliceTileSwizzle( * swizzle **************************************************************************************************** */ -UINT_32 EgBasedAddrLib::HwlComputeQbStereoRightSwizzle( +UINT_32 EgBasedLib::HwlComputeQbStereoRightSwizzle( ADDR_COMPUTE_SURFACE_INFO_OUTPUT* pInfo ///< [in] Surface info, must be valid ) const { @@ -2967,7 +2972,7 @@ UINT_32 EgBasedAddrLib::HwlComputeQbStereoRightSwizzle( /** **************************************************************************************************** -* EgBasedAddrLib::ComputeBankFromCoord +* EgBasedLib::ComputeBankFromCoord * * @brief * Compute bank number from coordinates @@ -2975,7 +2980,7 @@ UINT_32 EgBasedAddrLib::HwlComputeQbStereoRightSwizzle( * Bank number **************************************************************************************************** */ -UINT_32 EgBasedAddrLib::ComputeBankFromCoord( +UINT_32 EgBasedLib::ComputeBankFromCoord( UINT_32 x, ///< [in] x coordinate UINT_32 y, ///< [in] y coordinate UINT_32 slice, ///< [in] slice index @@ -3099,7 +3104,7 @@ UINT_32 EgBasedAddrLib::ComputeBankFromCoord( /** **************************************************************************************************** -* EgBasedAddrLib::ComputeBankFromAddr +* EgBasedLib::ComputeBankFromAddr * * @brief * Compute the bank number from an address @@ -3107,7 +3112,7 @@ UINT_32 EgBasedAddrLib::ComputeBankFromCoord( * Bank number **************************************************************************************************** */ -UINT_32 EgBasedAddrLib::ComputeBankFromAddr( +UINT_32 EgBasedLib::ComputeBankFromAddr( UINT_64 addr, ///< [in] address UINT_32 numBanks, ///< [in] number of banks UINT_32 numPipes ///< [in] number of pipes @@ -3132,7 +3137,7 @@ UINT_32 EgBasedAddrLib::ComputeBankFromAddr( /** **************************************************************************************************** -* EgBasedAddrLib::ComputePipeRotation +* EgBasedLib::ComputePipeRotation * * @brief * Compute pipe rotation value @@ -3140,7 +3145,7 @@ UINT_32 EgBasedAddrLib::ComputeBankFromAddr( * Pipe rotation **************************************************************************************************** */ -UINT_32 EgBasedAddrLib::ComputePipeRotation( +UINT_32 EgBasedLib::ComputePipeRotation( AddrTileMode tileMode, ///< [in] tile mode UINT_32 numPipes ///< [in] number of pipes ) const @@ -3167,7 +3172,7 @@ UINT_32 EgBasedAddrLib::ComputePipeRotation( /** **************************************************************************************************** -* EgBasedAddrLib::ComputeBankRotation +* EgBasedLib::ComputeBankRotation * * @brief * Compute bank rotation value @@ -3175,7 +3180,7 @@ UINT_32 EgBasedAddrLib::ComputePipeRotation( * Bank rotation **************************************************************************************************** */ -UINT_32 EgBasedAddrLib::ComputeBankRotation( +UINT_32 EgBasedLib::ComputeBankRotation( AddrTileMode tileMode, ///< [in] tile mode UINT_32 numBanks, ///< [in] number of banks UINT_32 numPipes ///< [in] number of pipes @@ -3210,7 +3215,7 @@ UINT_32 EgBasedAddrLib::ComputeBankRotation( /** **************************************************************************************************** -* EgBasedAddrLib::ComputeHtileBytes +* EgBasedLib::ComputeHtileBytes * * @brief * Compute htile size in bytes @@ -3219,7 +3224,7 @@ UINT_32 EgBasedAddrLib::ComputeBankRotation( * Htile size in bytes **************************************************************************************************** */ -UINT_64 EgBasedAddrLib::ComputeHtileBytes( +UINT_64 EgBasedLib::ComputeHtileBytes( UINT_32 pitch, ///< [in] pitch UINT_32 height, ///< [in] height UINT_32 bpp, ///< [in] bits per pixel @@ -3253,7 +3258,7 @@ UINT_64 EgBasedAddrLib::ComputeHtileBytes( /** **************************************************************************************************** -* EgBasedAddrLib::DispatchComputeFmaskInfo +* EgBasedLib::DispatchComputeFmaskInfo * * @brief * Compute fmask sizes include padded pitch, height, slices, total size in bytes, @@ -3264,7 +3269,7 @@ UINT_64 EgBasedAddrLib::ComputeHtileBytes( * ADDR_E_RETURNCODE **************************************************************************************************** */ -ADDR_E_RETURNCODE EgBasedAddrLib::DispatchComputeFmaskInfo( +ADDR_E_RETURNCODE EgBasedLib::DispatchComputeFmaskInfo( const ADDR_COMPUTE_FMASK_INFO_INPUT* pIn, ///< [in] input structure ADDR_COMPUTE_FMASK_INFO_OUTPUT* pOut) ///< [out] output structure { @@ -3330,14 +3335,14 @@ ADDR_E_RETURNCODE EgBasedAddrLib::DispatchComputeFmaskInfo( /** **************************************************************************************************** -* EgBasedAddrLib::HwlFmaskSurfaceInfo +* EgBasedLib::HwlFmaskSurfaceInfo * @brief -* Entry of EgBasedAddrLib ComputeFmaskInfo +* Entry of EgBasedLib ComputeFmaskInfo * @return * ADDR_E_RETURNCODE **************************************************************************************************** */ -ADDR_E_RETURNCODE EgBasedAddrLib::HwlComputeFmaskInfo( +ADDR_E_RETURNCODE EgBasedLib::HwlComputeFmaskInfo( const ADDR_COMPUTE_FMASK_INFO_INPUT* pIn, ///< [in] input structure ADDR_COMPUTE_FMASK_INFO_OUTPUT* pOut ///< [out] output structure ) @@ -3372,14 +3377,14 @@ ADDR_E_RETURNCODE EgBasedAddrLib::HwlComputeFmaskInfo( /** **************************************************************************************************** -* EgBasedAddrLib::HwlComputeFmaskAddrFromCoord +* EgBasedLib::HwlComputeFmaskAddrFromCoord * @brief -* Entry of EgBasedAddrLib ComputeFmaskAddrFromCoord +* Entry of EgBasedLib ComputeFmaskAddrFromCoord * @return * ADDR_E_RETURNCODE **************************************************************************************************** */ -ADDR_E_RETURNCODE EgBasedAddrLib::HwlComputeFmaskAddrFromCoord( +ADDR_E_RETURNCODE EgBasedLib::HwlComputeFmaskAddrFromCoord( const ADDR_COMPUTE_FMASK_ADDRFROMCOORD_INPUT* pIn, ///< [in] input structure ADDR_COMPUTE_FMASK_ADDRFROMCOORD_OUTPUT* pOut ///< [out] output structure ) const @@ -3405,14 +3410,14 @@ ADDR_E_RETURNCODE EgBasedAddrLib::HwlComputeFmaskAddrFromCoord( /** **************************************************************************************************** -* EgBasedAddrLib::HwlComputeFmaskCoordFromAddr +* EgBasedLib::HwlComputeFmaskCoordFromAddr * @brief -* Entry of EgBasedAddrLib ComputeFmaskCoordFromAddr +* Entry of EgBasedLib ComputeFmaskCoordFromAddr * @return * ADDR_E_RETURNCODE **************************************************************************************************** */ -ADDR_E_RETURNCODE EgBasedAddrLib::HwlComputeFmaskCoordFromAddr( +ADDR_E_RETURNCODE EgBasedLib::HwlComputeFmaskCoordFromAddr( const ADDR_COMPUTE_FMASK_COORDFROMADDR_INPUT* pIn, ///< [in] input structure ADDR_COMPUTE_FMASK_COORDFROMADDR_OUTPUT* pOut ///< [out] output structure ) const @@ -3437,7 +3442,7 @@ ADDR_E_RETURNCODE EgBasedAddrLib::HwlComputeFmaskCoordFromAddr( #if ADDR_AM_BUILD /** **************************************************************************************************** -* EgBasedAddrLib::DispatchComputeFmaskAddrFromCoord +* EgBasedLib::DispatchComputeFmaskAddrFromCoord * * @brief * Computes the FMASK address and bit position from a coordinate. @@ -3445,7 +3450,7 @@ ADDR_E_RETURNCODE EgBasedAddrLib::HwlComputeFmaskCoordFromAddr( * The byte address **************************************************************************************************** */ -UINT_64 EgBasedAddrLib::DispatchComputeFmaskAddrFromCoord( +UINT_64 EgBasedLib::DispatchComputeFmaskAddrFromCoord( const ADDR_COMPUTE_FMASK_ADDRFROMCOORD_INPUT* pIn, ///< [in] input structure ADDR_COMPUTE_FMASK_ADDRFROMCOORD_OUTPUT* pOut ///< [out] output structure ) const @@ -3526,7 +3531,7 @@ UINT_64 EgBasedAddrLib::DispatchComputeFmaskAddrFromCoord( /** **************************************************************************************************** -* EgBasedAddrLib::ComputeFmaskAddrFromCoordMicroTiled +* EgBasedLib::ComputeFmaskAddrFromCoordMicroTiled * * @brief * Computes the FMASK address and bit position from a coordinate for 1D tilied (micro @@ -3535,7 +3540,7 @@ UINT_64 EgBasedAddrLib::DispatchComputeFmaskAddrFromCoord( * The byte address **************************************************************************************************** */ -UINT_64 EgBasedAddrLib::ComputeFmaskAddrFromCoordMicroTiled( +UINT_64 EgBasedLib::ComputeFmaskAddrFromCoordMicroTiled( UINT_32 x, ///< [in] x coordinate UINT_32 y, ///< [in] y coordinate UINT_32 slice, ///< [in] slice index @@ -3634,7 +3639,7 @@ UINT_64 EgBasedAddrLib::ComputeFmaskAddrFromCoordMicroTiled( /** **************************************************************************************************** -* EgBasedAddrLib::ComputeFmaskAddrFromCoordMacroTiled +* EgBasedLib::ComputeFmaskAddrFromCoordMacroTiled * * @brief * Computes the FMASK address and bit position from a coordinate for 2D tilied (macro @@ -3643,7 +3648,7 @@ UINT_64 EgBasedAddrLib::ComputeFmaskAddrFromCoordMicroTiled( * The byte address **************************************************************************************************** */ -UINT_64 EgBasedAddrLib::ComputeFmaskAddrFromCoordMacroTiled( +UINT_64 EgBasedLib::ComputeFmaskAddrFromCoordMacroTiled( UINT_32 x, ///< [in] x coordinate UINT_32 y, ///< [in] y coordinate UINT_32 slice, ///< [in] slice index @@ -3756,7 +3761,7 @@ UINT_64 EgBasedAddrLib::ComputeFmaskAddrFromCoordMacroTiled( /** **************************************************************************************************** -* EgBasedAddrLib::ComputeFmaskCoordFromAddrMicroTiled +* EgBasedLib::ComputeFmaskCoordFromAddrMicroTiled * * @brief * Compute (x,y,slice,sample,plane) coordinates from fmask address @@ -3765,7 +3770,7 @@ UINT_64 EgBasedAddrLib::ComputeFmaskAddrFromCoordMacroTiled( * **************************************************************************************************** */ -VOID EgBasedAddrLib::ComputeFmaskCoordFromAddrMicroTiled( +VOID EgBasedLib::ComputeFmaskCoordFromAddrMicroTiled( UINT_64 addr, ///< [in] byte address UINT_32 bitPosition,///< [in] bit position UINT_32 pitch, ///< [in] pitch in pixels @@ -3843,7 +3848,7 @@ VOID EgBasedAddrLib::ComputeFmaskCoordFromAddrMicroTiled( /** **************************************************************************************************** -* EgBasedAddrLib::ComputeFmaskCoordFromAddrMacroTiled +* EgBasedLib::ComputeFmaskCoordFromAddrMacroTiled * * @brief * Compute (x,y,slice,sample,plane) coordinates from @@ -3853,7 +3858,7 @@ VOID EgBasedAddrLib::ComputeFmaskCoordFromAddrMicroTiled( * **************************************************************************************************** */ -VOID EgBasedAddrLib::ComputeFmaskCoordFromAddrMacroTiled( +VOID EgBasedLib::ComputeFmaskCoordFromAddrMacroTiled( UINT_64 addr, ///< [in] byte address UINT_32 bitPosition,///< [in] bit position UINT_32 pitch, ///< [in] pitch in pixels @@ -3943,7 +3948,7 @@ VOID EgBasedAddrLib::ComputeFmaskCoordFromAddrMacroTiled( /** **************************************************************************************************** -* EgBasedAddrLib::DispatchComputeFmaskCoordFromAddr +* EgBasedLib::DispatchComputeFmaskCoordFromAddr * * @brief * Compute (x,y,slice,sample,plane) coordinates from @@ -3953,7 +3958,7 @@ VOID EgBasedAddrLib::ComputeFmaskCoordFromAddrMacroTiled( * **************************************************************************************************** */ -VOID EgBasedAddrLib::DispatchComputeFmaskCoordFromAddr( +VOID EgBasedLib::DispatchComputeFmaskCoordFromAddr( const ADDR_COMPUTE_FMASK_COORDFROMADDR_INPUT* pIn, ///< [in] input structure ADDR_COMPUTE_FMASK_COORDFROMADDR_OUTPUT* pOut ///< [out] output structure ) const @@ -4033,7 +4038,7 @@ VOID EgBasedAddrLib::DispatchComputeFmaskCoordFromAddr( /** **************************************************************************************************** -* EgBasedAddrLib::ComputeFmaskNumPlanesFromNumSamples +* EgBasedLib::ComputeFmaskNumPlanesFromNumSamples * * @brief * Compute fmask number of planes from number of samples @@ -4042,7 +4047,7 @@ VOID EgBasedAddrLib::DispatchComputeFmaskCoordFromAddr( * Number of planes **************************************************************************************************** */ -UINT_32 EgBasedAddrLib::ComputeFmaskNumPlanesFromNumSamples( +UINT_32 EgBasedLib::ComputeFmaskNumPlanesFromNumSamples( UINT_32 numSamples) ///< [in] number of samples { UINT_32 numPlanes; @@ -4078,7 +4083,7 @@ UINT_32 EgBasedAddrLib::ComputeFmaskNumPlanesFromNumSamples( /** **************************************************************************************************** -* EgBasedAddrLib::ComputeFmaskResolvedBppFromNumSamples +* EgBasedLib::ComputeFmaskResolvedBppFromNumSamples * * @brief * Compute resolved fmask effective bpp based on number of samples @@ -4087,7 +4092,7 @@ UINT_32 EgBasedAddrLib::ComputeFmaskNumPlanesFromNumSamples( * bpp **************************************************************************************************** */ -UINT_32 EgBasedAddrLib::ComputeFmaskResolvedBppFromNumSamples( +UINT_32 EgBasedLib::ComputeFmaskResolvedBppFromNumSamples( UINT_32 numSamples) ///< number of samples { UINT_32 bpp; @@ -4123,7 +4128,7 @@ UINT_32 EgBasedAddrLib::ComputeFmaskResolvedBppFromNumSamples( /** **************************************************************************************************** -* EgBasedAddrLib::IsTileInfoAllZero +* EgBasedLib::IsTileInfoAllZero * * @brief * Return TRUE if all field are zero @@ -4131,7 +4136,7 @@ UINT_32 EgBasedAddrLib::ComputeFmaskResolvedBppFromNumSamples( * Since NULL input is consider to be all zero **************************************************************************************************** */ -BOOL_32 EgBasedAddrLib::IsTileInfoAllZero( +BOOL_32 EgBasedLib::IsTileInfoAllZero( ADDR_TILEINFO* pTileInfo) { BOOL_32 allZero = TRUE; @@ -4155,7 +4160,7 @@ BOOL_32 EgBasedAddrLib::IsTileInfoAllZero( /** **************************************************************************************************** -* EgBasedAddrLib::HwlTileInfoEqual +* EgBasedLib::HwlTileInfoEqual * * @brief * Return TRUE if all field are equal @@ -4163,7 +4168,7 @@ BOOL_32 EgBasedAddrLib::IsTileInfoAllZero( * Only takes care of current HWL's data **************************************************************************************************** */ -BOOL_32 EgBasedAddrLib::HwlTileInfoEqual( +BOOL_32 EgBasedLib::HwlTileInfoEqual( const ADDR_TILEINFO* pLeft, ///<[in] Left compare operand const ADDR_TILEINFO* pRight ///<[in] Right compare operand ) const @@ -4184,14 +4189,14 @@ BOOL_32 EgBasedAddrLib::HwlTileInfoEqual( /** **************************************************************************************************** -* EgBasedAddrLib::HwlConvertTileInfoToHW +* EgBasedLib::HwlConvertTileInfoToHW * @brief -* Entry of EgBasedAddrLib ConvertTileInfoToHW +* Entry of EgBasedLib ConvertTileInfoToHW * @return * ADDR_E_RETURNCODE **************************************************************************************************** */ -ADDR_E_RETURNCODE EgBasedAddrLib::HwlConvertTileInfoToHW( +ADDR_E_RETURNCODE EgBasedLib::HwlConvertTileInfoToHW( const ADDR_CONVERT_TILEINFOTOHW_INPUT* pIn, ///< [in] input structure ADDR_CONVERT_TILEINFOTOHW_OUTPUT* pOut ///< [out] output structure ) const @@ -4452,14 +4457,14 @@ ADDR_E_RETURNCODE EgBasedAddrLib::HwlConvertTileInfoToHW( /** **************************************************************************************************** -* EgBasedAddrLib::HwlComputeSurfaceInfo +* EgBasedLib::HwlComputeSurfaceInfo * @brief -* Entry of EgBasedAddrLib ComputeSurfaceInfo +* Entry of EgBasedLib ComputeSurfaceInfo * @return * ADDR_E_RETURNCODE **************************************************************************************************** */ -ADDR_E_RETURNCODE EgBasedAddrLib::HwlComputeSurfaceInfo( +ADDR_E_RETURNCODE EgBasedLib::HwlComputeSurfaceInfo( const ADDR_COMPUTE_SURFACE_INFO_INPUT* pIn, ///< [in] input structure ADDR_COMPUTE_SURFACE_INFO_OUTPUT* pOut ///< [out] output structure ) const @@ -4539,14 +4544,14 @@ ADDR_E_RETURNCODE EgBasedAddrLib::HwlComputeSurfaceInfo( /** **************************************************************************************************** -* EgBasedAddrLib::HwlComputeSurfaceAddrFromCoord +* EgBasedLib::HwlComputeSurfaceAddrFromCoord * @brief -* Entry of EgBasedAddrLib ComputeSurfaceAddrFromCoord +* Entry of EgBasedLib ComputeSurfaceAddrFromCoord * @return * ADDR_E_RETURNCODE **************************************************************************************************** */ -ADDR_E_RETURNCODE EgBasedAddrLib::HwlComputeSurfaceAddrFromCoord( +ADDR_E_RETURNCODE EgBasedLib::HwlComputeSurfaceAddrFromCoord( const ADDR_COMPUTE_SURFACE_ADDRFROMCOORD_INPUT* pIn, ///< [in] input structure ADDR_COMPUTE_SURFACE_ADDRFROMCOORD_OUTPUT* pOut ///< [out] output structure ) const @@ -4572,14 +4577,14 @@ ADDR_E_RETURNCODE EgBasedAddrLib::HwlComputeSurfaceAddrFromCoord( /** **************************************************************************************************** -* EgBasedAddrLib::HwlComputeSurfaceCoordFromAddr +* EgBasedLib::HwlComputeSurfaceCoordFromAddr * @brief -* Entry of EgBasedAddrLib ComputeSurfaceCoordFromAddr +* Entry of EgBasedLib ComputeSurfaceCoordFromAddr * @return * ADDR_E_RETURNCODE **************************************************************************************************** */ -ADDR_E_RETURNCODE EgBasedAddrLib::HwlComputeSurfaceCoordFromAddr( +ADDR_E_RETURNCODE EgBasedLib::HwlComputeSurfaceCoordFromAddr( const ADDR_COMPUTE_SURFACE_COORDFROMADDR_INPUT* pIn, ///< [in] input structure ADDR_COMPUTE_SURFACE_COORDFROMADDR_OUTPUT* pOut ///< [out] output structure ) const @@ -4600,14 +4605,14 @@ ADDR_E_RETURNCODE EgBasedAddrLib::HwlComputeSurfaceCoordFromAddr( /** **************************************************************************************************** -* EgBasedAddrLib::HwlComputeSliceTileSwizzle +* EgBasedLib::HwlComputeSliceTileSwizzle * @brief -* Entry of EgBasedAddrLib ComputeSurfaceCoordFromAddr +* Entry of EgBasedLib ComputeSurfaceCoordFromAddr * @return * ADDR_E_RETURNCODE **************************************************************************************************** */ -ADDR_E_RETURNCODE EgBasedAddrLib::HwlComputeSliceTileSwizzle( +ADDR_E_RETURNCODE EgBasedLib::HwlComputeSliceTileSwizzle( const ADDR_COMPUTE_SLICESWIZZLE_INPUT* pIn, ///< [in] input structure ADDR_COMPUTE_SLICESWIZZLE_OUTPUT* pOut ///< [out] output structure ) const @@ -4633,7 +4638,7 @@ ADDR_E_RETURNCODE EgBasedAddrLib::HwlComputeSliceTileSwizzle( /** **************************************************************************************************** -* EgBasedAddrLib::HwlComputeHtileBpp +* EgBasedLib::HwlComputeHtileBpp * * @brief * Compute htile bpp @@ -4642,7 +4647,7 @@ ADDR_E_RETURNCODE EgBasedAddrLib::HwlComputeSliceTileSwizzle( * Htile bpp **************************************************************************************************** */ -UINT_32 EgBasedAddrLib::HwlComputeHtileBpp( +UINT_32 EgBasedLib::HwlComputeHtileBpp( BOOL_32 isWidth8, ///< [in] TRUE if block width is 8 BOOL_32 isHeight8 ///< [in] TRUE if block height is 8 ) const @@ -4654,7 +4659,7 @@ UINT_32 EgBasedAddrLib::HwlComputeHtileBpp( /** **************************************************************************************************** -* EgBasedAddrLib::HwlComputeHtileBaseAlign +* EgBasedLib::HwlComputeHtileBaseAlign * * @brief * Compute htile base alignment @@ -4663,7 +4668,7 @@ UINT_32 EgBasedAddrLib::HwlComputeHtileBpp( * Htile base alignment **************************************************************************************************** */ -UINT_32 EgBasedAddrLib::HwlComputeHtileBaseAlign( +UINT_32 EgBasedLib::HwlComputeHtileBaseAlign( BOOL_32 isTcCompatible, ///< [in] if TC compatible BOOL_32 isLinear, ///< [in] if it is linear mode ADDR_TILEINFO* pTileInfo ///< [in] Tile info @@ -4685,7 +4690,7 @@ UINT_32 EgBasedAddrLib::HwlComputeHtileBaseAlign( /** **************************************************************************************************** -* EgBasedAddrLib::HwlGetPitchAlignmentMicroTiled +* EgBasedLib::HwlGetPitchAlignmentMicroTiled * * @brief * Compute 1D tiled surface pitch alignment, calculation results are returned through @@ -4695,7 +4700,7 @@ UINT_32 EgBasedAddrLib::HwlComputeHtileBaseAlign( * pitch alignment **************************************************************************************************** */ -UINT_32 EgBasedAddrLib::HwlGetPitchAlignmentMicroTiled( +UINT_32 EgBasedLib::HwlGetPitchAlignmentMicroTiled( AddrTileMode tileMode, ///< [in] tile mode UINT_32 bpp, ///< [in] bits per pixel ADDR_SURFACE_FLAGS flags, ///< [in] surface flags @@ -4734,7 +4739,7 @@ UINT_32 EgBasedAddrLib::HwlGetPitchAlignmentMicroTiled( /** **************************************************************************************************** -* EgBasedAddrLib::HwlGetSizeAdjustmentMicroTiled +* EgBasedLib::HwlGetSizeAdjustmentMicroTiled * * @brief * Adjust 1D tiled surface pitch and slice size @@ -4743,7 +4748,7 @@ UINT_32 EgBasedAddrLib::HwlGetPitchAlignmentMicroTiled( * Logical slice size in bytes **************************************************************************************************** */ -UINT_64 EgBasedAddrLib::HwlGetSizeAdjustmentMicroTiled( +UINT_64 EgBasedLib::HwlGetSizeAdjustmentMicroTiled( UINT_32 thickness, ///< [in] thickness UINT_32 bpp, ///< [in] bits per pixel ADDR_SURFACE_FLAGS flags, ///< [in] surface flags @@ -4776,7 +4781,7 @@ UINT_64 EgBasedAddrLib::HwlGetSizeAdjustmentMicroTiled( /** **************************************************************************************************** -* EgBasedAddrLib::HwlStereoCheckRightOffsetPadding +* EgBasedLib::HwlStereoCheckRightOffsetPadding * * @brief * check if the height needs extra padding for stereo right eye offset, to avoid swizzling @@ -4786,7 +4791,7 @@ UINT_64 EgBasedAddrLib::HwlGetSizeAdjustmentMicroTiled( * **************************************************************************************************** */ -UINT_32 EgBasedAddrLib::HwlStereoCheckRightOffsetPadding( +UINT_32 EgBasedLib::HwlStereoCheckRightOffsetPadding( ADDR_TILEINFO* pTileInfo ///< Tiling info ) const { @@ -4809,3 +4814,5 @@ UINT_32 EgBasedAddrLib::HwlStereoCheckRightOffsetPadding( return stereoHeightAlign; } +} // V1 +} // Addr diff --git a/src/amd/addrlib/r800/egbaddrlib.h b/src/amd/addrlib/r800/egbaddrlib.h index 6bc6c53e874..c397cfc4f81 100644 --- a/src/amd/addrlib/r800/egbaddrlib.h +++ b/src/amd/addrlib/r800/egbaddrlib.h @@ -27,7 +27,7 @@ /** **************************************************************************************************** * @file egbaddrlib.h -* @brief Contains the EgBasedAddrLib class definition. +* @brief Contains the EgBasedLib class definition. **************************************************************************************************** */ @@ -36,7 +36,10 @@ #include "addrlib1.h" - +namespace Addr +{ +namespace V1 +{ /// Structures for functions struct CoordFromBankPipe { @@ -58,11 +61,11 @@ struct CoordFromBankPipe * @note Abstract class **************************************************************************************************** */ -class EgBasedAddrLib : public AddrLib1 +class EgBasedLib : public Lib { protected: - EgBasedAddrLib(const AddrClient* pClient); - virtual ~EgBasedAddrLib(); + EgBasedLib(const Client* pClient); + virtual ~EgBasedLib(); public: @@ -415,5 +418,8 @@ protected: UINT_32 m_bankInterleave; ///< Bank interleave, as a multiple of pipe interleave size }; +} // V1 +} // Addr + #endif diff --git a/src/amd/addrlib/r800/siaddrlib.cpp b/src/amd/addrlib/r800/siaddrlib.cpp index 964f2fd28cc..9d3f5aa9367 100644 --- a/src/amd/addrlib/r800/siaddrlib.cpp +++ b/src/amd/addrlib/r800/siaddrlib.cpp @@ -27,7 +27,7 @@ /** **************************************************************************************************** * @file siaddrlib.cpp -* @brief Contains the implementation for the SiAddrLib class. +* @brief Contains the implementation for the SiLib class. **************************************************************************************************** */ @@ -45,34 +45,40 @@ /////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////// +namespace Addr +{ /** **************************************************************************************************** -* AddrSiHwlInit +* SiHwlInit * * @brief -* Creates an SiAddrLib object. +* Creates an SiLib object. * * @return -* Returns an SiAddrLib object pointer. +* Returns an SiLib object pointer. **************************************************************************************************** */ -AddrLib* AddrSIHwlInit(const AddrClient* pClient) +Lib* SiHwlInit(const Client* pClient) { - return SiAddrLib::CreateObj(pClient); + return V1::SiLib::CreateObj(pClient); } +namespace V1 +{ + /** **************************************************************************************************** -* SiAddrLib::SiAddrLib +* SiLib::SiLib * * @brief * Constructor * **************************************************************************************************** */ -SiAddrLib::SiAddrLib(const AddrClient* pClient) : - EgBasedAddrLib(pClient), +SiLib::SiLib(const Client* pClient) + : + EgBasedLib(pClient), m_noOfEntries(0), m_numEquations(0) { @@ -82,19 +88,19 @@ SiAddrLib::SiAddrLib(const AddrClient* pClient) : /** **************************************************************************************************** -* SiAddrLib::~SiAddrLib +* SiLib::~SiLib * * @brief * Destructor **************************************************************************************************** */ -SiAddrLib::~SiAddrLib() +SiLib::~SiLib() { } /** **************************************************************************************************** -* SiAddrLib::HwlGetPipes +* SiLib::HwlGetPipes * * @brief * Get number pipes @@ -102,7 +108,7 @@ SiAddrLib::~SiAddrLib() * num pipes **************************************************************************************************** */ -UINT_32 SiAddrLib::HwlGetPipes( +UINT_32 SiLib::HwlGetPipes( const ADDR_TILEINFO* pTileInfo ///< [in] Tile info ) const { @@ -123,14 +129,14 @@ UINT_32 SiAddrLib::HwlGetPipes( /** **************************************************************************************************** -* SiAddrLib::GetPipePerSurf +* SiLib::GetPipePerSurf * @brief * get pipe num base on inputing tileinfo->pipeconfig * @return * pipe number **************************************************************************************************** */ -UINT_32 SiAddrLib::GetPipePerSurf( +UINT_32 SiLib::GetPipePerSurf( AddrPipeCfg pipeConfig ///< [in] pipe config ) const { @@ -169,7 +175,7 @@ UINT_32 SiAddrLib::GetPipePerSurf( /** **************************************************************************************************** -* SiAddrLib::ComputeBankEquation +* SiLib::ComputeBankEquation * * @brief * Compute bank equation @@ -178,7 +184,7 @@ UINT_32 SiAddrLib::GetPipePerSurf( * If equation can be computed **************************************************************************************************** */ -ADDR_E_RETURNCODE SiAddrLib::ComputeBankEquation( +ADDR_E_RETURNCODE SiLib::ComputeBankEquation( UINT_32 log2BytesPP, ///< [in] log2 of bytes per pixel UINT_32 threshX, ///< [in] threshold for x channel UINT_32 threshY, ///< [in] threshold for y channel @@ -303,7 +309,7 @@ ADDR_E_RETURNCODE SiAddrLib::ComputeBankEquation( /** **************************************************************************************************** -* SiAddrLib::ComputePipeEquation +* SiLib::ComputePipeEquation * * @brief * Compute pipe equation @@ -312,7 +318,7 @@ ADDR_E_RETURNCODE SiAddrLib::ComputeBankEquation( * If equation can be computed **************************************************************************************************** */ -ADDR_E_RETURNCODE SiAddrLib::ComputePipeEquation( +ADDR_E_RETURNCODE SiLib::ComputePipeEquation( UINT_32 log2BytesPP, ///< [in] Log2 of bytes per pixel UINT_32 threshX, ///< [in] Threshold for X channel UINT_32 threshY, ///< [in] Threshold for Y channel @@ -501,7 +507,7 @@ ADDR_E_RETURNCODE SiAddrLib::ComputePipeEquation( /** **************************************************************************************************** -* SiAddrLib::ComputePipeFromCoord +* SiLib::ComputePipeFromCoord * * @brief * Compute pipe number from coordinates @@ -509,7 +515,7 @@ ADDR_E_RETURNCODE SiAddrLib::ComputePipeEquation( * Pipe number **************************************************************************************************** */ -UINT_32 SiAddrLib::ComputePipeFromCoord( +UINT_32 SiLib::ComputePipeFromCoord( UINT_32 x, ///< [in] x coordinate UINT_32 y, ///< [in] y coordinate UINT_32 slice, ///< [in] slice index @@ -652,7 +658,7 @@ UINT_32 SiAddrLib::ComputePipeFromCoord( /** **************************************************************************************************** -* SiAddrLib::ComputeTileCoordFromPipeAndElemIdx +* SiLib::ComputeTileCoordFromPipeAndElemIdx * * @brief * Compute (x,y) of a tile within a macro tile from address @@ -660,7 +666,7 @@ UINT_32 SiAddrLib::ComputePipeFromCoord( * Pipe number **************************************************************************************************** */ -VOID SiAddrLib::ComputeTileCoordFromPipeAndElemIdx( +VOID SiLib::ComputeTileCoordFromPipeAndElemIdx( UINT_32 elemIdx, ///< [in] per pipe element index within a macro tile UINT_32 pipe, ///< [in] pipe index AddrPipeCfg pipeCfg, ///< [in] pipe config @@ -909,7 +915,7 @@ VOID SiAddrLib::ComputeTileCoordFromPipeAndElemIdx( /** **************************************************************************************************** -* SiAddrLib::TileCoordToMaskElementIndex +* SiLib::TileCoordToMaskElementIndex * * @brief * Compute element index from coordinates in tiles @@ -917,7 +923,7 @@ VOID SiAddrLib::ComputeTileCoordFromPipeAndElemIdx( * Element index **************************************************************************************************** */ -UINT_32 SiAddrLib::TileCoordToMaskElementIndex( +UINT_32 SiLib::TileCoordToMaskElementIndex( UINT_32 tx, ///< [in] x coord, in Tiles UINT_32 ty, ///< [in] y coord, in Tiles AddrPipeCfg pipeConfig, ///< [in] pipe config @@ -1045,7 +1051,7 @@ UINT_32 SiAddrLib::TileCoordToMaskElementIndex( /** **************************************************************************************************** -* SiAddrLib::HwlComputeTileDataWidthAndHeightLinear +* SiLib::HwlComputeTileDataWidthAndHeightLinear * * @brief * Compute the squared cache shape for per-tile data (CMASK and HTILE) for linear layout @@ -1057,7 +1063,7 @@ UINT_32 SiAddrLib::TileCoordToMaskElementIndex( * MacroWidth and macroHeight are measured in pixels **************************************************************************************************** */ -VOID SiAddrLib::HwlComputeTileDataWidthAndHeightLinear( +VOID SiLib::HwlComputeTileDataWidthAndHeightLinear( UINT_32* pMacroWidth, ///< [out] macro tile width UINT_32* pMacroHeight, ///< [out] macro tile height UINT_32 bpp, ///< [in] bits per pixel @@ -1091,7 +1097,7 @@ VOID SiAddrLib::HwlComputeTileDataWidthAndHeightLinear( /** **************************************************************************************************** -* SiAddrLib::HwlComputeHtileBytes +* SiLib::HwlComputeHtileBytes * * @brief * Compute htile size in bytes @@ -1100,7 +1106,7 @@ VOID SiAddrLib::HwlComputeTileDataWidthAndHeightLinear( * Htile size in bytes **************************************************************************************************** */ -UINT_64 SiAddrLib::HwlComputeHtileBytes( +UINT_64 SiLib::HwlComputeHtileBytes( UINT_32 pitch, ///< [in] pitch UINT_32 height, ///< [in] height UINT_32 bpp, ///< [in] bits per pixel @@ -1115,7 +1121,7 @@ UINT_64 SiAddrLib::HwlComputeHtileBytes( /** **************************************************************************************************** -* SiAddrLib::HwlComputeXmaskAddrFromCoord +* SiLib::HwlComputeXmaskAddrFromCoord * * @brief * Compute address from coordinates for htile/cmask @@ -1123,7 +1129,7 @@ UINT_64 SiAddrLib::HwlComputeHtileBytes( * Byte address **************************************************************************************************** */ -UINT_64 SiAddrLib::HwlComputeXmaskAddrFromCoord( +UINT_64 SiLib::HwlComputeXmaskAddrFromCoord( UINT_32 pitch, ///< [in] pitch UINT_32 height, ///< [in] height UINT_32 x, ///< [in] x coord @@ -1270,7 +1276,7 @@ UINT_64 SiAddrLib::HwlComputeXmaskAddrFromCoord( /** **************************************************************************************************** -* SiAddrLib::HwlComputeXmaskCoordFromAddr +* SiLib::HwlComputeXmaskCoordFromAddr * * @brief * Compute the coord from an address of a cmask/htile @@ -1282,7 +1288,7 @@ UINT_64 SiAddrLib::HwlComputeXmaskAddrFromCoord( * This method is reused by htile, so rename to Xmask **************************************************************************************************** */ -VOID SiAddrLib::HwlComputeXmaskCoordFromAddr( +VOID SiLib::HwlComputeXmaskCoordFromAddr( UINT_64 addr, ///< [in] address UINT_32 bitPosition, ///< [in] bitPosition in a byte UINT_32 pitch, ///< [in] pitch @@ -1476,14 +1482,14 @@ VOID SiAddrLib::HwlComputeXmaskCoordFromAddr( /** **************************************************************************************************** -* SiAddrLib::HwlGetPitchAlignmentLinear +* SiLib::HwlGetPitchAlignmentLinear * @brief * Get pitch alignment * @return * pitch alignment **************************************************************************************************** */ -UINT_32 SiAddrLib::HwlGetPitchAlignmentLinear( +UINT_32 SiLib::HwlGetPitchAlignmentLinear( UINT_32 bpp, ///< [in] bits per pixel ADDR_SURFACE_FLAGS flags ///< [in] surface flags ) const @@ -1506,7 +1512,7 @@ UINT_32 SiAddrLib::HwlGetPitchAlignmentLinear( /** **************************************************************************************************** -* SiAddrLib::HwlGetSizeAdjustmentLinear +* SiLib::HwlGetSizeAdjustmentLinear * * @brief * Adjust linear surface pitch and slice size @@ -1515,7 +1521,7 @@ UINT_32 SiAddrLib::HwlGetPitchAlignmentLinear( * Logical slice size in bytes **************************************************************************************************** */ -UINT_64 SiAddrLib::HwlGetSizeAdjustmentLinear( +UINT_64 SiLib::HwlGetSizeAdjustmentLinear( AddrTileMode tileMode, ///< [in] tile mode UINT_32 bpp, ///< [in] bits per pixel UINT_32 numSamples, ///< [in] number of samples @@ -1567,7 +1573,7 @@ UINT_64 SiAddrLib::HwlGetSizeAdjustmentLinear( /** **************************************************************************************************** -* SiAddrLib::HwlPreHandleBaseLvl3xPitch +* SiLib::HwlPreHandleBaseLvl3xPitch * * @brief * Pre-handler of 3x pitch (96 bit) adjustment @@ -1576,7 +1582,7 @@ UINT_64 SiAddrLib::HwlGetSizeAdjustmentLinear( * Expected pitch **************************************************************************************************** */ -UINT_32 SiAddrLib::HwlPreHandleBaseLvl3xPitch( +UINT_32 SiLib::HwlPreHandleBaseLvl3xPitch( const ADDR_COMPUTE_SURFACE_INFO_INPUT* pIn, ///< [in] input UINT_32 expPitch ///< [in] pitch ) const @@ -1587,7 +1593,7 @@ UINT_32 SiAddrLib::HwlPreHandleBaseLvl3xPitch( // do here if (pIn->flags.pow2Pad == FALSE) { - AddrLib1::HwlPreHandleBaseLvl3xPitch(pIn, expPitch); + Addr::V1::Lib::HwlPreHandleBaseLvl3xPitch(pIn, expPitch); } else { @@ -1599,7 +1605,7 @@ UINT_32 SiAddrLib::HwlPreHandleBaseLvl3xPitch( /** **************************************************************************************************** -* SiAddrLib::HwlPostHandleBaseLvl3xPitch +* SiLib::HwlPostHandleBaseLvl3xPitch * * @brief * Post-handler of 3x pitch adjustment @@ -1608,7 +1614,7 @@ UINT_32 SiAddrLib::HwlPreHandleBaseLvl3xPitch( * Expected pitch **************************************************************************************************** */ -UINT_32 SiAddrLib::HwlPostHandleBaseLvl3xPitch( +UINT_32 SiLib::HwlPostHandleBaseLvl3xPitch( const ADDR_COMPUTE_SURFACE_INFO_INPUT* pIn, ///< [in] input UINT_32 expPitch ///< [in] pitch ) const @@ -1620,7 +1626,7 @@ UINT_32 SiAddrLib::HwlPostHandleBaseLvl3xPitch( // From SI, the pitch is expanded 3x first, then padded to pow2, so no special handler here if (pIn->flags.pow2Pad == FALSE) { - AddrLib1::HwlPostHandleBaseLvl3xPitch(pIn, expPitch); + Addr::V1::Lib::HwlPostHandleBaseLvl3xPitch(pIn, expPitch); } return expPitch; @@ -1628,7 +1634,7 @@ UINT_32 SiAddrLib::HwlPostHandleBaseLvl3xPitch( /** **************************************************************************************************** -* SiAddrLib::HwlGetPitchAlignmentMicroTiled +* SiLib::HwlGetPitchAlignmentMicroTiled * * @brief * Compute 1D tiled surface pitch alignment @@ -1637,7 +1643,7 @@ UINT_32 SiAddrLib::HwlPostHandleBaseLvl3xPitch( * pitch alignment **************************************************************************************************** */ -UINT_32 SiAddrLib::HwlGetPitchAlignmentMicroTiled( +UINT_32 SiLib::HwlGetPitchAlignmentMicroTiled( AddrTileMode tileMode, ///< [in] tile mode UINT_32 bpp, ///< [in] bits per pixel ADDR_SURFACE_FLAGS flags, ///< [in] surface flags @@ -1648,7 +1654,7 @@ UINT_32 SiAddrLib::HwlGetPitchAlignmentMicroTiled( if (flags.qbStereo) { - pitchAlign = EgBasedAddrLib::HwlGetPitchAlignmentMicroTiled(tileMode,bpp,flags,numSamples); + pitchAlign = EgBasedLib::HwlGetPitchAlignmentMicroTiled(tileMode,bpp,flags,numSamples); } else { @@ -1660,7 +1666,7 @@ UINT_32 SiAddrLib::HwlGetPitchAlignmentMicroTiled( /** **************************************************************************************************** -* SiAddrLib::HwlGetSizeAdjustmentMicroTiled +* SiLib::HwlGetSizeAdjustmentMicroTiled * * @brief * Adjust 1D tiled surface pitch and slice size @@ -1669,7 +1675,7 @@ UINT_32 SiAddrLib::HwlGetPitchAlignmentMicroTiled( * Logical slice size in bytes **************************************************************************************************** */ -UINT_64 SiAddrLib::HwlGetSizeAdjustmentMicroTiled( +UINT_64 SiLib::HwlGetSizeAdjustmentMicroTiled( UINT_32 thickness, ///< [in] thickness UINT_32 bpp, ///< [in] bits per pixel ADDR_SURFACE_FLAGS flags, ///< [in] surface flags @@ -1740,19 +1746,19 @@ UINT_64 SiAddrLib::HwlGetSizeAdjustmentMicroTiled( /** **************************************************************************************************** -* SiAddrLib::HwlConvertChipFamily +* SiLib::HwlConvertChipFamily * * @brief -* Convert familyID defined in atiid.h to AddrChipFamily and set m_chipFamily/m_chipRevision +* Convert familyID defined in atiid.h to ChipFamily and set m_chipFamily/m_chipRevision * @return -* AddrChipFamily +* ChipFamily **************************************************************************************************** */ -AddrChipFamily SiAddrLib::HwlConvertChipFamily( +ChipFamily SiLib::HwlConvertChipFamily( UINT_32 uChipFamily, ///< [in] chip family defined in atiih.h UINT_32 uChipRevision) ///< [in] chip revision defined in "asic_family"_id.h { - AddrChipFamily family = ADDR_CHIP_FAMILY_SI; + ChipFamily family = ADDR_CHIP_FAMILY_SI; switch (uChipFamily) { @@ -1774,13 +1780,13 @@ AddrChipFamily SiAddrLib::HwlConvertChipFamily( /** **************************************************************************************************** -* SiAddrLib::HwlSetupTileInfo +* SiLib::HwlSetupTileInfo * * @brief * Setup default value of tile info for SI **************************************************************************************************** */ -VOID SiAddrLib::HwlSetupTileInfo( +VOID SiLib::HwlSetupTileInfo( AddrTileMode tileMode, ///< [in] Tile mode ADDR_SURFACE_FLAGS flags, ///< [in] Surface type flags UINT_32 bpp, ///< [in] Bits per pixel @@ -2097,7 +2103,7 @@ VOID SiAddrLib::HwlSetupTileInfo( /** **************************************************************************************************** -* SiAddrLib::DecodeGbRegs +* SiLib::DecodeGbRegs * * @brief * Decodes GB_ADDR_CONFIG and noOfBanks/noOfRanks @@ -2107,7 +2113,7 @@ VOID SiAddrLib::HwlSetupTileInfo( * **************************************************************************************************** */ -BOOL_32 SiAddrLib::DecodeGbRegs( +BOOL_32 SiLib::DecodeGbRegs( const ADDR_REGISTER_VALUE* pRegValue) ///< [in] create input { GB_ADDR_CONFIG reg; @@ -2186,7 +2192,7 @@ BOOL_32 SiAddrLib::DecodeGbRegs( /** **************************************************************************************************** -* SiAddrLib::HwlInitGlobalParams +* SiLib::HwlInitGlobalParams * * @brief * Initializes global parameters @@ -2196,7 +2202,7 @@ BOOL_32 SiAddrLib::DecodeGbRegs( * **************************************************************************************************** */ -BOOL_32 SiAddrLib::HwlInitGlobalParams( +BOOL_32 SiLib::HwlInitGlobalParams( const ADDR_CREATE_INPUT* pCreateIn) ///< [in] create input { BOOL_32 valid = TRUE; @@ -2235,21 +2241,21 @@ BOOL_32 SiAddrLib::HwlInitGlobalParams( /** **************************************************************************************************** -* SiAddrLib::HwlConvertTileInfoToHW +* SiLib::HwlConvertTileInfoToHW * @brief * Entry of si's ConvertTileInfoToHW * @return * ADDR_E_RETURNCODE **************************************************************************************************** */ -ADDR_E_RETURNCODE SiAddrLib::HwlConvertTileInfoToHW( +ADDR_E_RETURNCODE SiLib::HwlConvertTileInfoToHW( const ADDR_CONVERT_TILEINFOTOHW_INPUT* pIn, ///< [in] input structure ADDR_CONVERT_TILEINFOTOHW_OUTPUT* pOut ///< [out] output structure ) const { ADDR_E_RETURNCODE retCode = ADDR_OK; - retCode = EgBasedAddrLib::HwlConvertTileInfoToHW(pIn, pOut); + retCode = EgBasedLib::HwlConvertTileInfoToHW(pIn, pOut); if (retCode == ADDR_OK) { @@ -2277,7 +2283,7 @@ ADDR_E_RETURNCODE SiAddrLib::HwlConvertTileInfoToHW( /** **************************************************************************************************** -* SiAddrLib::HwlComputeXmaskCoordYFrom8Pipe +* SiLib::HwlComputeXmaskCoordYFrom8Pipe * * @brief * Compute the Y coord which will be added to Xmask Y @@ -2286,7 +2292,7 @@ ADDR_E_RETURNCODE SiAddrLib::HwlConvertTileInfoToHW( * Y coord **************************************************************************************************** */ -UINT_32 SiAddrLib::HwlComputeXmaskCoordYFrom8Pipe( +UINT_32 SiLib::HwlComputeXmaskCoordYFrom8Pipe( UINT_32 pipe, ///< [in] pipe id UINT_32 x ///< [in] tile coord x, which is original x coord / 8 ) const @@ -2300,7 +2306,7 @@ UINT_32 SiAddrLib::HwlComputeXmaskCoordYFrom8Pipe( /** **************************************************************************************************** -* SiAddrLib::HwlComputeSurfaceCoord2DFromBankPipe +* SiLib::HwlComputeSurfaceCoord2DFromBankPipe * * @brief * Compute surface x,y coordinates from bank/pipe info @@ -2308,7 +2314,7 @@ UINT_32 SiAddrLib::HwlComputeXmaskCoordYFrom8Pipe( * N/A **************************************************************************************************** */ -VOID SiAddrLib::HwlComputeSurfaceCoord2DFromBankPipe( +VOID SiLib::HwlComputeSurfaceCoord2DFromBankPipe( AddrTileMode tileMode, ///< [in] tile mode UINT_32* pX, ///< [in/out] x coordinate UINT_32* pY, ///< [in/out] y coordinate @@ -2465,7 +2471,7 @@ VOID SiAddrLib::HwlComputeSurfaceCoord2DFromBankPipe( /** **************************************************************************************************** -* SiAddrLib::HwlPreAdjustBank +* SiLib::HwlPreAdjustBank * * @brief * Adjust bank before calculating address acoording to bank/pipe @@ -2473,7 +2479,7 @@ VOID SiAddrLib::HwlComputeSurfaceCoord2DFromBankPipe( * Adjusted bank **************************************************************************************************** */ -UINT_32 SiAddrLib::HwlPreAdjustBank( +UINT_32 SiLib::HwlPreAdjustBank( UINT_32 tileX, ///< [in] x coordinate in unit of tile UINT_32 bank, ///< [in] bank ADDR_TILEINFO* pTileInfo ///< [in] tile info @@ -2497,7 +2503,7 @@ UINT_32 SiAddrLib::HwlPreAdjustBank( /** **************************************************************************************************** -* SiAddrLib::HwlComputeSurfaceInfo +* SiLib::HwlComputeSurfaceInfo * * @brief * Entry of si's ComputeSurfaceInfo @@ -2505,14 +2511,14 @@ UINT_32 SiAddrLib::HwlPreAdjustBank( * ADDR_E_RETURNCODE **************************************************************************************************** */ -ADDR_E_RETURNCODE SiAddrLib::HwlComputeSurfaceInfo( +ADDR_E_RETURNCODE SiLib::HwlComputeSurfaceInfo( const ADDR_COMPUTE_SURFACE_INFO_INPUT* pIn, ///< [in] input structure ADDR_COMPUTE_SURFACE_INFO_OUTPUT* pOut ///< [out] output structure ) const { pOut->tileIndex = pIn->tileIndex; - ADDR_E_RETURNCODE retCode = EgBasedAddrLib::HwlComputeSurfaceInfo(pIn, pOut); + ADDR_E_RETURNCODE retCode = EgBasedLib::HwlComputeSurfaceInfo(pIn, pOut); UINT_32 tileIndex = static_cast<UINT_32>(pOut->tileIndex); @@ -2541,14 +2547,14 @@ ADDR_E_RETURNCODE SiAddrLib::HwlComputeSurfaceInfo( /** **************************************************************************************************** -* SiAddrLib::HwlComputeMipLevel +* SiLib::HwlComputeMipLevel * @brief * Compute MipLevel info (including level 0) * @return * TRUE if HWL's handled **************************************************************************************************** */ -BOOL_32 SiAddrLib::HwlComputeMipLevel( +BOOL_32 SiLib::HwlComputeMipLevel( ADDR_COMPUTE_SURFACE_INFO_INPUT* pIn ///< [in/out] Input structure ) const { @@ -2558,7 +2564,7 @@ BOOL_32 SiAddrLib::HwlComputeMipLevel( // Note: Don't check expand 3x formats(96 bit) as the basePitch is not pow2 even if // we explicity set pow2Pad flag. The 3x base pitch is padded to pow2 but after being // divided by expandX factor (3) - to program texture pitch, the basePitch is never pow2. - if (AddrElemLib::IsExpand3x(pIn->format) == FALSE) + if (ElemLib::IsExpand3x(pIn->format) == FALSE) { // Sublevel pitches are generated from base level pitch instead of width on SI // If pow2Pad is 0, we don't assert - as this is not really used for a mip chain @@ -2579,7 +2585,7 @@ BOOL_32 SiAddrLib::HwlComputeMipLevel( /** **************************************************************************************************** -* SiAddrLib::HwlCheckLastMacroTiledLvl +* SiLib::HwlCheckLastMacroTiledLvl * * @brief * Sets pOut->last2DLevel to TRUE if it is @@ -2587,7 +2593,7 @@ BOOL_32 SiAddrLib::HwlComputeMipLevel( * **************************************************************************************************** */ -VOID SiAddrLib::HwlCheckLastMacroTiledLvl( +VOID SiLib::HwlCheckLastMacroTiledLvl( const ADDR_COMPUTE_SURFACE_INFO_INPUT* pIn, ///< [in] Input structure ADDR_COMPUTE_SURFACE_INFO_OUTPUT* pOut ///< [in/out] Output structure (used as input, too) ) const @@ -2622,7 +2628,7 @@ VOID SiAddrLib::HwlCheckLastMacroTiledLvl( nextHeight = pOut->height >> 1; // Special format such as FMT_1 and FMT_32_32_32 can be linear only so we consider block // compressed foramts - if (AddrElemLib::IsBlockCompressed(pIn->format)) + if (ElemLib::IsBlockCompressed(pIn->format)) { nextHeight = (nextHeight + 3) / 4; } @@ -2654,7 +2660,7 @@ VOID SiAddrLib::HwlCheckLastMacroTiledLvl( /** **************************************************************************************************** -* SiAddrLib::HwlDegradeThickTileMode +* SiLib::HwlDegradeThickTileMode * * @brief * Degrades valid tile mode for thick modes if needed @@ -2663,18 +2669,18 @@ VOID SiAddrLib::HwlCheckLastMacroTiledLvl( * Suitable tile mode **************************************************************************************************** */ -AddrTileMode SiAddrLib::HwlDegradeThickTileMode( +AddrTileMode SiLib::HwlDegradeThickTileMode( AddrTileMode baseTileMode, ///< [in] base tile mode UINT_32 numSlices, ///< [in] current number of slices UINT_32* pBytesPerTile ///< [in/out] pointer to bytes per slice ) const { - return EgBasedAddrLib::HwlDegradeThickTileMode(baseTileMode, numSlices, pBytesPerTile); + return EgBasedLib::HwlDegradeThickTileMode(baseTileMode, numSlices, pBytesPerTile); } /** **************************************************************************************************** -* SiAddrLib::HwlTileInfoEqual +* SiLib::HwlTileInfoEqual * * @brief * Return TRUE if all field are equal @@ -2682,7 +2688,7 @@ AddrTileMode SiAddrLib::HwlDegradeThickTileMode( * Only takes care of current HWL's data **************************************************************************************************** */ -BOOL_32 SiAddrLib::HwlTileInfoEqual( +BOOL_32 SiLib::HwlTileInfoEqual( const ADDR_TILEINFO* pLeft, ///<[in] Left compare operand const ADDR_TILEINFO* pRight ///<[in] Right compare operand ) const @@ -2691,7 +2697,7 @@ BOOL_32 SiAddrLib::HwlTileInfoEqual( if (pLeft->pipeConfig == pRight->pipeConfig) { - equal = EgBasedAddrLib::HwlTileInfoEqual(pLeft, pRight); + equal = EgBasedLib::HwlTileInfoEqual(pLeft, pRight); } return equal; @@ -2699,7 +2705,7 @@ BOOL_32 SiAddrLib::HwlTileInfoEqual( /** **************************************************************************************************** -* SiAddrLib::GetTileSettings +* SiLib::GetTileSettings * * @brief * Get tile setting infos by index. @@ -2707,7 +2713,7 @@ BOOL_32 SiAddrLib::HwlTileInfoEqual( * Tile setting info. **************************************************************************************************** */ -const AddrTileConfig* SiAddrLib::GetTileSetting( +const TileConfig* SiLib::GetTileSetting( UINT_32 index ///< [in] Tile index ) const { @@ -2717,7 +2723,7 @@ const AddrTileConfig* SiAddrLib::GetTileSetting( /** **************************************************************************************************** -* SiAddrLib::HwlPostCheckTileIndex +* SiLib::HwlPostCheckTileIndex * * @brief * Map a tile setting to index if curIndex is invalid, otherwise check if curIndex matches @@ -2726,7 +2732,7 @@ const AddrTileConfig* SiAddrLib::GetTileSetting( * Tile index. **************************************************************************************************** */ -INT_32 SiAddrLib::HwlPostCheckTileIndex( +INT_32 SiLib::HwlPostCheckTileIndex( const ADDR_TILEINFO* pInfo, ///< [in] Tile Info AddrTileMode mode, ///< [in] Tile mode AddrTileType type, ///< [in] Tile type @@ -2796,7 +2802,7 @@ INT_32 SiAddrLib::HwlPostCheckTileIndex( /** **************************************************************************************************** -* SiAddrLib::HwlSetupTileCfg +* SiLib::HwlSetupTileCfg * * @brief * Map tile index to tile setting. @@ -2804,7 +2810,7 @@ INT_32 SiAddrLib::HwlPostCheckTileIndex( * ADDR_E_RETURNCODE **************************************************************************************************** */ -ADDR_E_RETURNCODE SiAddrLib::HwlSetupTileCfg( +ADDR_E_RETURNCODE SiLib::HwlSetupTileCfg( UINT_32 bpp, ///< [in] Bits per pixel INT_32 index, ///< [in] Tile index INT_32 macroModeIndex, ///< [in] Index in macro tile mode table(CI) @@ -2846,7 +2852,7 @@ ADDR_E_RETURNCODE SiAddrLib::HwlSetupTileCfg( } else { - const AddrTileConfig* pCfgTable = GetTileSetting(index); + const TileConfig* pCfgTable = GetTileSetting(index); if (pInfo) { @@ -2877,17 +2883,17 @@ ADDR_E_RETURNCODE SiAddrLib::HwlSetupTileCfg( /** **************************************************************************************************** -* SiAddrLib::ReadGbTileMode +* SiLib::ReadGbTileMode * * @brief -* Convert GB_TILE_MODE HW value to ADDR_TILE_CONFIG. +* Convert GB_TILE_MODE HW value to TileConfig. * @return * NA. **************************************************************************************************** */ -VOID SiAddrLib::ReadGbTileMode( - UINT_32 regValue, ///< [in] GB_TILE_MODE register - AddrTileConfig* pCfg ///< [out] output structure +VOID SiLib::ReadGbTileMode( + UINT_32 regValue, ///< [in] GB_TILE_MODE register + TileConfig* pCfg ///< [out] output structure ) const { GB_TILE_MODE gbTileMode; @@ -2917,7 +2923,7 @@ VOID SiAddrLib::ReadGbTileMode( /** **************************************************************************************************** -* SiAddrLib::InitTileSettingTable +* SiLib::InitTileSettingTable * * @brief * Initialize the ADDR_TILE_CONFIG table. @@ -2925,7 +2931,7 @@ VOID SiAddrLib::ReadGbTileMode( * TRUE if tile table is correctly initialized **************************************************************************************************** */ -BOOL_32 SiAddrLib::InitTileSettingTable( +BOOL_32 SiLib::InitTileSettingTable( const UINT_32* pCfg, ///< [in] Pointer to table of tile configs UINT_32 noOfEntries ///< [in] Numbe of entries in the table above ) @@ -2968,7 +2974,7 @@ BOOL_32 SiAddrLib::InitTileSettingTable( /** **************************************************************************************************** -* SiAddrLib::HwlGetTileIndex +* SiLib::HwlGetTileIndex * * @brief * Return the virtual/real index for given mode/type/info @@ -2976,7 +2982,7 @@ BOOL_32 SiAddrLib::InitTileSettingTable( * ADDR_OK if successful. **************************************************************************************************** */ -ADDR_E_RETURNCODE SiAddrLib::HwlGetTileIndex( +ADDR_E_RETURNCODE SiLib::HwlGetTileIndex( const ADDR_GET_TILEINDEX_INPUT* pIn, ADDR_GET_TILEINDEX_OUTPUT* pOut) const { @@ -2989,7 +2995,7 @@ ADDR_E_RETURNCODE SiAddrLib::HwlGetTileIndex( /** **************************************************************************************************** -* SiAddrLib::HwlFmaskPreThunkSurfInfo +* SiLib::HwlFmaskPreThunkSurfInfo * * @brief * Some preparation before thunking a ComputeSurfaceInfo call for Fmask @@ -2997,7 +3003,7 @@ ADDR_E_RETURNCODE SiAddrLib::HwlGetTileIndex( * ADDR_E_RETURNCODE **************************************************************************************************** */ -VOID SiAddrLib::HwlFmaskPreThunkSurfInfo( +VOID SiLib::HwlFmaskPreThunkSurfInfo( const ADDR_COMPUTE_FMASK_INFO_INPUT* pFmaskIn, ///< [in] Input of fmask info const ADDR_COMPUTE_FMASK_INFO_OUTPUT* pFmaskOut, ///< [in] Output of fmask info ADDR_COMPUTE_SURFACE_INFO_INPUT* pSurfIn, ///< [out] Input of thunked surface info @@ -3009,7 +3015,7 @@ VOID SiAddrLib::HwlFmaskPreThunkSurfInfo( /** **************************************************************************************************** -* SiAddrLib::HwlFmaskPostThunkSurfInfo +* SiLib::HwlFmaskPostThunkSurfInfo * * @brief * Copy hwl extra field after calling thunked ComputeSurfaceInfo @@ -3017,7 +3023,7 @@ VOID SiAddrLib::HwlFmaskPreThunkSurfInfo( * ADDR_E_RETURNCODE **************************************************************************************************** */ -VOID SiAddrLib::HwlFmaskPostThunkSurfInfo( +VOID SiLib::HwlFmaskPostThunkSurfInfo( const ADDR_COMPUTE_SURFACE_INFO_OUTPUT* pSurfOut, ///< [in] Output of surface info ADDR_COMPUTE_FMASK_INFO_OUTPUT* pFmaskOut ///< [out] Output of fmask info ) const @@ -3028,14 +3034,14 @@ VOID SiAddrLib::HwlFmaskPostThunkSurfInfo( /** **************************************************************************************************** -* SiAddrLib::HwlComputeFmaskBits +* SiLib::HwlComputeFmaskBits * @brief * Computes fmask bits * @return * Fmask bits **************************************************************************************************** */ -UINT_32 SiAddrLib::HwlComputeFmaskBits( +UINT_32 SiLib::HwlComputeFmaskBits( const ADDR_COMPUTE_FMASK_INFO_INPUT* pIn, UINT_32* pNumSamples ) const @@ -3129,7 +3135,7 @@ UINT_32 SiAddrLib::HwlComputeFmaskBits( /** **************************************************************************************************** -* SiAddrLib::HwlOverrideTileMode +* SiLib::HwlOverrideTileMode * * @brief * Override tile modes (for PRT only, avoid client passes in an invalid PRT mode for SI. @@ -3139,7 +3145,7 @@ UINT_32 SiAddrLib::HwlComputeFmaskBits( * **************************************************************************************************** */ -void SiAddrLib::HwlOverrideTileMode( +VOID SiLib::HwlOverrideTileMode( ADDR_COMPUTE_SURFACE_INFO_INPUT* pInOut ///< [in/out] input output structure ) const { @@ -3199,7 +3205,7 @@ void SiAddrLib::HwlOverrideTileMode( /** **************************************************************************************************** -* SiAddrLib::HwlSelectTileMode +* SiLib::HwlSelectTileMode * * @brief * Select tile modes. @@ -3209,7 +3215,7 @@ void SiAddrLib::HwlOverrideTileMode( * **************************************************************************************************** */ -VOID SiAddrLib::HwlSelectTileMode( +VOID SiLib::HwlSelectTileMode( ADDR_COMPUTE_SURFACE_INFO_INPUT* pInOut ///< [in/out] input output structure ) const { @@ -3275,7 +3281,7 @@ VOID SiAddrLib::HwlSelectTileMode( /** **************************************************************************************************** -* SiAddrLib::HwlGetMaxAlignments +* SiLib::HwlGetMaxAlignments * * @brief * Gets maximum alignments @@ -3283,7 +3289,7 @@ VOID SiAddrLib::HwlSelectTileMode( * ADDR_E_RETURNCODE **************************************************************************************************** */ -ADDR_E_RETURNCODE SiAddrLib::HwlGetMaxAlignments( +ADDR_E_RETURNCODE SiLib::HwlGetMaxAlignments( ADDR_GET_MAX_ALINGMENTS_OUTPUT* pOut ///< [out] output structure ) const { @@ -3321,7 +3327,7 @@ ADDR_E_RETURNCODE SiAddrLib::HwlGetMaxAlignments( /** **************************************************************************************************** -* SiAddrLib::InitEquationTable +* SiLib::InitEquationTable * * @brief * Initialize Equation table. @@ -3330,7 +3336,7 @@ ADDR_E_RETURNCODE SiAddrLib::HwlGetMaxAlignments( * N/A **************************************************************************************************** */ -VOID SiAddrLib::InitEquationTable() +VOID SiLib::InitEquationTable() { ADDR_EQUATION_KEY equationKeyTable[EquationTableSize]; memset(equationKeyTable, 0, sizeof(equationKeyTable)); @@ -3354,7 +3360,7 @@ VOID SiAddrLib::InitEquationTable() { UINT_32 equationIndex = ADDR_INVALID_EQUATION_INDEX; - AddrTileConfig tileConfig = m_tileTable[tileIndex]; + TileConfig tileConfig = m_tileTable[tileIndex]; ADDR_SURFACE_FLAGS flags = {{0}}; @@ -3492,7 +3498,7 @@ VOID SiAddrLib::InitEquationTable() /** **************************************************************************************************** -* SiAddrLib::IsEquationSupported +* SiLib::IsEquationSupported * * @brief * Check if it is supported for given bpp and tile config to generate a equation. @@ -3501,9 +3507,9 @@ VOID SiAddrLib::InitEquationTable() * TRUE if supported **************************************************************************************************** */ -BOOL_32 SiAddrLib::IsEquationSupported( +BOOL_32 SiLib::IsEquationSupported( UINT_32 bpp, ///< Bits per pixel - AddrTileConfig tileConfig, ///< Tile config + TileConfig tileConfig, ///< Tile config INT_32 tileIndex ///< Tile index ) const { @@ -3540,7 +3546,7 @@ BOOL_32 SiAddrLib::IsEquationSupported( if ((supported == TRUE) && (m_chipFamily == ADDR_CHIP_FAMILY_SI)) { - // Please refer to SiAddrLib::HwlSetupTileInfo for PRT tile index selecting + // Please refer to SiLib::HwlSetupTileInfo for PRT tile index selecting // Tile index 3, 6, 21-25 are for PRT single sample if (tileIndex == 3) { @@ -3564,4 +3570,5 @@ BOOL_32 SiAddrLib::IsEquationSupported( return supported; } - +} // V1 +} // Addr diff --git a/src/amd/addrlib/r800/siaddrlib.h b/src/amd/addrlib/r800/siaddrlib.h index ef24dfbe560..b63d7e878dc 100644 --- a/src/amd/addrlib/r800/siaddrlib.h +++ b/src/amd/addrlib/r800/siaddrlib.h @@ -27,7 +27,7 @@ /** **************************************************************************************************** * @file siaddrlib.h -* @brief Contains the R800AddrLib class definition. +* @brief Contains the R800Lib class definition. **************************************************************************************************** */ @@ -37,12 +37,17 @@ #include "addrlib1.h" #include "egbaddrlib.h" +namespace Addr +{ +namespace V1 +{ + /** **************************************************************************************************** * @brief Describes the information in tile mode table **************************************************************************************************** */ -struct AddrTileConfig +struct TileConfig { AddrTileMode mode; AddrTileType type; @@ -74,18 +79,18 @@ struct SIChipSettings * function set. **************************************************************************************************** */ -class SiAddrLib : public EgBasedAddrLib +class SiLib : public EgBasedLib { public: - /// Creates SIAddrLib object - static AddrLib* CreateObj(const AddrClient* pClient) + /// Creates SiLib object + static Addr::Lib* CreateObj(const Client* pClient) { - return new(pClient) SiAddrLib(pClient); + return new(pClient) SiLib(pClient); } protected: - SiAddrLib(const AddrClient* pClient); - virtual ~SiAddrLib(); + SiLib(const Client* pClient); + virtual ~SiLib(); // Hwl interface - defined in AddrLib1 virtual ADDR_E_RETURNCODE HwlComputeSurfaceInfo( @@ -113,7 +118,7 @@ protected: virtual BOOL_32 HwlComputeMipLevel( ADDR_COMPUTE_SURFACE_INFO_INPUT* pIn) const; - virtual AddrChipFamily HwlConvertChipFamily( + virtual ChipFamily HwlConvertChipFamily( UINT_32 uChipFamily, UINT_32 uChipRevision); virtual BOOL_32 HwlInitGlobalParams( @@ -157,7 +162,7 @@ protected: virtual UINT_32 HwlComputeXmaskCoordYFrom8Pipe( UINT_32 pipe, UINT_32 x) const; - // Sub-hwl interface - defined in EgBasedAddrLib + // Sub-hwl interface - defined in EgBasedLib virtual VOID HwlSetupTileInfo( AddrTileMode tileMode, ADDR_SURFACE_FLAGS flags, UINT_32 bpp, UINT_32 pitch, UINT_32 height, UINT_32 numSamples, @@ -246,7 +251,7 @@ protected: // Check if it is supported for given bpp and tile config to generate an equation BOOL_32 IsEquationSupported( - UINT_32 bpp, AddrTileConfig tileConfig, INT_32 tileIndex) const; + UINT_32 bpp, TileConfig tileConfig, INT_32 tileIndex) const; // Protected non-virtual functions VOID ComputeTileCoordFromPipeAndElemIdx( @@ -260,14 +265,14 @@ protected: BOOL_32 DecodeGbRegs( const ADDR_REGISTER_VALUE* pRegValue); - const AddrTileConfig* GetTileSetting( + const TileConfig* GetTileSetting( UINT_32 index) const; // Initialize equation table VOID InitEquationTable(); static const UINT_32 TileTableSize = 32; - AddrTileConfig m_tileTable[TileTableSize]; + TileConfig m_tileTable[TileTableSize]; UINT_32 m_noOfEntries; // Max number of bpp (8bpp/16bpp/32bpp/64bpp/128bpp) @@ -288,13 +293,14 @@ private: UINT_32 GetPipePerSurf(AddrPipeCfg pipeConfig) const; - VOID ReadGbTileMode( - UINT_32 regValue, AddrTileConfig* pCfg) const; - BOOL_32 InitTileSettingTable( - const UINT_32 *pSetting, UINT_32 noOfEntries); + VOID ReadGbTileMode(UINT_32 regValue, TileConfig* pCfg) const; + BOOL_32 InitTileSettingTable(const UINT_32 *pSetting, UINT_32 noOfEntries); SIChipSettings m_settings; }; +} // V1 +} // Addr + #endif |