Merge pull request #153 from pbantolas/fix-textoverlay-allocsize

Fix textoverlay demo to use correct allocation size.
This commit is contained in:
Sascha Willems 2016-05-19 20:27:41 +02:00
commit 0458969f11

View file

@ -219,7 +219,8 @@ public:
VK_CHECK_RESULT(vkCreateImage(device, &imageInfo, nullptr, &image)); VK_CHECK_RESULT(vkCreateImage(device, &imageInfo, nullptr, &image));
allocInfo.allocationSize = STB_FONT_WIDTH * STB_NUM_CHARS; vkGetImageMemoryRequirements(device, image, &memReqs);
allocInfo.allocationSize = memReqs.size;
getMemoryType(memReqs.memoryTypeBits, VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT, &allocInfo.memoryTypeIndex); getMemoryType(memReqs.memoryTypeBits, VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT, &allocInfo.memoryTypeIndex);
VK_CHECK_RESULT(vkAllocateMemory(device, &allocInfo, nullptr, &imageMemory)); VK_CHECK_RESULT(vkAllocateMemory(device, &allocInfo, nullptr, &imageMemory));