mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 00:00:11 +01:00
amdgpu/addrlib: Fix the issue that tcCompatible HTILE slice size is not calculated correctly
This commit is contained in:
parent
33c25655c1
commit
48bf5d0800
2 changed files with 18 additions and 0 deletions
|
|
@ -906,6 +906,8 @@ typedef struct _ADDR_COMPUTE_HTILE_INFO_OUTPUT
|
|||
UINT_32 macroWidth; ///< Macro width in pixels, actually squared cache shape
|
||||
UINT_32 macroHeight; ///< Macro height in pixels
|
||||
UINT_64 sliceSize; ///< Slice size, in bytes.
|
||||
BOOL_32 sliceInterleaved; ///< Flag to indicate if different slice's htile is interleaved
|
||||
/// Compute engine clear can't be used if htile is interleaved
|
||||
} ADDR_COMPUTE_HTILE_INFO_OUTPUT;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1295,6 +1295,22 @@ ADDR_E_RETURNCODE Lib::ComputeHtileInfo(
|
|||
&pOut->macroHeight,
|
||||
&pOut->sliceSize,
|
||||
&pOut->baseAlign);
|
||||
|
||||
if (pIn->flags.tcCompatible && (pIn->numSlices > 1))
|
||||
{
|
||||
pOut->sliceSize = pIn->pitch * pIn->height * 4 / (8 * 8);
|
||||
|
||||
const UINT_32 align = HwlGetPipes(pIn->pTileInfo) * pIn->pTileInfo->banks * m_pipeInterleaveBytes;
|
||||
|
||||
if ((pOut->sliceSize % align) == 0)
|
||||
{
|
||||
pOut->sliceInterleaved = FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
pOut->sliceInterleaved = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue