KhronosGroup / Vulkan-LoaderAndValidationLayers

**Deprecated repository** for Vulkan loader and validation layers
Apache License 2.0
414 stars 172 forks source link

VK_IMAGE_CREATE_EXTENDED_USAGE_BIT not referenced in VU checks #2658

Open cdwfs opened 6 years ago

cdwfs commented 6 years ago

I don't have a specific error in mind here, but it seems alarming that VK_IMAGE_CREATE_EXTENDED_USAGE_BIT isn't used in any image / image view validation checks.

For reference, here's the entirety of what the spec says about this bit:

Definition:

VK_IMAGE_CREATE_EXTENDED_USAGE_BIT specifies that the image can be created with usage flags that are not supported for the format the image is created with but are supported for at least one format a VkImageView created from the image can have.

Before VUs for VkImageCreateInfo:

  • For images created without VK_IMAGE_CREATE_EXTENDED_USAGE_BIT a usage bit is valid if it is supported for the format the image is created with.
  • For images created with VK_IMAGE_CREATE_EXTENDED_USAGE_BIT a usage bit is valid if it is supported for at least one of the formats a VkImageView created from the image can have (see Image Views for more detail).

Based on that second quote, it sounds like the bit should be used to select which usage flags are checked further down the line.

daveh-lunarg commented 6 years ago

I'm a bit confused by this. There was some minimal support for EXTENDED_USAGE as of PR #2567, but it looks like it was stripped out by the 1.1.73 header change PR #2585. Looking into it.