Class KHRGetPhysicalDeviceProperties2

java.lang.Object
org.lwjgl.vulkan.KHRGetPhysicalDeviceProperties2

public class KHRGetPhysicalDeviceProperties2 extends Object
This extension provides new queries for device features, device properties, and format properties that can be easily extended by other extensions, without introducing any further queries. The Vulkan 1.0 feature/limit/formatproperty structures do not include sType/pNext members. This extension wraps them in new structures with sType/pNext members, so an application can query a chain of feature/limit/formatproperty structures by constructing the chain and letting the implementation fill them in. A new command is added for each vkGetPhysicalDevice* command in core Vulkan 1.0. The new feature structure (and a pNext chain of extending structures) can also be passed in to device creation to enable features.

This extension also allows applications to use the physical-device components of device extensions before CreateDevice is called.

Promotion to Vulkan 1.1

All functionality in this extension is included in core Vulkan 1.1, with the KHR suffix omitted. The original type, enum, and command names are still available as aliases of the core functionality.

Examples

     // Get features with a hypothetical future extension.
     VkHypotheticalExtensionFeaturesKHR hypotheticalFeatures =
     {
         .sType = VK_STRUCTURE_TYPE_HYPOTHETICAL_FEATURES_KHR,
         .pNext = NULL,
     };
 
     VkPhysicalDeviceFeatures2KHR features =
     {
         .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2_KHR,
         .pNext = &hypotheticalFeatures,
     };
 
     // After this call, features and hypotheticalFeatures have been filled out.
     vkGetPhysicalDeviceFeatures2KHR(physicalDevice, &features);
 
     // Properties/limits can be chained and queried similarly.
 
     // Enable some features:
     VkHypotheticalExtensionFeaturesKHR enabledHypotheticalFeatures =
     {
         .sType = VK_STRUCTURE_TYPE_HYPOTHETICAL_FEATURES_KHR,
         .pNext = NULL,
     };
 
     VkPhysicalDeviceFeatures2KHR enabledFeatures =
     {
         .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2_KHR,
         .pNext = &enabledHypotheticalFeatures,
     };
 
     enabledFeatures.features.xyz = VK_TRUE;
     enabledHypotheticalFeatures.abc = VK_TRUE;
 
     VkDeviceCreateInfo deviceCreateInfo =
     {
         .sType = VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO,
         .pNext = &enabledFeatures,
         ...
         .pEnabledFeatures = NULL,
     };
 
     VkDevice device;
     vkCreateDevice(physicalDevice, &deviceCreateInfo, NULL, &device);
Name String
VK_KHR_get_physical_device_properties2
Extension Type
Instance extension
Registered Extension Number
60
Revision
2
Deprecation State
Contact
Other Extension Metadata
Last Modified Date
2017-09-05
IP Status
No known IP claims.
Contributors
  • Jeff Bolz, NVIDIA
  • Ian Elliott, Google