[Mesa-dev] [PATCH] addrlib: don't use linear aligned when pow2Pad is selected.

Dave Airlie airlied at gmail.com
Tue Apr 4 02:17:35 UTC 2017


From: Dave Airlie <airlied at redhat.com>

The below commit caused a regression on radv with 1D textures,
this was because the base level for these small textures was
being degraded to a linear level due to this code. This stops
the degradation to linear when the pow2Pad bit it set (this
is set when there are miplevels).

I'm not sure if this is the correct fix, it works at least,
maybe there is still a bug in radv somewhere.

Fixes: 36149998 amdgpu/addrlib: Rewrite tile mode optmization code

Signed-off-by: Dave Airlie <airlied at redhat.com>
---
 src/amd/addrlib/core/addrlib1.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/amd/addrlib/core/addrlib1.cpp b/src/amd/addrlib/core/addrlib1.cpp
index 2d640cf..9f783a5 100644
--- a/src/amd/addrlib/core/addrlib1.cpp
+++ b/src/amd/addrlib/core/addrlib1.cpp
@@ -3616,6 +3616,7 @@ VOID Lib::OptimizeTileMode(
                     (ElemLib::IsBlockCompressed(pInOut->format) == FALSE) &&
                     (pInOut->flags.depth == FALSE) &&
                     (pInOut->flags.stencil == FALSE) &&
+                    (pInOut->flags.pow2Pad == FALSE) &&
                     (m_configFlags.disableLinearOpt == FALSE) &&
                     (pInOut->flags.disableLinearOpt == FALSE))
                 {
-- 
2.9.3



More information about the mesa-dev mailing list