freedreno: fix slice pitch calculations
authorIlia Mirkin <imirkin@alum.mit.edu>
Fri, 13 Mar 2015 05:36:57 +0000 (01:36 -0400)
committerIlia Mirkin <imirkin@alum.mit.edu>
Fri, 13 Mar 2015 20:05:16 +0000 (16:05 -0400)
commit620e29b74821fd75b24495ab2bfddea53fc75350
tree65677bbc1ff28438148447327ff8c8ddd5f9f1b7
parent89b26d5a360ebde11a69f2cdefa66e4d6a2a13fd
freedreno: fix slice pitch calculations

For example if width were 65, the first slice would get 96 while the
second would get 32. However the hardware appears to expect the second
pitch to be 64, based on halving the 96 (and aligning up to 32).

This fixes texelFetch piglit tests on a3xx below a certain size. Going
higher they break again, but most likely due to unrelated reasons.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "10.4 10.5" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Rob Clark <robclark@freedesktop.org>
src/gallium/drivers/freedreno/freedreno_resource.c