Mesa (main): tu: Support resolving D24S8 -> S8

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jul 26 15:20:53 UTC 2022


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

Author: Connor Abbott <cwabbott0 at gmail.com>
Date:   Wed Jul 20 17:33:09 2022 +0200

tu: Support resolving D24S8 -> S8

This was missed when we added support for VK_KHR_depth_stencil_resolve.
There is a similar feature where the stencil aspect of a D24S8 can be
copied "tightly" in CopyImageToBuffer, but it used the texture swizzle
and so required the 3d path. To get it to work with the 2D path, which
is required for resolves, we have to instead use the A8_UNORM format,
which works for texture sampling even for tiled images. We also have to
reuse the pre-existing image views because subpass resolves work on
image views rather than images, whereas before the fixup was applied
while creating the image view. This means threading through the
corresponding "opposite" format through setup, src, and dst functions,
doing the fixup there (through some shared helpers), and then getting
every user to specify the right format. As a bonus, we no longer need to
force the 3d path for the CopyImageToBuffer and CopyBufferToImage
special cases.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17684>

---

 src/freedreno/ci/freedreno-a618-fails.txt |   5 -
 src/freedreno/fdl/fd6_view.c              |   2 +
 src/freedreno/fdl/freedreno_layout.h      |   2 +
 src/freedreno/vulkan/tu_clear_blit.c      | 434 +++++++++++++++++++-----------
 4 files changed, 277 insertions(+), 166 deletions(-)

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


More information about the mesa-commit mailing list