diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2021-07-18 22:59:31 +0200 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2021-07-18 22:59:31 +0200 |
commit | a3ce26ae01fa042d17dece8bab12935772fd8897 (patch) | |
tree | b3d4ba24d80b6e1e7e17daff54dc01b38e673f8f /src | |
parent | Merge pull request #6647 from lat9nq/specify-system-path (diff) | |
download | yuzu-a3ce26ae01fa042d17dece8bab12935772fd8897.tar yuzu-a3ce26ae01fa042d17dece8bab12935772fd8897.tar.gz yuzu-a3ce26ae01fa042d17dece8bab12935772fd8897.tar.bz2 yuzu-a3ce26ae01fa042d17dece8bab12935772fd8897.tar.lz yuzu-a3ce26ae01fa042d17dece8bab12935772fd8897.tar.xz yuzu-a3ce26ae01fa042d17dece8bab12935772fd8897.tar.zst yuzu-a3ce26ae01fa042d17dece8bab12935772fd8897.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/video_core/renderer_vulkan/vk_compute_pass.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/video_core/renderer_vulkan/vk_compute_pass.cpp b/src/video_core/renderer_vulkan/vk_compute_pass.cpp index 205cd3b05..ce0081ef5 100644 --- a/src/video_core/renderer_vulkan/vk_compute_pass.cpp +++ b/src/video_core/renderer_vulkan/vk_compute_pass.cpp @@ -374,20 +374,20 @@ void ASTCDecoderPass::MakeDataBuffer() { scheduler.Record([src = staging_ref.buffer, offset = staging_ref.offset, dst = *data_buffer, TOTAL_BUFFER_SIZE](vk::CommandBuffer cmdbuf) { - cmdbuf.CopyBuffer(src, dst, - VkBufferCopy{ - .srcOffset = offset, - .dstOffset = 0, - .size = TOTAL_BUFFER_SIZE, - }); - cmdbuf.PipelineBarrier( - VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, 0, - VkMemoryBarrier{ - .sType = VK_STRUCTURE_TYPE_MEMORY_BARRIER, - .pNext = nullptr, - .srcAccessMask = 0, - .dstAccessMask = VK_ACCESS_TRANSFER_READ_BIT | VK_ACCESS_TRANSFER_WRITE_BIT, - }); + static constexpr VkMemoryBarrier write_barrier{ + .sType = VK_STRUCTURE_TYPE_MEMORY_BARRIER, + .pNext = nullptr, + .srcAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT, + .dstAccessMask = VK_ACCESS_SHADER_READ_BIT, + }; + const VkBufferCopy copy{ + .srcOffset = offset, + .dstOffset = 0, + .size = TOTAL_BUFFER_SIZE, + }; + cmdbuf.CopyBuffer(src, dst, copy); + cmdbuf.PipelineBarrier(VK_PIPELINE_STAGE_TRANSFER_BIT, VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT, + 0, write_barrier); }); } |