Must VkFormat extensions be enabled before use?


#1

I need to understand if it is the intention that extensions which add values to VkFormat have to be enabled before those formats can possibly be used.

I have found 2 extensions that add to VkFormat: VK_IMG_format_pvrtc and VK_KHR_sampler_ycbcr_conversion. I can’t find any text for the first and the latter adds additional items beyond just formats. Both have been added to Vulkan 1.1. I’ve not been able to determine an answer to my question.

Another way of asking it is, can you just use vkGetPhysicalDeviceFormatProperties to check if the implementation supports the features you want to use with an extension format or will all features show as unsupported if the extension has not been enabled?

This question is related to a spec I am writing and is looking towards the future.


#2

I need to understand if it is the intention that extensions which add values to VkFormat have to be enabled before those formats can possibly be used.

Yes, every feature and/or extension you want to use must be enabled before first use.

Another way of asking it is, can you just use vkGetPhysicalDeviceFormatProperties to check if the implementation supports the features you want to use with an extension format or will all features show as unsupported if the extension has not been enabled?

Exactly. Querying the implementations physical features will always tell you what features are supported and not what features have been enabled. So query this first, and if the feature you require is supported you can use it after enabling it.