panfrost: Implement framebuffer invalidation
authorAlyssa Rosenzweig <alyssa@collabora.com>
Tue, 11 May 2021 19:39:21 +0000 (15:39 -0400)
committerMarge Bot <eric+marge@anholt.net>
Wed, 12 May 2021 12:47:53 +0000 (12:47 +0000)
commitac5ba2dfadb46edb260be631f128e264c1711237
tree2b1d3378d11d02e71a56c3ae6fd353a3cb46a47f
parentc8161bf05d783618f52a65995893008c82f83b9c
panfrost: Implement framebuffer invalidation

The strategy is lifted from Freedreno. The trick is to remove buffers
from the resolve set, rather than add buffers to a discard set (as you
would naively try). The latter is wrong -- draws after the
glInvalidateFramebuffer() still need to be respected.

glmark2 -btexture on-screen with sway on Mali T860 from 1393fps to
1998fps

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Closes: #2407
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6295>
src/gallium/drivers/panfrost/pan_resource.c