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

Marek Olšák maraeo at gmail.com
Tue Apr 4 09:11:33 UTC 2017


Why don't you set disableLinearOpt instead?

Marek

On Tue, Apr 4, 2017 at 4:17 AM, Dave Airlie <airlied at gmail.com> wrote:
> 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
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list