summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolai Hähnle <[email protected]>2016-07-20 10:34:41 +0200
committerMarek Olšák <[email protected]>2017-03-30 14:44:33 +0200
commit33c25655c1f88657e69547dd4c3a43864ec84598 (patch)
treeb362332dcdf1fb7561857f402616a23333c80e0e
parentfa906a888ba908611086e5e80a19bbb99618945d (diff)
amdgpu/addrlib: Add a new output flag to notify client that the returned tile index is for PRT on SI
If this flag is set for mip0, client should set prt flag for sub mips, so that address lib can select the correct tile index for sub mips.
-rw-r--r--src/amd/addrlib/addrinterface.h5
-rw-r--r--src/amd/addrlib/r800/siaddrlib.cpp1
2 files changed, 5 insertions, 1 deletions
diff --git a/src/amd/addrlib/addrinterface.h b/src/amd/addrlib/addrinterface.h
index 2a61b2b33f2..8506a45ae90 100644
--- a/src/amd/addrlib/addrinterface.h
+++ b/src/amd/addrlib/addrinterface.h
@@ -619,7 +619,10 @@ typedef struct _ADDR_COMPUTE_SURFACE_INFO_OUTPUT
///< Only meaningful when create flag checkLast2DLevel is set
UINT_32 tcCompatible : 1; ///< If the surface can be shader compatible
UINT_32 dccUnsupport : 1; ///< If the surface can support DCC compressed rendering
- UINT_32 reserved :29; ///< Reserved bits
+ UINT_32 prtTileIndex : 1; ///< SI only, indicate the returned tile index is for PRT
+ ///< If address lib return true for mip 0, client should set prt flag
+ ///< for child mips in subsequent compute surface info calls
+ UINT_32 reserved :28; ///< Reserved bits
};
UINT_32 equationIndex; ///< Equation index in the equation table;
diff --git a/src/amd/addrlib/r800/siaddrlib.cpp b/src/amd/addrlib/r800/siaddrlib.cpp
index d3e94868dea..d358f0d10b2 100644
--- a/src/amd/addrlib/r800/siaddrlib.cpp
+++ b/src/amd/addrlib/r800/siaddrlib.cpp
@@ -2231,6 +2231,7 @@ VOID SiLib::HwlSetupTileInfo(
}
pOut->tileIndex = index;
+ pOut->prtTileIndex = flags.prt;
}
/**