summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/anv_meta_blit.c
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2016-02-24 19:49:12 -0800
committerJason Ekstrand <[email protected]>2016-02-27 10:26:14 -0800
commite9d126f23b66751ae644c3125668ecf5d1e0f86b (patch)
treeea0ae923323dc5dbd40f6ee9c5108183bd017eeb /src/intel/vulkan/anv_meta_blit.c
parentb4c16fd01a4ea7f2fd579ee30b8a6a8d00bdc3b3 (diff)
anv/image: Add a ussage_mask field to image_view_init
This allows us to avoid doing some unneeded work on the meta paths where we know that the image view will be used for exactly one thing. The meta paths also sometimes do things that aren't quite valid like setting the array slice on a 3-D texture and we want to limit the number of paths that need to be able to sensibly handle the lies.
Diffstat (limited to 'src/intel/vulkan/anv_meta_blit.c')
-rw-r--r--src/intel/vulkan/anv_meta_blit.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/intel/vulkan/anv_meta_blit.c b/src/intel/vulkan/anv_meta_blit.c
index 8ef943aa512..2ec428b5f4a 100644
--- a/src/intel/vulkan/anv_meta_blit.c
+++ b/src/intel/vulkan/anv_meta_blit.c
@@ -451,7 +451,7 @@ do_buffer_copy(struct anv_cmd_buffer *cmd_buffer,
.layerCount = 1
},
},
- cmd_buffer, 0);
+ cmd_buffer, 0, VK_IMAGE_USAGE_SAMPLED_BIT);
struct anv_image_view dest_iview;
anv_image_view_init(&dest_iview, cmd_buffer->device,
@@ -468,7 +468,7 @@ do_buffer_copy(struct anv_cmd_buffer *cmd_buffer,
.layerCount = 1,
},
},
- cmd_buffer, 0);
+ cmd_buffer, 0, VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT);
meta_emit_blit(cmd_buffer,
anv_image_from_handle(src_image),
@@ -711,7 +711,7 @@ void anv_CmdCopyImage(
.layerCount = pRegions[r].dstSubresource.layerCount,
},
},
- cmd_buffer, 0);
+ cmd_buffer, 0, VK_IMAGE_USAGE_SAMPLED_BIT);
const uint32_t dest_base_array_slice =
anv_meta_get_iview_layer(dest_image, &pRegions[r].dstSubresource,
@@ -758,7 +758,7 @@ void anv_CmdCopyImage(
.layerCount = 1
},
},
- cmd_buffer, img_o);
+ cmd_buffer, img_o, VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT);
const VkExtent3D img_extent_el = meta_region_extent_el(dest_image->vk_format,
&pRegions[r].extent);
@@ -826,7 +826,7 @@ void anv_CmdBlitImage(
.layerCount = 1
},
},
- cmd_buffer, 0);
+ cmd_buffer, 0, VK_IMAGE_USAGE_SAMPLED_BIT);
const VkOffset3D dest_offset = {
.x = pRegions[r].dstOffsets[0].x,
@@ -876,7 +876,7 @@ void anv_CmdBlitImage(
.layerCount = 1
},
},
- cmd_buffer, 0);
+ cmd_buffer, 0, VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT);
meta_emit_blit(cmd_buffer,
src_image, &src_iview,
@@ -991,7 +991,7 @@ void anv_CmdCopyBufferToImage(
.layerCount = 1,
},
},
- cmd_buffer, 0);
+ cmd_buffer, 0, VK_IMAGE_USAGE_SAMPLED_BIT);
uint32_t img_x = 0;
uint32_t img_y = 0;
@@ -1025,7 +1025,7 @@ void anv_CmdCopyBufferToImage(
.layerCount = 1
},
},
- cmd_buffer, img_o);
+ cmd_buffer, img_o, VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT);
const VkExtent3D img_extent_el = meta_region_extent_el(dest_image->vk_format,
&pRegions[r].imageExtent);
@@ -1104,7 +1104,7 @@ void anv_CmdCopyImageToBuffer(
.layerCount = pRegions[r].imageSubresource.layerCount,
},
},
- cmd_buffer, 0);
+ cmd_buffer, 0, VK_IMAGE_USAGE_SAMPLED_BIT);
struct anv_image *dest_image =
make_image_for_buffer(vk_device, destBuffer, src_image->vk_format,
@@ -1140,7 +1140,7 @@ void anv_CmdCopyImageToBuffer(
.layerCount = 1
},
},
- cmd_buffer, 0);
+ cmd_buffer, 0, VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT);
meta_emit_blit(cmd_buffer,
anv_image_from_handle(srcImage),