From: Jonathan Marek Date: Mon, 16 Dec 2019 14:59:48 +0000 (-0500) Subject: turnip: don't require src image to be set for clear blits X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8d893a2071fbfd4b4c2f2922cfd9369696c78e3a;p=mesa.git turnip: don't require src image to be set for clear blits Signed-off-by: Jonathan Marek Reviewed-by: Eric Anholt --- diff --git a/src/freedreno/vulkan/tu_blit.c b/src/freedreno/vulkan/tu_blit.c index 3cddfa128ca..ba0d0cc2fbb 100644 --- a/src/freedreno/vulkan/tu_blit.c +++ b/src/freedreno/vulkan/tu_blit.c @@ -265,8 +265,9 @@ void tu_blit(struct tu_cmd_buffer *cmdbuf, struct tu_blit *blt) case TU_BLIT_CLEAR: /* unsupported format cleared as UINT32 */ if (blt->dst.fmt == VK_FORMAT_E5B9G9R9_UFLOAT_PACK32) - blt->dst.fmt = blt->src.fmt = VK_FORMAT_R32_UINT; + blt->dst.fmt = VK_FORMAT_R32_UINT; assert(blt->dst.samples == 1); /* TODO */ + blt->src = blt->dst; break; default: assert(blt->dst.samples == 1); diff --git a/src/freedreno/vulkan/tu_meta_clear.c b/src/freedreno/vulkan/tu_meta_clear.c index 5f5fe44c676..a44f1426570 100644 --- a/src/freedreno/vulkan/tu_meta_clear.c +++ b/src/freedreno/vulkan/tu_meta_clear.c @@ -45,7 +45,6 @@ clear_image(struct tu_cmd_buffer *cmdbuf, tu_blit(cmdbuf, &(struct tu_blit) { .dst = tu_blit_surf_whole(image, range->baseMipLevel + j, range->baseArrayLayer), - .src = tu_blit_surf_whole(image, range->baseMipLevel + j, range->baseArrayLayer), .layers = layer_count, .clear_value = {clear_value[0], clear_value[1], clear_value[2], clear_value[3]}, .type = TU_BLIT_CLEAR,