缺少标准 linux vulkan 库中的 vulkan 符号?

Missing vulkan symbols from standard linux vulkan library?

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

例如:

这是为什么?

$ 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, vkDe stroyDebugReportCallbackEXT, 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、vkRegister ObjectsNVX、vkReleaseDisplayEXT、vkSetDebugUtilsObjectNameEXT、vkSetDebugUtilsObjectTagEXT、vkSetHdrMetadataEXT、vkSubmitDebugUtilsMessageEXT、vkUnregisterObjectsNVX。

根据 LoaderAndLayerInterface.md:

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

这意味着它 may\does 不导出非核心非 "appropriate"-WSI 命令。