[Mesa-dev] [PATCH 4/6] radv: add fast clears support for mipmapped color images with DCC

Bas Nieuwenhuizen bas at basnieuwenhuizen.nl
Tue Jun 18 23:37:53 UTC 2019


r-b

On Tue, Jun 18, 2019 at 4:12 PM Samuel Pitoiset
<samuel.pitoiset at gmail.com> wrote:
>
> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
> ---
>  src/amd/vulkan/radv_meta_clear.c | 12 +++++++++++-
>  1 file changed, 11 insertions(+), 1 deletion(-)
>
> diff --git a/src/amd/vulkan/radv_meta_clear.c b/src/amd/vulkan/radv_meta_clear.c
> index 49f572c6889..7f8f69e10f6 100644
> --- a/src/amd/vulkan/radv_meta_clear.c
> +++ b/src/amd/vulkan/radv_meta_clear.c
> @@ -1357,10 +1357,20 @@ radv_clear_dcc(struct radv_cmd_buffer *cmd_buffer,
>                struct radv_image *image,
>                const VkImageSubresourceRange *range, uint32_t value)
>  {
> +       uint32_t level_count = radv_get_levelCount(image, range);
> +       uint32_t flush_bits = 0;
> +
>         /* Mark the image as being compressed. */
>         radv_update_dcc_metadata(cmd_buffer, image, range, true);
>
> -       return radv_dcc_clear_level(cmd_buffer, image, 0, value);
> +       for (uint32_t l = 0; l < level_count; l++) {
> +               uint32_t level = range->baseMipLevel + l;
> +
> +               flush_bits |= radv_dcc_clear_level(cmd_buffer, image,
> +                                                  level, value);
> +       }
> +
> +       return flush_bits;
>  }
>
>  uint32_t
> --
> 2.22.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