freedreno/a3xx: fix texture buffers, enable offsets
authorIlia Mirkin <imirkin@alum.mit.edu>
Thu, 17 Sep 2015 05:43:36 +0000 (01:43 -0400)
committerRob Clark <robclark@freedesktop.org>
Wed, 18 Nov 2015 19:31:13 +0000 (14:31 -0500)
commit9c409c8df3db09c2922a8f9a0376ee91b2a6837c
tree9fb99814dda38d89b6c993b3e3c0051befd834b1
parentd69e557f2a2c39888d83c7b52244412ee2a5594e
freedreno/a3xx: fix texture buffers, enable offsets

The main issue is that the current logic looked into cso->u.tex, which
is the wrong side of the union to look into for texture buffers. While I
was at it, it was easy enough to add the logic to handle offsets
(first_element).

 - reduce texture buffer size limit (determined experimentally)
 - don't look at first/last levels, instead look at first/last element
 - include the first element offset
 - set offset alignment to 16 (determined experimentally)

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Rob Clark <robclark@freedesktop.org>
src/gallium/drivers/freedreno/a3xx/fd3_emit.c
src/gallium/drivers/freedreno/a3xx/fd3_texture.c
src/gallium/drivers/freedreno/freedreno_screen.c