[Vulkan 1.2] Related to physical device properties query


Before getting to the question, here’s the base; I’m updating my Vulkan SDK to 1.2 for my program. I want it to only adapt/use the latest SDK only, in this case, 1.2. I want to ensure that I only retrieve (and store) information relevant to that case, as per this specific question, from the physical device; the physical device properties.

As I check on the spec (and what I retrieved from the debugger), retrieving both

  • VkPhysicalDeviceProperties (using vkGetPhysicalDeviceProperties) and
  • VkPhysicalDeviceProperties2 (using vkGetPhysicalDeviceProperties2)

information are mostly the same. The only difference is the VkPhysicalDeviceProperties2 can link to properties of Vulkan 1.2 (VkPhysicalDeviceVulkan12Properties) and 1.1 (VkPhysicalDeviceVulkan11Properties) through pNext, as far as I see and tested it. VkPhysicalDeviceVulkan12Properties and VkPhysicalDeviceVulkan11Properties are completely different and I am so far assuming that 1.2 properties as an addition. These are what I can’t be sure about.

Since I don’t want to assume, my questions regarding to these are:

  1. Can I/Should rely on information retrieved only from vkGetPhysicalDeviceProperties2?
  2. As stated in 2nd paragraph, there seems to be, or at least I assume, a fallback to 1.1 properties. If I want to only focus on 1.2, must/should I also use that 1.1 properties, assuming that 1.2 properties is just an addition, or can I completely ignore it?

Thank you.

ps: I want to make a clear title which is ‘[Vulkan 1.2] Can I rely only on information from “VkPhysicalDeviceProperties2” and “VkPhysicalDeviceVulkan12Properties”?’, but the system keeps telling me that it is unclear or not a complete sentence, so I’m sorry if the current posted title forces you to get to this post first to get the idea of what I’m trying to ask.

vkGetPhysicalDeviceProperties2 takes, at a minimum, a VkPhysicalDeviceProperties object to fill in. And the standard even goes so far as to directly say “This structure is written with the same values as if it were written by vkGetPhysicalDeviceProperties.”

So given an instance that supports vkGetPhysicalDeviceProperties2, I’m not sure what utility you think might come from vkGetPhysicalDeviceProperties. Of course, the practical reality is that it will take time for 1.2 instances to become common-place, so until then, you need a fallback for 1.1 implementations.

I don’t see any paragraph that talks about a “fallback” of any kind. There are simply two different structures for two different sets of properties to query.

This question doesn’t make sense. Yes, the 1.2 properties are “just an addition,” but the 12Properties data structure doesn’t contain any of the properties from the 11Properties structure.

For example, the default subgroupSize for compute/fragment shaders is probably significant information to know about a device regardless of whether you’re using Vulkan 1.2 or 1.1. But only the 11Properties structure has that value.

The 1.2 properties are an addition, but that means they are an addition, not a replacement. You will likely still need the 1.1 properties, just like you will likely still need to use the data from the VkPhysicalDeviceProperties inside of VkPhysicalDeviceProperties2.

Okay, so just to summarize, I can use only vkGetPhysicalDeviceProperties2 information in context of only 1.2 usage (which is not currently practical therefore it’s better to provide fallback to 1.1), and as for the 12Properties, it is an additional information along with the 11Properties.

Just to clear a confusion in my word, what I meant about “fallback” was it refers to my 2nd paragraph where was I wrongly assumed that 11Properties is provided because some would just use the 11properties information while still taking advantage of Vulkan 1.2 features that, again I wrongly assumed, only uses the 12properties. As you said, they are completely different sets of properties containing important information regardless of Vulkan 1.2 or 1.1, so that “fallback” mindset of mine is wrong.

Thanks again for the confirmation.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.