I started a vulkan project and I use glfw for window / surface stuff. everything works great so far but when I try to create a surface via glfwCreateWindowSurface() I recieve the following error:
“Vulkan: Window surface creation extensions not found”
glfwGetRequiredInstanceExtensions() returns NULL, and number of extensions is 0. So I know thats the exact error.
All 3 functions are called in the order I mentioned them. So the strange thing is:
glfwVulkanSupported() returns true!
vkEnumerateInstanceExtensionProperties() gives an output of:
VK_KHR_surface
VK_KHR_xcb_surface
VK_EXT_debug_report
So the extension I need is there (VK_KHR_surface)! I read the glfw reference of glfwGetRequiredInstanceExtensions() and it doesn’t offer any help really, 'cause everything that could fail, works… the only thing mentioned on the reference page is:
If Vulkan is available but no set of extensions allowing window surface creation was found, this function returns NULL. You may still use Vulkan for off-screen rendering and compute work.
… okay… but I do want to render on-screen
So any help or guesses?
I’m using a NVIDIA GEFORCE GT 710, driver: NVIDIA binary driver - version 364.16 from nvidia-364 (open source)
I checked support before I started developing and my graphics card does support vulkan.
vulkaninfo output is quite long. I posted the SDK version before. But here is the whole output: vulkan output
(too long for a forum post I guess)
I also tried to install a driver from that page first, which didn’t work on ubuntu really: vulkan driver
But ubuntu offered recent (mentioned above) driver, which does support vulkan.
So my guess is that you’re missing libX11-xcb.so - if this isn’t the case it would have handy to put breakpoints in the above functions to see what’s happening.
well libX11-xcb.so.1 is located in /usr/lib/x86_64-linux-gnu. so I guess that one is available?
I read in another forum that someone had the same error appearing. but it turned out that he called window creation after instance creation, which caused the error. but in my case it’s different. isn’t there any easy stupid mistake I could’ve done, before debugging glfw…?
_glfw.x11.x11xcb.handle = dlopen(“libX11-xcb.so”, RTLD_LAZY | RTLD_GLOBAL);
if (_glfw.x11.x11xcb.handle)
{
_glfw.x11.x11xcb.XGetXCBConnection = (XGETXCBCONNECTION_T)
dlsym(_glfw.x11.x11xcb.handle, “XGetXCBConnection”);
}
else
{printf(“couldn’t open libX11-xcb.so\n”);}
ran cmake, make, installed it… but it didn’t seem to apply the changes… I didn’t recieve any output… so I’m really stucked in creating the window surface
It’s possible for your code to not call the printf’s but still fail to provide any required extensions.
I would either debug the code with a debugger, or add printf debugging on paths where you’re guaranteed to have the code execute such as at the start of the function or before every return.
I’m having a similar problem… glfwInit works fine, glfwGetRequiredInstanceExtensions() returns NULL, glfwVulkanSupported() returns false.
Still, the Vulkan samples (that come with the Vulkan SDK) works fine, and vulkaninfo seems to work fine too.
I’m thinking it has something to do with the vulkan loader?
On ubuntu 14.04, GTX840M, nvidia drivers 367.44, GLFW 3.2.1 (using cmake).
I should say also im running the same project on windows through Visual Studio, which works FINE (on another PC though, with a GTX970).
I worked for a bit to get vulkan.c to run. It seems i wasn’t linking to libvulkan properly (i had thought glfw did that for me). Anyway, after getting vulkan.c to run, my project runs too Thanks for the help!