[Mesa-dev] [PATCH] radv: decompress FMASK before performing a MSAA decompress using FMASK
Bas Nieuwenhuizen
bas at basnieuwenhuizen.nl
Mon May 20 09:45:04 UTC 2019
r-b
On Thu, May 16, 2019 at 9:21 AM Samuel Pitoiset
<samuel.pitoiset at gmail.com> wrote:
>
> This fixes some CTS failures related to VK_EXT_sample_locations.
>
> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
> ---
> src/amd/vulkan/radv_cmd_buffer.c | 15 +++++++++++++--
> 1 file changed, 13 insertions(+), 2 deletions(-)
>
> diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c
> index 506efc4dae0..476ae35e0a0 100644
> --- a/src/amd/vulkan/radv_cmd_buffer.c
> +++ b/src/amd/vulkan/radv_cmd_buffer.c
> @@ -4833,17 +4833,28 @@ static void radv_handle_color_image_transition(struct radv_cmd_buffer *cmd_buffe
> radv_fast_clear_flush_image_inplace(cmd_buffer, image, range);
> }
> } else if (radv_image_has_cmask(image) || radv_image_has_fmask(image)) {
> + bool fce_eliminate = false, fmask_expand = false;
> +
> if (radv_layout_can_fast_clear(image, src_layout, src_queue_mask) &&
> !radv_layout_can_fast_clear(image, dst_layout, dst_queue_mask)) {
> - radv_fast_clear_flush_image_inplace(cmd_buffer, image, range);
> + fce_eliminate = true;
> }
>
> if (radv_image_has_fmask(image)) {
> if (src_layout != VK_IMAGE_LAYOUT_GENERAL &&
> dst_layout == VK_IMAGE_LAYOUT_GENERAL) {
> - radv_expand_fmask_image_inplace(cmd_buffer, image, range);
> + /* A FMASK decompress is required before doing
> + * a MSAA decompress using FMASK.
> + */
> + fmask_expand = true;
> }
> }
> +
> + if (fce_eliminate || fmask_expand)
> + radv_fast_clear_flush_image_inplace(cmd_buffer, image, range);
> +
> + if (fmask_expand)
> + radv_expand_fmask_image_inplace(cmd_buffer, image, range);
> }
> }
>
> --
> 2.21.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list