Various Vulkan image transition fixes and related

This commit is contained in:
Henrik Rydgård committed 2017-10-20 18:09:05 +02:00
1 parent 5da165fad6
commit 804aa79376
9 files changed
+70 -55

No files matched your search

+7 -1
View File
@@ -47,10 +47,16 @@ bool VulkanPushBuffer::AddBuffer() {
return false;
}
VkMemoryRequirements reqs;
vkGetBufferMemoryRequirements(device_, info.buffer, &reqs);
// TODO: We really should use memoryTypeIndex here..
// Okay, that's the buffer. Now let's allocate some memory for it.
VkMemoryAllocateInfo alloc = { VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO };
// TODO: Should check here that memoryTypeIndex_ matches reqs.memoryTypeBits.
alloc.memoryTypeIndex = memoryTypeIndex_;
alloc.allocationSize = size_;
alloc.allocationSize = reqs.size;
res = vkAllocateMemory(device_, &alloc, nullptr, &info.deviceMemory);
if (VK_SUCCESS != res) {