[Mesa-dev] [PATCH 045/140] amdgpu/addrlib: do some tile mode conversions to display surface
Marek Olšák
maraeo at gmail.com
Mon Mar 20 22:42:55 UTC 2017
From: Frans Gu <frans.gu at amd.com>
---
src/amd/addrlib/core/addrlib1.cpp | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/amd/addrlib/core/addrlib1.cpp b/src/amd/addrlib/core/addrlib1.cpp
index 516229a..9cdc459 100644
--- a/src/amd/addrlib/core/addrlib1.cpp
+++ b/src/amd/addrlib/core/addrlib1.cpp
@@ -3557,21 +3557,20 @@ VOID Lib::OptimizeTileMode(
) const
{
AddrTileMode tileMode = pInOut->tileMode;
BOOL_32 doOpt = (pInOut->flags.opt4Space == TRUE) ||
(pInOut->flags.minimizeAlignment == TRUE) ||
(pInOut->maxBaseAlign != 0);
// Optimization can only be done on level 0 and samples <= 1
if ((doOpt == TRUE) &&
(pInOut->mipLevel == 0) &&
- (pInOut->flags.display == FALSE) &&
(IsPrtTileMode(tileMode) == FALSE) &&
(pInOut->flags.prt == FALSE))
{
UINT_32 width = pInOut->width;
UINT_32 height = pInOut->height;
UINT_32 thickness = Thickness(tileMode);
BOOL_32 convertToPrt = FALSE;
BOOL_32 macroTiledOK = TRUE;
UINT_32 macroWidthAlign = 0;
UINT_32 macroHeightAlign = 0;
@@ -3580,21 +3579,23 @@ VOID Lib::OptimizeTileMode(
if (IsMacroTiled(tileMode))
{
macroTiledOK = HwlGetAlignmentInfoMacroTiled(pInOut,
¯oWidthAlign,
¯oHeightAlign,
¯oSizeAlign);
}
if (macroTiledOK)
{
- if ((pInOut->flags.opt4Space == TRUE) && (pInOut->numSamples <= 1))
+ if ((pInOut->flags.display == FALSE) &&
+ (pInOut->flags.opt4Space == TRUE) &&
+ (pInOut->numSamples <= 1))
{
// Check if linear mode is optimal
if ((pInOut->height == 1) &&
(IsLinear(tileMode) == FALSE) &&
(ElemLib::IsBlockCompressed(pInOut->format) == FALSE) &&
(pInOut->flags.depth == FALSE) &&
(pInOut->flags.stencil == FALSE) &&
(m_configFlags.disableLinearOpt == FALSE) &&
(pInOut->flags.disableLinearOpt == FALSE))
{
--
2.7.4
More information about the mesa-dev
mailing list