UgPhysicalDevice
Physical device enumeration and selection utilities
getProperties
Get the properties of a physical device
VkPhysicalDeviceProperties getProperties(VkPhysicalDevice device);Parameters
device— Physical device to query
Returns — Device properties struct
typeName
Get a human-readable name for a physical device type
const I8* typeName(VkPhysicalDeviceType type);Parameters
type— Vulkan device type enum value
Returns — Null-terminated string name for the type
hasExtensions
Check whether a physical device supports the required extensions
U8 hasExtensions(VkPhysicalDevice device);Parameters
device— Physical device to check
Returns — Non-zero if all required extensions are supported
count
Get the number of physical devices available in the instance
U32 count(VkInstance instance);Parameters
instance— Vulkan instance to query
Returns — Number of available physical devices
list
Print a list of all available physical devices to the log
U0 list(VkInstance instance);Parameters
instance— Vulkan instance to query
get
Get a physical device by desired type, falling back if unavailable
VkPhysicalDevice get(VkInstance instance, VkSurfaceKHR surface, U8 desiredType);Parameters
instance— Vulkan instance to querysurface— Surface used for presentation support checksdesiredType— Preferred VkPhysicalDeviceType
Returns — Selected physical device handle
create
Select and create the best physical device for rendering
VkPhysicalDevice create(VkInstance instance, VkSurfaceKHR surface);Parameters
instance— Vulkan instance to querysurface— Surface used for presentation support checks
Returns — Selected physical device handle