radv: Fix depth-only-with-discard when epilogs are used.
authorTatsuyuki Ishi <ishitatsuyuki@gmail.com>
Sat, 14 Jan 2023 09:30:32 +0000 (18:30 +0900)
committerMarge Bot <emma+marge@anholt.net>
Fri, 20 Jan 2023 08:17:50 +0000 (08:17 +0000)
commit1617dac6c3a4212d0e254c05f9f42f0bf2f5d52b
tree7f847b3dece029eed3099e3efc3bb1eb64a3aea1
parent7bed7d94756e5a6877ecb86ec5296ff79554e898
radv: Fix depth-only-with-discard when epilogs are used.

For a depth-only-with-discard pipeline, spi_shader_col_format needs to be
fixed up to a single channel export, or otherwise discard will not work.

Since col_format can change depending on the dynamic state, precompute the
need for this workaround on pipeline creation and apply it when emitting
prolog states.

Fixes: eb07a11b8f4 ("radv: add support for compiling PS epilogs on-demand")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20704>
src/amd/vulkan/radv_cmd_buffer.c
src/amd/vulkan/radv_pipeline.c
src/amd/vulkan/radv_private.h