Missing vulkan symbols from standard linux vulkan library?

有些话、适合烂在心里 提交于 2021-02-10 06:35:27

问题


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)

For example:

  • 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.

Why is that?

$ 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

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.


回答1:


Per LoaderAndLayerInterface.md:

The loader library on Windows, Linux, Android and MacOS will export all core Vulkan and all appropriate Window System Interface (WSI) extensions.

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



来源:https://stackoverflow.com/questions/53463410/missing-vulkan-symbols-from-standard-linux-vulkan-library

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!