amd/addrlib: second update for Vega10 + bug fixes
Highlights: - Display needs tiled pitch alignment to be at least 32 pixels - Implement Addr2ComputeDccAddrFromCoord(). - Macro-pixel packed formats don't support Z swizzle modes - Pad pitch and base alignment of PRT + TEX1D to 64KB. - Fix support for multimedia formats - Fix a case "PRT" entries are not selected on SI. - Fix wrong upper bits in equations for 3D resource. - We can't support 2d array slice rotation in gfx8 swizzle pattern - Set base alignment for PRT + non-xor swizzle mode resource to 64KB. - Bug workaround for Z16 4x/8x and Z32 2x/4x/8x MSAA depth texture - Add stereo support - Optimize swizzle mode selection - Report pitch and height in pixels for each mip - Adjust bpp/expandX for format ADDR_FMT_GB_GR/ADDR_FMT_BG_RG - Correct tcCompatible flag output for mipmap surface - Other fixes and cleanups Acked-by: Alex Deucher <alexander.deucher@amd.com> Acked-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
This commit is contained in:
@@ -1527,6 +1527,38 @@ ADDR_E_RETURNCODE ADDR_API Addr2ComputeDccInfo(
|
||||
return returnCode;
|
||||
}
|
||||
|
||||
/**
|
||||
****************************************************************************************************
|
||||
* Addr2ComputeDccAddrFromCoord
|
||||
*
|
||||
* @brief
|
||||
* Compute DCC key address according to coordinates
|
||||
*
|
||||
* @return
|
||||
* ADDR_OK if successful, otherwise an error code of ADDR_E_RETURNCODE
|
||||
****************************************************************************************************
|
||||
*/
|
||||
ADDR_E_RETURNCODE ADDR_API Addr2ComputeDccAddrFromCoord(
|
||||
ADDR_HANDLE hLib, ///< address lib handle
|
||||
const ADDR2_COMPUTE_DCC_ADDRFROMCOORD_INPUT* pIn, ///< [in] Dcc info and coordinates
|
||||
ADDR2_COMPUTE_DCC_ADDRFROMCOORD_OUTPUT* pOut) ///< [out] Dcc address
|
||||
{
|
||||
V2::Lib* pLib = V2::Lib::GetLib(hLib);
|
||||
|
||||
ADDR_E_RETURNCODE returnCode = ADDR_OK;
|
||||
|
||||
if (pLib != NULL)
|
||||
{
|
||||
returnCode = pLib->ComputeDccAddrFromCoord(pIn, pOut);
|
||||
}
|
||||
else
|
||||
{
|
||||
returnCode = ADDR_ERROR;
|
||||
}
|
||||
|
||||
return returnCode;
|
||||
}
|
||||
|
||||
/**
|
||||
****************************************************************************************************
|
||||
* Addr2ComputePipeBankXor
|
||||
@@ -1556,6 +1588,64 @@ ADDR_E_RETURNCODE ADDR_API Addr2ComputePipeBankXor(
|
||||
return returnCode;
|
||||
}
|
||||
|
||||
/**
|
||||
****************************************************************************************************
|
||||
* Addr2ComputeSlicePipeBankXor
|
||||
*
|
||||
* @brief
|
||||
* Calculate slice pipe bank xor value based on base pipe bank xor and slice id.
|
||||
****************************************************************************************************
|
||||
*/
|
||||
ADDR_E_RETURNCODE ADDR_API Addr2ComputeSlicePipeBankXor(
|
||||
ADDR_HANDLE hLib, ///< handle of addrlib
|
||||
const ADDR2_COMPUTE_SLICE_PIPEBANKXOR_INPUT* pIn, ///< [in] input
|
||||
ADDR2_COMPUTE_SLICE_PIPEBANKXOR_OUTPUT* pOut) ///< [out] output
|
||||
{
|
||||
ADDR_E_RETURNCODE returnCode;
|
||||
|
||||
V2::Lib* pLib = V2::Lib::GetLib(hLib);
|
||||
|
||||
if (pLib != NULL)
|
||||
{
|
||||
returnCode = pLib->ComputeSlicePipeBankXor(pIn, pOut);
|
||||
}
|
||||
else
|
||||
{
|
||||
returnCode = ADDR_ERROR;
|
||||
}
|
||||
|
||||
return returnCode;
|
||||
}
|
||||
|
||||
/**
|
||||
****************************************************************************************************
|
||||
* Addr2ComputeSubResourceOffsetForSwizzlePattern
|
||||
*
|
||||
* @brief
|
||||
* Calculate sub resource offset for swizzle pattern.
|
||||
****************************************************************************************************
|
||||
*/
|
||||
ADDR_E_RETURNCODE ADDR_API Addr2ComputeSubResourceOffsetForSwizzlePattern(
|
||||
ADDR_HANDLE hLib, ///< handle of addrlib
|
||||
const ADDR2_COMPUTE_SUBRESOURCE_OFFSET_FORSWIZZLEPATTERN_INPUT* pIn, ///< [in] input
|
||||
ADDR2_COMPUTE_SUBRESOURCE_OFFSET_FORSWIZZLEPATTERN_OUTPUT* pOut) ///< [out] output
|
||||
{
|
||||
ADDR_E_RETURNCODE returnCode;
|
||||
|
||||
V2::Lib* pLib = V2::Lib::GetLib(hLib);
|
||||
|
||||
if (pLib != NULL)
|
||||
{
|
||||
returnCode = pLib->ComputeSubResourceOffsetForSwizzlePattern(pIn, pOut);
|
||||
}
|
||||
else
|
||||
{
|
||||
returnCode = ADDR_ERROR;
|
||||
}
|
||||
|
||||
return returnCode;
|
||||
}
|
||||
|
||||
/**
|
||||
****************************************************************************************************
|
||||
* Addr2GetPreferredSurfaceSetting
|
||||
|
||||
Reference in New Issue
Block a user