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

VUID-VkDeviceImageMemoryRequirements-pCreateInfo-06420 issues #2309

Open
Rua opened this issue Feb 14, 2024 · 2 comments
Open

VUID-VkDeviceImageMemoryRequirements-pCreateInfo-06420 issues #2309

Rua opened this issue Feb 14, 2024 · 2 comments
Assignees

Comments

@Rua
Copy link
Contributor

Rua commented Feb 14, 2024

VUID-VkDeviceImageMemoryRequirements-pCreateInfo-06420 currently states:

If pCreateInfo->tiling is VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT, then planeAspect must be a single valid memory plane for the image (that is, aspectMask must specify a plane index that is less than the VkDrmFormatModifierPropertiesEXT::drmFormatModifierPlaneCount associated with the image’s format and VkImageDrmFormatModifierPropertiesEXT::drmFormatModifier

This VUID seems to have been copied more or less directly from VUID-VkImagePlaneMemoryRequirementsInfo-planeAspect-02282, but in the context of VkDeviceImageMemoryRequirements there's some issues with it.

First, unlike VUID 02282, VUID 06420 applies to all DRM format modifier images, regardless of whether they are disjoint or not. For a non-disjoint image, all planes share a single memory binding, so it does not make any sense to query the memory requirements for a specific plane. This VUID should apply only to disjoint images, and for non-disjoint images, VkDeviceImageMemoryRequirements::planeAspect should be ignored.

Secondly, VUID 06420 applies at a time when the image object has not yet been created. The DRM format modifier is not known until after image creation, and the user cannot query the VkImageDrmFormatModifierPropertiesEXT until then. Only the list of potential DRM format modifiers is known, via the VkImageDrmFormatModifierListCreateInfoEXT structure in the pNext chain. This also means that there are multiple potential values for drmFormatModifierPlaneCount, and it's not clear which one the planeAspects value should be compared against.

@Rua Rua changed the title VkDeviceImageMemoryRequirements is inconsistent with VkImageMemoryRequirementsInfo2 for DRM formats VkDeviceImageMemoryRequirements requires a planeAspect for non-disjoint DRM formats Feb 14, 2024
@Rua Rua changed the title VkDeviceImageMemoryRequirements requires a planeAspect for non-disjoint DRM formats VUID-VkDeviceImageMemoryRequirements-pCreateInfo-06420 issues Feb 14, 2024
@ShabbyX
Copy link
Contributor

ShabbyX commented Feb 21, 2024

FYI @versalinyaa

@oddhack
Copy link
Contributor

oddhack commented Feb 21, 2024

Assigned to @versalinyaa for triage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants