freedreno/a6xx: Set a level's pitch based on minified level0 pitch, not width0.
authorEric Anholt <eric@anholt.net>
Tue, 25 Feb 2020 22:03:36 +0000 (14:03 -0800)
committerMarge Bot <eric+marge@anholt.net>
Tue, 7 Apr 2020 18:02:56 +0000 (18:02 +0000)
commit1618159772a087b0914828bdcdfc0e95a2def350
treec8ea137f12feb6b9d5531905eafc98e2b59babb2
parent4b881d527020b4094ebae850a2dc680c28ccbf97
freedreno/a6xx: Set a level's pitch based on minified level0 pitch, not width0.

Found from piglit fbo-generatemipmaps failures, then tracked down with the
texturator test.  The piece that really revealed things was finding that
1024x1 linear RGBA8 on the older blob drivers would have a pitch of 5120
instead of 4096, and the following levels minified that pitch.

Fixes ~124 piglit tests (~8.5% of piglit failures) on cheza.

Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3987>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3987>
src/freedreno/fdl/fd6_layout.c
src/freedreno/fdl/fd6_layout_test.c