turnip: don't require src image to be set for clear blits
authorJonathan Marek <jonathan@marek.ca>
Mon, 16 Dec 2019 14:59:48 +0000 (09:59 -0500)
committerJonathan Marek <jonathan@marek.ca>
Mon, 16 Dec 2019 18:13:53 +0000 (13:13 -0500)
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/freedreno/vulkan/tu_blit.c
src/freedreno/vulkan/tu_meta_clear.c

index 3cddfa128cae0df9b6c08102b5a5b0cb94924043..ba0d0cc2fbb4decc898fd5c076d3594ec5f97844 100644 (file)
@@ -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);
index 5f5fe44c6764cce907640fa6da9a59eccbaa05b2..a44f1426570c082ff7ab626fb1c994d32408aeb1 100644 (file)
@@ -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,