Use device local memory property flag instead of heap flag (Fixes #161)

This commit is contained in:
saschawillems 2016-05-30 21:00:47 +02:00
parent 75a6f46c4a
commit 6f1ab815c8

View file

@ -347,7 +347,7 @@ public:
VK_CHECK_RESULT(vkCreateImage(device, &image, nullptr, &frameBuf->depth.image));
vkGetImageMemoryRequirements(device, frameBuf->depth.image, &memReqs);
memAlloc.allocationSize = memReqs.size;
memAlloc.memoryTypeIndex = getMemoryType(memReqs.memoryTypeBits, VK_MEMORY_HEAP_DEVICE_LOCAL_BIT);
memAlloc.memoryTypeIndex = getMemoryType(memReqs.memoryTypeBits, VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT);
VK_CHECK_RESULT(vkAllocateMemory(device, &memAlloc, nullptr, &frameBuf->depth.mem));
VK_CHECK_RESULT(vkBindImageMemory(device, frameBuf->depth.image, frameBuf->depth.mem, 0));