跳转至

vkGetPhysicalDeviceFeatures

函数原型

1
2
3
void vkGetPhysicalDeviceFeatures(
    VkPhysicalDevice                            physicalDevice,
    VkPhysicalDeviceFeatures*                   pFeatures);

描述

查询物理设备支持的功能特性。

参数

  • physicalDevice : 查询的物理设备。

  • pFeatures : VkPhysicalDeviceFeatures 结构体指针,返回物理设备支持的功能特性。对于每个功能,VK_TRUE 值代表支持,VK_FALSE 代表不支持。

返回值

代码示例

1
2
3
4
// get device features from device 0 
VkPhysicalDevice physicalDevice = GetPhysicalDevices(0);
VkPhysicalDeviceFeatures deviceFeatures = {}
vkGetPhysicalDeviceFeatures(physicalDevice, &deviceFeatures);