From b88af607547a79816726adb39acc5afedf978dd6 Mon Sep 17 00:00:00 2001 From: Danny Holman Date: Tue, 19 Nov 2024 14:53:39 -0600 Subject: render: fix missing Vk*CreateInfo struct members Fix several instances of missing structure defines that cause validation errors. Signed-off-by: Danny Holman --- render/vulkan/image.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'render/vulkan/image.c') diff --git a/render/vulkan/image.c b/render/vulkan/image.c index d82b809..9160fee 100644 --- a/render/vulkan/image.c +++ b/render/vulkan/image.c @@ -8,7 +8,12 @@ int _create_image_view(struct vkimage *image, struct vkdev *dev, VkFormat format vcinfo.pNext = NULL; vcinfo.flags = 0; vcinfo.image = image->handle; + vcinfo.viewType = VK_IMAGE_VIEW_TYPE_2D; vcinfo.format = format; + vcinfo.components.r = VK_COMPONENT_SWIZZLE_R; + vcinfo.components.g = VK_COMPONENT_SWIZZLE_G; + vcinfo.components.b = VK_COMPONENT_SWIZZLE_B; + vcinfo.components.a = VK_COMPONENT_SWIZZLE_A; vcinfo.subresourceRange.aspectMask = aflags; vcinfo.subresourceRange.baseMipLevel = 0; vcinfo.subresourceRange.levelCount = 1; @@ -49,6 +54,7 @@ struct vkimage* create_vkimage(struct vkdev *dev, VkFormat format, uint32_t widt VkMemoryAllocateInfo mainfo; mainfo.sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO; + mainfo.pNext = NULL; mainfo.allocationSize = mem_req.size; mainfo.memoryTypeIndex = mem_type; vkassert(vkAllocateMemory(dev->ldev, &mainfo, NULL, &ret->memory)); -- cgit v1.2.3