mirror of
https://github.com/yuzu-mirror/yuzu
synced 2024-12-25 11:53:11 +00:00
vk_compute_pass: Fix ASTC buffer setup synchronization
This commit is contained in:
parent
8b53209362
commit
a3ce26ae01
1 changed files with 14 additions and 14 deletions
|
@ -374,20 +374,20 @@ void ASTCDecoderPass::MakeDataBuffer() {
|
||||||
|
|
||||||
scheduler.Record([src = staging_ref.buffer, offset = staging_ref.offset, dst = *data_buffer,
|
scheduler.Record([src = staging_ref.buffer, offset = staging_ref.offset, dst = *data_buffer,
|
||||||
TOTAL_BUFFER_SIZE](vk::CommandBuffer cmdbuf) {
|
TOTAL_BUFFER_SIZE](vk::CommandBuffer cmdbuf) {
|
||||||
cmdbuf.CopyBuffer(src, dst,
|
static constexpr VkMemoryBarrier write_barrier{
|
||||||
VkBufferCopy{
|
.sType = VK_STRUCTURE_TYPE_MEMORY_BARRIER,
|
||||||
.srcOffset = offset,
|
.pNext = nullptr,
|
||||||
.dstOffset = 0,
|
.srcAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT,
|
||||||
.size = TOTAL_BUFFER_SIZE,
|
.dstAccessMask = VK_ACCESS_SHADER_READ_BIT,
|
||||||
});
|
};
|
||||||
cmdbuf.PipelineBarrier(
|
const VkBufferCopy copy{
|
||||||
VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, 0,
|
.srcOffset = offset,
|
||||||
VkMemoryBarrier{
|
.dstOffset = 0,
|
||||||
.sType = VK_STRUCTURE_TYPE_MEMORY_BARRIER,
|
.size = TOTAL_BUFFER_SIZE,
|
||||||
.pNext = nullptr,
|
};
|
||||||
.srcAccessMask = 0,
|
cmdbuf.CopyBuffer(src, dst, copy);
|
||||||
.dstAccessMask = VK_ACCESS_TRANSFER_READ_BIT | VK_ACCESS_TRANSFER_WRITE_BIT,
|
cmdbuf.PipelineBarrier(VK_PIPELINE_STAGE_TRANSFER_BIT, VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT,
|
||||||
});
|
0, write_barrier);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue