Riki
Riki

Reputation: 3

what's the difference between Vulkan Device Extensions and Vulkan Device Features?

I can use vkEnumerateDeviceExtensionProperties() to get all the device extensions that implementation supported, and I can query the features that implementation supported using vkGetPhysicalDeviceFeatures2(). Now I found that I can query does implementation support VkPhysicalDeviceScalarBlockLayoutFeatures, and I found "VK_EXT_scalar_block_layout" extension exists in device extensions array, that means I can enable this either by passing VkPhysicalDeviceScalarBlockLayoutFeatures to VkDeviceCreateInfo or passing extension names to VkDeviceCreateInfo. So, does these two thing the same? I'm confused about this.

what's the difference between Vulkan Device Extensions and Vulkan Device Features?

Upvotes: 0

Views: 675

Answers (1)

Nicol Bolas
Nicol Bolas

Reputation: 474076

Many pieces of functionality that were introduced as extensions are adopted into the core Vulkan API. However, some hardware doesn't support some of that functionality, so they are often adopted as optional features of the core Vulkan API. Later versions of Vulkan can make optional features mandatory.

Both the extension and feature versions of the scalar block functionality do the same thing. However, you have to activate them in different ways and query support for them in different ways. So they are equivalent, but not identical.

Upvotes: 3

Related Questions