-
Notifications
You must be signed in to change notification settings - Fork 172
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
Unclear when non-core formats are allowed to be used #185
Comments
My personal opinion/inference is that when 1.0 came out, there were formats (ASTC/ETC/BC) that not everyone would support, but wanted to be part of "core Vulkan" and so the original feature bits were created. Over time, new formats (
That is why there is a
A lot of extensions, even if trivial, will (now) have a feature bit to prevent future cases if/when the extension is promoted to core (some extensions didn't have a feature and now have an alias bit which is more confusing)
For these exact features, there is a good chance most driver won't change, but some features (ex.
These are all added the There should still be proper validation coverage such that if you don't follow the common paradigm you will get validation errors when using non-enabled formats, if not, that is a validation layer bug and should be fixed. |
The rules of the images formats and their related features are as follows:
As far as I can tell, this usage pattern is consistent across all of the Hopefully that addresses most of the questions, but please feel free to ask for further clarification if I missed anything. |
"or if the feature is not enabled" means that you can query the implementation whether a specific Format is supported despite its Feature being unsupported\disabled.
Gives a guarantee a specific set of format usages for specific set of formats will be supported for optimal tiling Images. |
@r-potter suggested we take this up as an addition to the Vulkan Guide, so reassigning this issue over there. |
VkPhysicalDeviceFeatures
has thetextureCompressionBC
,textureCompressionETC2
, andtextureCompressionASTC_LDR
feature flags, giving us information about the relevant formats and whether they are supported with optimal tiling. There's also many more extensions and Vulkan versions providing new formats.Yet
vkGetPhysicalDeviceImageFormatProperties
is a physical device function, which means that it cannot know which extensions or which features we have enabled. And we seem to also be able to freely use any format that is reported as supported by the aforementioned function, even if the corresponding extension is not enabled. The spec also doesn't have any VUID which says anything about format extensions or format features to be enabled. The docs forvkGetPhysicalDeviceImageFormatProperties
reports:So, based on "or if the feature is not enabled", are the features just to quickly guarantee many formats to be usable in specific use-cases?
Reading through
VkPhysicalDevice4444FormatsFeaturesEXT
:How else would they be enabled? Does this mean enabling format features is entirely optional?
Now,
VkDeviceCreateInfo
requires us to provide aVkPhysicalDeviceFeatures
struct with all features we want to have enabled. So, what effect does enablingtextureCompressionBC
,textureCompressionETC2
, ortextureCompressionASTC_LDR
have? What's the point of enabling e.g.VK_IMG_format_pvrtc
if we can just query the format properties anyway to determine if we can use it? Are these just meta-extensions? Does the device even have to report VK_IMG_format_pvrtc` if the extensions are supported? Finally, why does this not follow the common extension/feature paradigm where we need to keep track of which features/extensions are available and were enabled, and determine our Vulkan usage based on that?The text was updated successfully, but these errors were encountered: