summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_vulkan
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2021-07-18 23:00:14 +0200
committerReinUsesLisp <reinuseslisp@airmail.cc>2021-07-18 23:00:14 +0200
commit7850dd0a76aa471a57cfe0e36c50f0c162831552 (patch)
tree0ddb95b64163f87e9d050967dadb91a9a0ac77e9 /src/video_core/renderer_vulkan
parentvk_compute_pass: Fix ASTC buffer setup synchronization (diff)
downloadyuzu-7850dd0a76aa471a57cfe0e36c50f0c162831552.tar
yuzu-7850dd0a76aa471a57cfe0e36c50f0c162831552.tar.gz
yuzu-7850dd0a76aa471a57cfe0e36c50f0c162831552.tar.bz2
yuzu-7850dd0a76aa471a57cfe0e36c50f0c162831552.tar.lz
yuzu-7850dd0a76aa471a57cfe0e36c50f0c162831552.tar.xz
yuzu-7850dd0a76aa471a57cfe0e36c50f0c162831552.tar.zst
yuzu-7850dd0a76aa471a57cfe0e36c50f0c162831552.zip
Diffstat (limited to 'src/video_core/renderer_vulkan')
-rw-r--r--src/video_core/renderer_vulkan/vk_compute_pass.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/video_core/renderer_vulkan/vk_compute_pass.cpp b/src/video_core/renderer_vulkan/vk_compute_pass.cpp
index ce0081ef5..4181d83ee 100644
--- a/src/video_core/renderer_vulkan/vk_compute_pass.cpp
+++ b/src/video_core/renderer_vulkan/vk_compute_pass.cpp
@@ -411,7 +411,7 @@ void ASTCDecoderPass::Assemble(Image& image, const StagingBufferRef& map,
const VkImageMemoryBarrier image_barrier{
.sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER,
.pNext = nullptr,
- .srcAccessMask = VK_ACCESS_SHADER_WRITE_BIT,
+ .srcAccessMask = is_initialized ? VK_ACCESS_SHADER_WRITE_BIT : VkAccessFlags{},
.dstAccessMask = VK_ACCESS_SHADER_READ_BIT | VK_ACCESS_SHADER_WRITE_BIT,
.oldLayout = is_initialized ? VK_IMAGE_LAYOUT_GENERAL : VK_IMAGE_LAYOUT_UNDEFINED,
.newLayout = VK_IMAGE_LAYOUT_GENERAL,
@@ -426,7 +426,8 @@ void ASTCDecoderPass::Assemble(Image& image, const StagingBufferRef& map,
.layerCount = VK_REMAINING_ARRAY_LAYERS,
},
};
- cmdbuf.PipelineBarrier(is_initialized ? VK_PIPELINE_STAGE_ALL_COMMANDS_BIT : 0,
+ cmdbuf.PipelineBarrier(is_initialized ? VK_PIPELINE_STAGE_ALL_COMMANDS_BIT
+ : VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT,
VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT, 0, image_barrier);
cmdbuf.BindPipeline(VK_PIPELINE_BIND_POINT_COMPUTE, vk_pipeline);
});