diff options
author | XiaoYuan Zheng <[email protected]> | 2015-01-22 05:08:05 -0500 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-03-30 14:44:33 +0200 |
commit | 6164f23a9140ae8dfa4d44f7a9c41228e36fa9bf (patch) | |
tree | b6abcb2c539b28e7a5ae345cac957df992270bda /src/amd/addrlib/core | |
parent | 3bd1380ab2aea14d6187110982b8ba576eefb073 (diff) |
amdgpu/addrlib: add tcCompatible htile addr from coordinate support.
Diffstat (limited to 'src/amd/addrlib/core')
-rw-r--r-- | src/amd/addrlib/core/addrlib1.cpp | 31 | ||||
-rw-r--r-- | src/amd/addrlib/core/addrlib1.h | 8 |
2 files changed, 27 insertions, 12 deletions
diff --git a/src/amd/addrlib/core/addrlib1.cpp b/src/amd/addrlib/core/addrlib1.cpp index 1dc61e01273..f0fd08c3eb9 100644 --- a/src/amd/addrlib/core/addrlib1.cpp +++ b/src/amd/addrlib/core/addrlib1.cpp @@ -1422,18 +1422,25 @@ ADDR_E_RETURNCODE AddrLib1::ComputeHtileAddrFromCoord( if (returnCode == ADDR_OK) { - pOut->addr = HwlComputeXmaskAddrFromCoord(pIn->pitch, - pIn->height, - pIn->x, - pIn->y, - pIn->slice, - pIn->numSlices, - 1, - pIn->isLinear, - isWidth8, - isHeight8, - pIn->pTileInfo, - &pOut->bitPosition); + if (pIn->flags.tcCompatible) + { + HwlComputeHtileAddrFromCoord(pIn, pOut); + } + else + { + pOut->addr = HwlComputeXmaskAddrFromCoord(pIn->pitch, + pIn->height, + pIn->x, + pIn->y, + pIn->slice, + pIn->numSlices, + 1, + pIn->isLinear, + isWidth8, + isHeight8, + pIn->pTileInfo, + &pOut->bitPosition); + } } } diff --git a/src/amd/addrlib/core/addrlib1.h b/src/amd/addrlib/core/addrlib1.h index 1bdfd5bf8f2..25af637dcd0 100644 --- a/src/amd/addrlib/core/addrlib1.h +++ b/src/amd/addrlib/core/addrlib1.h @@ -290,6 +290,14 @@ protected: return ADDR_NOTSUPPORTED; } + /// Virtual function to get htile address for tc compatible htile + virtual ADDR_E_RETURNCODE HwlComputeHtileAddrFromCoord( + const ADDR_COMPUTE_HTILE_ADDRFROMCOORD_INPUT* pIn, + ADDR_COMPUTE_HTILE_ADDRFROMCOORD_OUTPUT* pOut) const + { + return ADDR_NOTSUPPORTED; + } + // Compute attributes // HTILE |