freedreno: last_fence optimization for TC async flushes
authorRob Clark <robdclark@chromium.org>
Sun, 18 Apr 2021 22:29:32 +0000 (15:29 -0700)
committerMarge Bot <eric+marge@anholt.net>
Wed, 28 Apr 2021 15:36:42 +0000 (15:36 +0000)
commitc3f4835b99cfb6bb1fa677a6a86debbaeb590101
tree33e67c0266b33e0e1b33d7f70e173c2eb3149ced
parent807bfa6be8915b44032d77c8ea74fe3ca9a658dc
freedreno: last_fence optimization for TC async flushes

Without deferred flushes, we would track the last_fence any time when
there had be no rendering/etc since the last flush, to avoid creating
empty batches simply for the purpose of getting a fence.  We can do the
same thing with deferred flushes, where the fence is created from the
frontend thread before we know what will be flushed, by repopulating
the pre-created fence.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10444>
src/gallium/drivers/freedreno/freedreno_context.c
src/gallium/drivers/freedreno/freedreno_fence.c
src/gallium/drivers/freedreno/freedreno_fence.h