gallium/u_transfer_helper: Add support for separate Z24/S8 as well.
authorKenneth Graunke <kenneth@whitecape.org>
Mon, 30 Jul 2018 22:20:00 +0000 (15:20 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 15 Oct 2018 06:36:28 +0000 (23:36 -0700)
commit38a23517fdc2c4bce5d72cc32cac2b543b460d77
tree43fc42348c98af522d9b40bcd5939ef2957c5e56
parentc3d219837af66b4299ab7e746b65ff33a0a6ca0d
gallium/u_transfer_helper: Add support for separate Z24/S8 as well.

u_transfer_helper already had code to handle treating packed Z32_S8
as separate Z32_FLOAT and S8_UINT resources, since some drivers can't
handle that interleaved format natively.

Other hardware needs depth and stencil as separate resources for all
formats.  For example, V3D3 needs this for 24-bit depth as well.

This patch adds a new flag to lower all depth/stencils formats, and
implements support for Z24_UNORM_S8_UINT.  (S8_UINT_Z24_UNORM is left
as an exercise to the reader, preferably someone who has access to a
machine that uses that format.)

Reviewed-by: Eric Anholt <eric@anholt.net>
src/gallium/auxiliary/util/u_transfer_helper.c
src/gallium/auxiliary/util/u_transfer_helper.h
src/gallium/drivers/freedreno/freedreno_resource.c
src/gallium/drivers/v3d/v3d_resource.c
src/gallium/drivers/vc4/vc4_resource.c