Mesa (main): tu: Overhaul LRZ, implement on-GPU dir tracking and LRZ fast-clear

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jun 28 17:53:36 UTC 2022


Module: Mesa
Branch: main
Commit: 4b5f0d98fd57cbcd253b85291b7491aa5754a2eb
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=4b5f0d98fd57cbcd253b85291b7491aa5754a2eb

Author: Danylo Piliaiev <dpiliaiev at igalia.com>
Date:   Mon May 16 13:41:02 2022 +0300

tu: Overhaul LRZ, implement on-GPU dir tracking and LRZ fast-clear

On-GPU LRZ direction tracking allows LRZ to support secondary cmdbufs,
reusing LRZ between renderpasses, and in future to support LRZ when
VK_KHR_dynamic_rendering is used.

With on-gpu tracking we have to be careful keeping LRZ state in sync
with underlying depth image, which means we should invalidate LRZ
when underlying image is changed or the view of image is different
from previous renderpass.

All of this resulted in LRZ logic being thinly spread through the code,
making it hard to understand. So most of it was moved to tu_lrz.c.

For more details on past and new LRZ features see comment at the
top of tu_lrz.c.

Note about blob:
- Blob is much more happy to do LRZ_FLUSH, it flushes at the start
  of the renderpass, after binning, and at the end of the renderpass.
- Blob seem not to care about changes in depth image done via
  vkCmdCopyImage.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6347

Signed-off-by: Danylo Piliaiev <dpiliaiev at igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16251>

---

 src/freedreno/common/freedreno_dev_info.h |   4 +
 src/freedreno/common/freedreno_devices.py |   7 +
 src/freedreno/fdl/fd6_view.c              |   9 +
 src/freedreno/fdl/freedreno_layout.h      |   2 +
 src/freedreno/registers/adreno/a6xx.xml   |  13 +
 src/freedreno/vulkan/meson.build          |   1 +
 src/freedreno/vulkan/tu_clear_blit.c      |  53 +-
 src/freedreno/vulkan/tu_cmd_buffer.c      | 312 +-----------
 src/freedreno/vulkan/tu_device.c          |   1 +
 src/freedreno/vulkan/tu_image.c           |  29 ++
 src/freedreno/vulkan/tu_lrz.c             | 796 ++++++++++++++++++++++++++++++
 src/freedreno/vulkan/tu_private.h         |  58 ++-
 12 files changed, 987 insertions(+), 298 deletions(-)

Diff:   http://cgit.freedesktop.org/mesa/mesa/diff/?id=4b5f0d98fd57cbcd253b85291b7491aa5754a2eb


More information about the mesa-commit mailing list