2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00

vk_texture_cache: Amend mismatched access masks and indices in UploadBuffer

Discovered while converting relevant parts of the codebase over to
designated initializers.
This commit is contained in:
Lioncash 2020-07-16 19:45:43 -04:00
parent 267d483ed4
commit 169759e069

View file

@ -281,12 +281,10 @@ void CachedSurface::UploadBuffer(const std::vector<u8>& staging_buffer) {
VkBufferMemoryBarrier barrier; VkBufferMemoryBarrier barrier;
barrier.sType = VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER; barrier.sType = VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER;
barrier.pNext = nullptr; barrier.pNext = nullptr;
barrier.srcAccessMask = VK_PIPELINE_STAGE_TRANSFER_BIT; barrier.srcAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT;
barrier.dstAccessMask = VK_PIPELINE_STAGE_VERTEX_SHADER_BIT; barrier.dstAccessMask = VK_ACCESS_SHADER_READ_BIT;
barrier.srcQueueFamilyIndex = VK_ACCESS_TRANSFER_WRITE_BIT; barrier.srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED; // They'll be ignored anyway
barrier.dstQueueFamilyIndex = VK_ACCESS_SHADER_READ_BIT; barrier.dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
barrier.srcQueueFamilyIndex = 0;
barrier.dstQueueFamilyIndex = 0;
barrier.buffer = dst_buffer; barrier.buffer = dst_buffer;
barrier.offset = 0; barrier.offset = 0;
barrier.size = size; barrier.size = size;