freedreno: helper to calc layer/level offset
authorRob Clark <robclark@freedesktop.org>
Fri, 12 Dec 2014 22:20:50 +0000 (17:20 -0500)
committerRob Clark <robclark@freedesktop.org>
Sat, 13 Dec 2014 20:09:37 +0000 (15:09 -0500)
commit7474de2235beee9240be702ab99b93989fa7c7c1
tree8893d371f3d74405edf037c129f9b8f2c5234146
parent23caba862a001f82ef352307a79bebf7ef910959
freedreno: helper to calc layer/level offset

Rather than duplicating this everywhere.  Especially as on a4xx the
layout of layers and levels differs based on texture type.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
src/gallium/drivers/freedreno/a3xx/fd3_emit.c
src/gallium/drivers/freedreno/a3xx/fd3_gmem.c
src/gallium/drivers/freedreno/a4xx/fd4_emit.c
src/gallium/drivers/freedreno/a4xx/fd4_gmem.c
src/gallium/drivers/freedreno/freedreno_resource.h