在vulkan标头(/usr/include/vulkan/*
中声明的某些符号未在vulkan库(libvulkan.so.1.1.82
)中定义。 (我在使用标准vulkan软件包libvulkan1
和libvulkan-dev
的Ubuntu 18.04上)
例如:
vkCreateInstance
在vulkan标头中声明,并在vulkan库中定义vkCmdBeginConditionalRenderingEXT
在vulkan标头中声明,但在那是为什么?
$ 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,vkCreateObjectTableNVX,vkCreateRenderPass2KHR,vkCreateValidationCacheEXT,vkDebugMarkerSetObjectNameEXT,vkDebugMarkerSetObjectTagEXT,vkDebugReportMessageEXT,vkDestr oyDebugReportCallbackEXT,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,vkRegisterObj ectsNVX,vkReleaseDisplayEXT,vkSetDebugUtilsObjectNameEXT,vkSetDebugUtilsObjectTagEXT,vkSetHdrMetadataEXT,vkSubmitDebugUtilsMessageEXT,vkUnregisterObjectsNVX。
答案 0 :(得分:1)
Windows,Linux,Android和MacOS上的加载程序库将导出所有核心Vulkan和所有适当的Window System Interface(WSI)扩展。
这意味着它可能\不会导出非核心非“适当”的WSI命令。