diff options
author | Xavi Zhang <[email protected]> | 2016-03-01 03:40:15 -0500 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-03-30 14:44:33 +0200 |
commit | fa906a888ba908611086e5e80a19bbb99618945d (patch) | |
tree | a747ce21d0dafddb65d9b2c7e27890bf86b95a71 /src/amd/addrlib/addrinterface.h | |
parent | 6764d96eaaebc641c81cfc5666d99e8aa6ae698c (diff) |
amdgpu/addrlib: add matchStencilTileCfg and tcCompatible fixes
The usage should be client first call AddrComputeSurfaceInfo() on
depth surface with flag "matchStencilTilecfg", AddrLib will use
2DThin1 tile index for depth as much as possible and do not down grade
unless alignment requirement cannot be met.
1. If there is a matched 2DThin1 tile index for stencil which make
sure they will share same tile config parameters, then return the
stencil 2DThin1 tile index as well.
2. If using 2DThin1 tile mode cannot make sure such thing happen, and
TcCompatible flag was set, then ignore this flag then try 2DThin1 tile
mode for depth and stencil again.
3. If 2DThin1 tile mode cannot make sure depth and stencil to have
same tile config parameters, then down grade depth surface tile mode
to 1DThin1.
4. If depth surface's tile mode was 1DThin1, then return 1DThin1 tile
index for stencil.
5. If depth surface's tile mode is PRT, then return invalid tile index
to stencil since their tile config parameters will never be met.
Client driver then check the returned tile index of stencil -- if it
is not invalid tile index, then call AddrComputeSurfaceInfo() on
stencil surface with the returned stencil tile index to get full
output information. Please note, client needs to set flag
"useTileIndex" when AddrLib get created.
Diffstat (limited to 'src/amd/addrlib/addrinterface.h')
-rw-r--r-- | src/amd/addrlib/addrinterface.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/amd/addrlib/addrinterface.h b/src/amd/addrlib/addrinterface.h index c68cacf0952..2a61b2b33f2 100644 --- a/src/amd/addrlib/addrinterface.h +++ b/src/amd/addrlib/addrinterface.h @@ -519,7 +519,9 @@ typedef union _ADDR_SURFACE_FLAGS UINT_32 rotateDisplay : 1; ///< Rotate micro tile type UINT_32 minimizeAlignment : 1; ///< Minimize alignment UINT_32 preferEquation : 1; ///< Return equation index without adjusting tile mode - UINT_32 reserved : 4; ///< Reserved bits + UINT_32 matchStencilTileCfg : 1; ///< Select tile index of stencil as well as depth surface + /// to make sure they share same tile config parameters + UINT_32 reserved : 3; ///< Reserved bits }; UINT_32 value; @@ -628,6 +630,8 @@ typedef struct _ADDR_COMPUTE_SURFACE_INFO_OUTPUT /// Stereo info ADDR_QBSTEREOINFO* pStereoInfo;///< Stereo information, needed when .qbStereo flag is TRUE + + INT_32 stencilTileIdx; ///< stencil tile index output when matchStencilTileCfg was set } ADDR_COMPUTE_SURFACE_INFO_OUTPUT; /** |