I began to write a piece of code to initialize Vulkan within SDL.I guess I currently am on the correct way, but I have a link error I don’t understand.
Did you make sure to define the preprocessor macro VK_USE_PLATFORM_XLIB_KHR? Defining that should resolve your undefined reference error. Also make sure to capitalize the “V” in “vkCreateXlibSurfaceKHR()”. :~)
Perhaps this particular platform is not staticaly linkable (by compiler or in the loader vulkan.lib). In some examples I seen those particular functions specificaly to be loaded beforehand with vkGetInstanceProcAddr() and vkGetDeviceProcAddr() - I suggest you try that.
And AFAIK there is no use of VK_PROTOTYPES (only VK_NO_PROTOTYPES).
Note: The extension is reported supported because the driver reports it supports the extension. Probably, the loader should filter out driver reported instance extensions that it doesn’t support. Device extensions don’t need loader support but instance extensions do.
Note: The extension is reported supported because the driver reports it supports the extension. Probably, the loader should filter out driver reported instance extensions that it doesn’t support. Device extensions don’t need loader support but instance extensions do.[/QUOTE]
Actually you can just load the extension entry points yourself
^ Said so too. But the LunarXchange issue #424 actually claims that doesn’t help either.
qnoper: Good choice - always better not to reinvent the wheel. Didn’t know they support Vulkan already… does it work?
The infrastructure is still a WIP so such problems will arise. I would note that the spec guarantees statically linkable WSI:
C.14:
The Khronos-provided Vulkan API loader for Android, Linux, and Windows exports functions for all core Vulkan API and WSI extension commands.
So it should in time work without explicit function loading. Also do note the version included in LunarG SDK is outdated behind the Khronos github master (could be already fixed).