freedreno: move UBWC color offset to fd_resource_offset()
authorRob Clark <robdclark@chromium.org>
Sat, 4 May 2019 15:04:59 +0000 (08:04 -0700)
committerRob Clark <robdclark@chromium.org>
Sat, 4 May 2019 18:50:44 +0000 (11:50 -0700)
commit62c0b02717b0ff5ab56366780ec46b44161b76c9
tree6bb1ce4375e315151b785302f4f77862ac4cfca4
parenta871b5ffaa6ba6d0c6369b0af74ebd74507b2f2b
freedreno: move UBWC color offset to fd_resource_offset()

Best to keep it encapsulated in the helper which returns layer/level
offset (and actually use that helper everywhere) rather than spreading
the logic around the code.

Also add a helper to find UBWC offset, to complete the encapsulation.

Signed-off-by: Rob Clark <robdclark@chromium.org>
src/gallium/drivers/freedreno/a6xx/fd6_blitter.c
src/gallium/drivers/freedreno/a6xx/fd6_emit.c
src/gallium/drivers/freedreno/a6xx/fd6_gmem.c
src/gallium/drivers/freedreno/a6xx/fd6_image.c
src/gallium/drivers/freedreno/a6xx/fd6_texture.c
src/gallium/drivers/freedreno/a6xx/fd6_texture.h
src/gallium/drivers/freedreno/freedreno_resource.h