freedreno/a3xx: fix 3d texture layout
authorIlia Mirkin <imirkin@alum.mit.edu>
Sun, 15 Mar 2015 20:38:42 +0000 (16:38 -0400)
committerIlia Mirkin <imirkin@alum.mit.edu>
Sat, 28 Mar 2015 18:54:41 +0000 (14:54 -0400)
commit738c8319ac85b175994b35d1fdc4860e18184b93
treefa4e619e073edd5ee486a7fde3f2c0cd5ace8f45
parent3735643df3fc29d7ce84b2156c53f23a3092765c
freedreno/a3xx: fix 3d texture layout

The SZ2 field contains the layer size of a lower miplevel. It only
contains 4 bits, which limits the maximum layer size it can describe. In
situations where the next miplevel would be too big, the hardware
appears to keep minifying the size until it hits one of that size.
Unfortunately the hardware's ideas about sizes can differ from
freedreno's which can still lead to issues. Minimize those by stopping
to minify as soon as possible.

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