shader fix
This commit is contained in:
parent
ae312807fc
commit
01a3211dfb
7 changed files with 10 additions and 13 deletions
|
|
@ -34,19 +34,19 @@ namespace Crafter {
|
|||
imageInfo.usage = usage;
|
||||
imageInfo.samples = VK_SAMPLE_COUNT_1_BIT;
|
||||
imageInfo.sharingMode = VK_SHARING_MODE_EXCLUSIVE;
|
||||
VulkanDevice::CHECK_VK_RESULT(vkCreateImage(device, &imageInfo, nullptr, &image));
|
||||
VulkanDevice::CHECK_VK_RESULT(vkCreateImage(VulkanDevice::device, &imageInfo, nullptr, &image));
|
||||
|
||||
VkMemoryRequirements memRequirements;
|
||||
vkGetImageMemoryRequirements(device, image, &memRequirements);
|
||||
vkGetImageMemoryRequirements(VulkanDevice::device, image, &memRequirements);
|
||||
|
||||
VkMemoryAllocateInfo allocInfo{};
|
||||
allocInfo.sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO;
|
||||
allocInfo.allocationSize = memRequirements.size;
|
||||
allocInfo.memoryTypeIndex = findMemoryType(memRequirements.memoryTypeBits, properties);
|
||||
|
||||
VulkanDevice::CHECK_VK_RESULT(vkAllocateMemory(device, &allocInfo, nullptr, &imageMemory));
|
||||
VulkanDevice::CHECK_VK_RESULT(vkAllocateMemory(VulkanDevice::device, &allocInfo, nullptr, &imageMemory));
|
||||
|
||||
vkBindImageMemory(device, image, imageMemory, 0);
|
||||
vkBindImageMemory(VulkanDevice::device, image, imageMemory, 0);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue