freedreno/a6xx: refactor fd6_tex_swiz()
authorRob Clark <robdclark@gmail.com>
Wed, 6 Mar 2019 15:04:21 +0000 (10:04 -0500)
committerRob Clark <robdclark@gmail.com>
Thu, 7 Mar 2019 20:33:42 +0000 (15:33 -0500)
commitf5d80ff2db36736636aede2040c716d7fb437286
treea371f862d16da85199a3507390670a406ed7c56b
parent8dc47490c8384ebab1be3d582e8e4ba93187f6fa
freedreno/a6xx: refactor fd6_tex_swiz()

We need a version of fd6_tex_swiz() that just returns the composed
swizzle without building part of the TEX_CONST_0 state.  So just
refactor the existing function to build more of the TEX_CONST_0 state,
and leave fd6_tex_swiz() simply composing swizzles.

The small IBO state change (to use LINEAR for smaller sizes/levels) is
to match the state in fd6_tex_const_0().  It seems like maybe tiled
actually works at the smaller sizes but not if minification is in play,
so best just to make images match what we do for textures.

Signed-off-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Kristian H. Kristensen <hoegsberg@chromium.org>
src/gallium/drivers/freedreno/a6xx/fd6_format.c
src/gallium/drivers/freedreno/a6xx/fd6_format.h
src/gallium/drivers/freedreno/a6xx/fd6_image.c
src/gallium/drivers/freedreno/a6xx/fd6_texture.c