diff options
author | Jason Ekstrand <[email protected]> | 2016-06-15 15:08:09 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2016-07-09 20:58:33 -0700 |
commit | fad0b7b0b3fbea55a1cf14ee731531e706083716 (patch) | |
tree | c59cf01563f920c488b447cb79a39ec728d49de8 /src/intel | |
parent | 6ad183bf891e97b1dc692606b8da3ff969bb1114 (diff) |
anv/dump: Add a barrier for the source image
Reviewed-by: Chad Versace <[email protected]>
Diffstat (limited to 'src/intel')
-rw-r--r-- | src/intel/vulkan/anv_dump.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/intel/vulkan/anv_dump.c b/src/intel/vulkan/anv_dump.c index 0fee93ced0a..59a6f2af690 100644 --- a/src/intel/vulkan/anv_dump.c +++ b/src/intel/vulkan/anv_dump.c @@ -90,6 +90,28 @@ dump_image_do_blit(struct anv_device *device, struct dump_image *image, VkImageAspectFlagBits aspect, unsigned miplevel, unsigned array_layer) { + ANV_CALL(CmdPipelineBarrier)(anv_cmd_buffer_to_handle(cmd_buffer), + VK_PIPELINE_STAGE_TRANSFER_BIT, + VK_PIPELINE_STAGE_TRANSFER_BIT, + 0, 0, NULL, 0, NULL, 1, + &(VkImageMemoryBarrier) { + .sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER, + .srcAccessMask = ~0, + .dstAccessMask = VK_ACCESS_TRANSFER_READ_BIT, + .oldLayout = VK_IMAGE_LAYOUT_GENERAL, + .newLayout = VK_IMAGE_LAYOUT_GENERAL, + .srcQueueFamilyIndex = 0, + .dstQueueFamilyIndex = 0, + .image = anv_image_to_handle(src), + .subresourceRange = (VkImageSubresourceRange) { + .aspectMask = aspect, + .baseMipLevel = miplevel, + .levelCount = 1, + .baseArrayLayer = array_layer, + .layerCount = 1, + }, + }); + /* We need to do a blit so the image needs to be declared as sampled. The * only thing these are used for is making sure we create the correct * views, so it should be find to just stomp it and set it back. |