From 33c25655c1f88657e69547dd4c3a43864ec84598 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Nicolai=20H=C3=A4hnle?= Date: Wed, 20 Jul 2016 10:34:41 +0200 Subject: [PATCH] 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. --- src/amd/addrlib/addrinterface.h | 5 ++++- src/amd/addrlib/r800/siaddrlib.cpp | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) 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; } /** -- 2.30.2