panfrost: Overhaul tilebuffer allocations
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Thu, 9 Jul 2020 21:35:24 +0000 (17:35 -0400)
committerMarge Bot <eric+marge@anholt.net>
Thu, 16 Jul 2020 19:59:43 +0000 (19:59 +0000)
commita0003c329a0e1ceed098b64c90c6545f99d9c94b
tree0c7a3e388cf2fae201e3c6b76923854d2fd490a3
parent3d13870ee2c79020aef0bdb7b36f7ba8f7e9d069
panfrost: Overhaul tilebuffer allocations

Based on the colour buffers in use, we need to select a tile size
allowing either 128-bits of storage per pixel or 512-bits. Based on the
size chosen, we scale the offsets into the tilebuffer. Likewise, we need
to calculate offsets based on bpp (with special cases) rather than
picking an average case.

Fixes regressions that otherwise would be caused by the next commit.

v2: Fix colour clears (Icecream95).

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5858>
src/gallium/drivers/panfrost/pan_mfbd.c