vulGet API vkGetPhysicalDeviceProperties2上的SIGSEGV

问题描述

我有2个GPU。我尝试使用vkGetPhysicalDeviceProperties2获得VkPhysicalDeviceIDProperties。可以在nvidia GPU上运行,但是在Intel GPU上可以SIGSEGV:

auto fpGetPhysicalDeviceProperties2 = (PFN_vkGetPhysicalDeviceProperties2) vkGetInstanceProcAddr(instance,"vkGetPhysicalDeviceProperties2");

VkPhysicalDeviceIDProperties vkPhysicalDeviceIDProperties{};
vkPhysicalDeviceIDProperties.sType =
    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES;
vkPhysicalDeviceIDProperties.pNext = NULL;

VkPhysicalDeviceProperties2 vkPhysicalDeviceProperties2 = {};
vkPhysicalDeviceProperties2.sType =
    VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2;
vkPhysicalDeviceProperties2.pNext = &vkPhysicalDeviceIDProperties;

fpGetPhysicalDeviceProperties2(_physical_device,&vkPhysicalDeviceProperties2);

首先,我怀疑intel GPU可能不支持vkGetPhysicalDeviceProperties2。但是,vulkaninfo表示,英特尔GPU具有apiVersion 1.2.131,绝对具有该功能。 vulkaninfo实际上可以为两个GPU返回PhysicalDeviceProperties2。知道吗,我在这里做错了什么?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...