OSDN Git Service

amdgpu/addrlib: add matchStencilTileCfg and tcCompatible fixes
authorXavi Zhang <xavi.zhang@amd.com>
Tue, 1 Mar 2016 08:40:15 +0000 (03:40 -0500)
committerMarek Olšák <marek.olsak@amd.com>
Thu, 30 Mar 2017 12:44:33 +0000 (14:44 +0200)
commitfa906a888ba908611086e5e80a19bbb99618945d
treea747ce21d0dafddb65d9b2c7e27890bf86b95a71
parent6764d96eaaebc641c81cfc5666d99e8aa6ae698c
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.
src/amd/addrlib/addrinterface.h
src/amd/addrlib/core/addrlib1.cpp
src/amd/addrlib/r800/ciaddrlib.cpp
src/amd/addrlib/r800/ciaddrlib.h