I am building a 3d renderer in C++ using Vulkan.hpp. I have a pipeline that is trying to…
- User
I am building a 3d renderer in C++ using Vulkan.hpp. I have a pipeline that is trying to upsample input textures. The input textures have half the width and half the height of the output image. I currently have two imageview attachments for a framebuffer. One for the input texture and another for the output image. I am running into issues trying to align the heights and widths of the two imageview attachments, the framebuffer, render area extent and pipeline viewport size. I have currently aligned the framebuffer, render area and viewport size to the resolution of the output image. However, I am getting errors because the input image size differs from the extent of the framebuffer. It says that the attachment images may be smaller than the size of the framebuffer, but not larger. How can I align the various extent sizes to allow me to upsample images?
- Assistant
- User
Unfortunately this still causes the issue. Using your example, I have set the framebuffer width and height to the output width and height. However, because the input width and height are larger than the output width and height, I am getting an error: VUID-VkFramebufferCreateInfo-flags-04533(ERROR / SPEC): msgNum: -26532824 - Validation Error: [ VUID-VkFramebufferCreateInfo-flags-04533 ] Object 0: handle = 0x132b56c08f0, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xfe6b2428 | vkCreateFramebuffer(): VkFramebufferCreateInfo attachment #0 mip level 0 has width (400) smaller than the corresponding framebuffer width (800). The Vulkan spec states: If flags does not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of pAttachments that is used as an input, color, resolve, or depth/stencil attachment by renderPass must have been created with a VkImageCreateInfo::extent.width greater than or equal to width () Objects: 1 [0] 0x132b56c08f0, type: 3, name: NULL VUID-VkFramebufferCreateInfo-flags-04534(ERROR / SPEC): msgNum: 2011804586 - Validation Error: [ VUID-VkFramebufferCreateInfo-flags-04534 ] Object 0: handle = 0x132b56c08f0, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x77e9b3aa | vkCreateFramebuffer(): VkFramebufferCreateInfo attachment #0 mip level 0 has height (300) smaller than the corresponding framebuffer height (600). The Vulkan spec states: If flags does not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, each element of pAttachments that is used as an input, color, resolve, or depth/stencil attachment by renderPass must have been created with a VkImageCreateInfo::extent.height greater than or equal to height () Objects: 1 [0] 0x132b56c08f0, type: 3, name: NULL
- Assistant
- User
I don't see how any of those approaches will work. In order to sample the image and upscale it to a larger image I still need to supply the input and output images to the framebuffer, which will both be of different sizes. The approach you are suggesting is in fact the approach I am using to upscale the image, but I keep running into this issue.
- Assistant
- User
- Assistant