Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validation warns VkBindImagePlaneMemoryInfo miss for VK_IMAGE_CREATE_DISJOINT_BIT images #372

Open
psionic12 opened this issue Sep 20, 2023 · 1 comment
Labels
feature Adding new feature future release To be done some time in the future

Comments

@psionic12
Copy link

For example:

    VkImageCreateInfo imageCreateInfo = {};
    imageCreateInfo.sType = VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO;
    imageCreateInfo.imageType = VK_IMAGE_TYPE_2D;
    imageCreateInfo.format = VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM;
    imageCreateInfo.flags = VK_IMAGE_CREATE_DISJOINT_BIT;

If calling vmaCreateImage() with this image create info, the validate layer will warn about this:

vkBindImageMemory(): In order to bind planes of a disjoint image, add a VkBindImagePlaneMemoryInfo structure to the pNext chain of VkBindImageMemoryInfo.
@adam-sawicki-a
Copy link
Contributor

Planar / disjoint images are not currently supported by VMA. Support may be added the future - thank you for this feature request.

You can use VMA to allocate memory for for such image, but you need to use lower-level functions:

  • Create the image using pure Vulkan vkCreateImage, call vkGetImageMemoryRequirements2 etc...
  • Allocate memory using function vmaAllocateMemory.
  • Bind image to memory using function vmaBindImageMemory2. You have an opportunity to pass pNext pointer there, which allows to attach required structure VkBindImagePlaneMemoryInfo.

@adam-sawicki-a adam-sawicki-a added feature Adding new feature future release To be done some time in the future labels Sep 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Adding new feature future release To be done some time in the future
Projects
None yet
Development

No branches or pull requests

2 participants