shader fix

This commit is contained in:
Jorijn van der Graaf 2025-05-03 02:34:38 +02:00
commit 01a3211dfb
7 changed files with 10 additions and 13 deletions

View file

@ -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);
}
};
}