本文介绍了缺少标准 linux vulkan 库中的 vulkan 符号?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 vulkan 头文件 (/usr/include/vulkan/*) 中声明的某些符号未在 vulkan 库 (libvulkan.so.1.1.82) 中定义>).(我在 Ubuntu 18.04 上使用标准的 vulkan 包,libvulkan1libvulkan-dev)

Some of the symbols declared in the vulkan headers (/usr/include/vulkan/*) are not defined in the vulkan library (libvulkan.so.1.1.82). (I'm on Ubuntu 18.04 using the standard vulkan packages, libvulkan1 and libvulkan-dev)

例如:

  • vkCreateInstance 在 vulkan 头文件中声明,并在 vulkan 库中定义
  • vkCmdBeginConditionalRenderingEXT 在 vulkan 标头中声明,但在 vulkan 库中定义.
  • vkCreateInstance is declared in the vulkan headers, and defined in the vulkan library
  • vkCmdBeginConditionalRenderingEXT is declared in the vulkan headers, but is not defined in the vulkan library.

这是为什么?

$ cat > t.cc 
#include <vulkan/vulkan.h>
int main() {
    { constexpr auto x = vkCmdBeginConditionalRenderingEXT; (void)x; }
}
^D
$ g++ t.cc -lvulkan
/tmp/cczuSwiY.o: In function `main':
t.cc:(.text+0x7): undefined reference to `vkCmdBeginConditionalRenderingEXT'
collect2: error: ld returned 1 exit status

这样缺失的命令的完整列表是:vkCmdBeginConditionalRenderingEXT,vkCmdBeginDebugUtilsLabelEXT,vkCmdBeginRenderPass2KHR,vkCmdDebugMarkerBeginEXT,vkCmdDebugMarkerEndEXT,vkCmdDebugMarkerInsertEXT,vkCmdDrawIndexedIndirectCountAMD,vkCmdDrawIndexedIndirectCountKHR,vkCmdDrawIndirectCountAMD,vkCmdDrawIndirectCountKHR,vkCmdEndConditionalRenderingEXT,vkCmdEndDebugUtilsLabelEXT,vkCmdEndRenderPass2KHR,vkCmdInsertDebugUtilsLabelEXT,vkCmdNextSubpass2KHR,vkCmdProcessCommandsNVX,vkCmdPushDescriptorSetKHR,vkCmdPushDescriptorSetWithTemplateKHR,vkCmdReserveSpaceForCommandsNVX,vkCmdSetCheckpointNV、vkCmdSetDiscardRectangleEXT、vkCmdSetSampleLocationsEXT、vkCmdSetViewportWScalingNV、vkCmdWriteBufferMarkerAMD、vkCreateDebugReportCallbackEXT、vkCreateDebugUtilsMessengerEXT、vkCreateIndirectCommandsLayoutNVX、vkCreateIndirectCommandsLayoutNVX、vkCreateIndirectCommandsLayoutNVX、vkCreateValiderValiderRenderNameT、vkCmdSetViewportWScalingNV、vkCmdWriteBufferMarkerAMDoyDebugReportCallbackEXT,vkDestroyDebugUtilsMessengerEXT,vkDestroyIndi​​rectCommandsLayoutNVX,vkDestroyObjectTableNVX,vkDestroyValidationCacheEXT,vkDisplayPowerControlEXT,vkGetFenceFdKHR,vkGetMemoryFdKHR,vkGetMemoryFdPropertiesKHR,vkGetMemoryHostPointerPropertiesEXT,vkGetPastPresentationTimingGOOGLE,vkGetPhysicalDeviceExternalImageFormatPropertiesNV,vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX,vkGetPhysicalDeviceMultisamplePropertiesEXT,vkGetPhysicalDeviceSurfaceCapabilities2EXT,vkGetPhysicalDeviceSurfaceCapabilities2KHR,vkGetPhysicalDeviceSurfaceFormats2KHR,vkGetQueueCheckpointDataNV,vkGetRefreshCycleDurationGOOGLE,vkGetSemaphoreFdKHR,vkGetShaderInfoAMD,vkGetSwapchainCounterEXT,vkGetSwapchainStatusKHR,vkGetValidationCacheDataEXT,vkImportFenceFdKHR,vkImportSemaphoreFdKHR、vkMergeValidationCachesEXT、vkQueueBeginDebugUtilsLabelEXT、vkQueueEndDebugUtilsLabelEXT、vkQueueInsertDebugUtilsLabelEXT、vkRegisterDeviceEventEXT、vkRegisterDisplayEventEXT、vkRegisterObjectsNVX、vkReleaseDisplayEXT、vkSetDebugUtilsObjectNameEXT、vkSetDebugUtilsObjectTagEXT、vkSetHdrMetadataEXT、vkSubmitDebugUtilsMessageEXT、vkUnregisterObjectsNVX.

The full list of such missing commands is: vkCmdBeginConditionalRenderingEXT, vkCmdBeginDebugUtilsLabelEXT, vkCmdBeginRenderPass2KHR, vkCmdDebugMarkerBeginEXT, vkCmdDebugMarkerEndEXT, vkCmdDebugMarkerInsertEXT, vkCmdDrawIndexedIndirectCountAMD, vkCmdDrawIndexedIndirectCountKHR, vkCmdDrawIndirectCountAMD, vkCmdDrawIndirectCountKHR, vkCmdEndConditionalRenderingEXT, vkCmdEndDebugUtilsLabelEXT, vkCmdEndRenderPass2KHR, vkCmdInsertDebugUtilsLabelEXT, vkCmdNextSubpass2KHR, vkCmdProcessCommandsNVX, vkCmdPushDescriptorSetKHR, vkCmdPushDescriptorSetWithTemplateKHR, vkCmdReserveSpaceForCommandsNVX, vkCmdSetCheckpointNV, vkCmdSetDiscardRectangleEXT, vkCmdSetSampleLocationsEXT, vkCmdSetViewportWScalingNV, vkCmdWriteBufferMarkerAMD, vkCreateDebugReportCallbackEXT, vkCreateDebugUtilsMessengerEXT, vkCreateIndirectCommandsLayoutNVX, vkCreateObjectTableNVX, vkCreateRenderPass2KHR, vkCreateValidationCacheEXT, vkDebugMarkerSetObjectNameEXT, vkDebugMarkerSetObjectTagEXT, vkDebugReportMessageEXT, vkDestroyDebugReportCallbackEXT, vkDestroyDebugUtilsMessengerEXT, vkDestroyIndirectCommandsLayoutNVX, vkDestroyObjectTableNVX, vkDestroyValidationCacheEXT, vkDisplayPowerControlEXT, vkGetFenceFdKHR, vkGetMemoryFdKHR, vkGetMemoryFdPropertiesKHR, vkGetMemoryHostPointerPropertiesEXT, vkGetPastPresentationTimingGOOGLE, vkGetPhysicalDeviceExternalImageFormatPropertiesNV, vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX, vkGetPhysicalDeviceMultisamplePropertiesEXT, vkGetPhysicalDeviceSurfaceCapabilities2EXT, vkGetPhysicalDeviceSurfaceCapabilities2KHR, vkGetPhysicalDeviceSurfaceFormats2KHR, vkGetQueueCheckpointDataNV, vkGetRefreshCycleDurationGOOGLE, vkGetSemaphoreFdKHR, vkGetShaderInfoAMD, vkGetSwapchainCounterEXT, vkGetSwapchainStatusKHR, vkGetValidationCacheDataEXT, vkImportFenceFdKHR, vkImportSemaphoreFdKHR, vkMergeValidationCachesEXT, vkQueueBeginDebugUtilsLabelEXT, vkQueueEndDebugUtilsLabelEXT, vkQueueInsertDebugUtilsLabelEXT, vkRegisterDeviceEventEXT, vkRegisterDisplayEventEXT, vkRegisterObjectsNVX, vkReleaseDisplayEXT, vkSetDebugUtilsObjectNameEXT, vkSetDebugUtilsObjectTagEXT, vkSetHdrMetadataEXT, vkSubmitDebugUtilsMessageEXT, vkUnregisterObjectsNVX.

推荐答案

Per LoaderAndLayerInterface.md:

Windows、Linux、Android 和 MacOS 上的加载程序库将导出所有核心 Vulkan 和所有适当的窗口系统接口 (WSI) 扩展.

这意味着它可能\不导出非核心非适当"-WSI 命令.

That implies it may\does not export non-core non-"appropriate"-WSI commands.

这篇关于缺少标准 linux vulkan 库中的 vulkan 符号?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-22 13:29