tu: Rewrite flushing to use barriers

Graphics / Mesa 3D Graphics Library / Mesa - Connor Abbott [gmail.com] - 9 June 2020 14:40 UTC

Replace the various ad-hoc flushes that we've inserted, copied from freedreno, etc. with a unified system that uses the user-supplied information via vkCmdPipelineBarrier() and subpass dependencies.

There are a few notable differences in behavior:

- We now move setting RB_CCU_CNTL up a little in the gmem case, but hopefully that won't matter too much. This matches what the Vulkan blob does.

- We properly implement delayed setting of events, completing our implementaton of events.

- Finally, of course, we should be a lot less flush-happy. We won't emit useless CCU/cache flushes with multiple copies, renderpasses, etc. that don't depend on each other, and also won't flush/invalidate the cache around renderpasses unless we actually need to.

Part-of:

487aa807bd1 tu: Rewrite flushing to use barriers
src/freedreno/vulkan/tu_clear_blit.c | 110 +++---
src/freedreno/vulkan/tu_cmd_buffer.c | 662 +++++++++++++++++++++++++++++------
src/freedreno/vulkan/tu_pass.c | 291 +++++++++++++++
src/freedreno/vulkan/tu_private.h | 140 +++++++-
4 files changed, 1049 insertions(+), 154 deletions(-)

Upstream: cgit.freedesktop.org


  • Share