anv/blorp: Take an aspect in anv_image_copy_to_shadow
authorJason Ekstrand <jason@jlekstrand.net>
Mon, 17 Jun 2019 02:36:21 +0000 (21:36 -0500)
committerJason Ekstrand <jason@jlekstrand.net>
Mon, 17 Jun 2019 22:32:26 +0000 (22:32 +0000)
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
src/intel/vulkan/anv_blorp.c
src/intel/vulkan/anv_private.h
src/intel/vulkan/genX_cmd_buffer.c

index 0d3d3f948e6c8bf308b401dc18cb95e3b2163348..4943250cf495dbfcc0b0b50c503a89857b976e76 100644 (file)
@@ -1319,17 +1319,16 @@ fast_clear_aux_usage(const struct anv_image *image,
 void
 anv_image_copy_to_shadow(struct anv_cmd_buffer *cmd_buffer,
                          const struct anv_image *image,
+                         VkImageAspectFlagBits aspect,
                          uint32_t base_level, uint32_t level_count,
                          uint32_t base_layer, uint32_t layer_count)
 {
    struct blorp_batch batch;
    blorp_batch_init(&cmd_buffer->device->blorp, &batch, cmd_buffer, 0);
 
-   assert(image->aspects == VK_IMAGE_ASPECT_COLOR_BIT && image->n_planes == 1);
-
    struct blorp_surf surf;
    get_blorp_surf_for_anv_image(cmd_buffer->device,
-                                image, VK_IMAGE_ASPECT_COLOR_BIT,
+                                image, aspect,
                                 VK_IMAGE_LAYOUT_GENERAL,
                                 ISL_AUX_USAGE_NONE, &surf);
    assert(surf.aux_usage == ISL_AUX_USAGE_NONE);
index e86561adf9708ee0b24ff9d1ca4e836f75e845ea..0cd66e0eadbc3a2b8417d61f6f6ab0205d79fe6a 100644 (file)
@@ -3285,6 +3285,7 @@ anv_image_ccs_op(struct anv_cmd_buffer *cmd_buffer,
 void
 anv_image_copy_to_shadow(struct anv_cmd_buffer *cmd_buffer,
                          const struct anv_image *image,
+                         VkImageAspectFlagBits aspect,
                          uint32_t base_level, uint32_t level_count,
                          uint32_t base_layer, uint32_t layer_count);
 
index c57c02a08da7f27ba79554aac24cad8ec7cdae1f..5c53ed98a8c9ba360e0fe046ecaf32595a9180fe 100644 (file)
@@ -927,6 +927,7 @@ transition_color_buffer(struct anv_cmd_buffer *cmd_buffer,
       assert(isl_format_is_compressed(image->planes[plane].surface.isl.format));
       assert(plane == 0);
       anv_image_copy_to_shadow(cmd_buffer, image,
+                               VK_IMAGE_ASPECT_COLOR_BIT,
                                base_level, level_count,
                                base_layer, layer_count);
    }