-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GLFW and Vulkan does not work together #3300
Comments
This program runs for me (as in, it infinite loops when run from RenderDoc or not). Going by what you're saying it sounds like you're running this on wayland, and RenderDoc does not support wayland (see #853). Have you tried running this on X? I'm not familiar with wayland as I've never used it personally but I believe it has an X compatibility mode you may need to install or configure. As long as your application has the correct path to choose which system is used depending on availability your program should be able to determine from the available extensions which to use. If the bug you're meaning is that glfw should be reporting extensions for X use when run under RenderDoc, you'd need to either report that to glfw or explain here what is wrong at the API level that's causing glfw to misbehave. RenderDoc does not handle glfw directly as it is a library not a system API, so you would need to explain the problem at the API level itself. |
Ok, forcing the application to run under xwayland does get over glfwGetRequiredInstanceExtensions. |
ERROR_EXTENSION_NOT_PRESENT is not a crash, it's an error message that indicates that an extension that was specified to be enabled is not available. It is extremely likely that this is caused by your application being written incorrectly. Are you properly enumerating that extensions are available before enabling them? |
That is from my program. It checks for vulkan error and terminate if it encounters any. This ERROR_EXTENSION_NOT_PRESENT came from that. |
I understand that, I mean that an error message isn't the same as a crash. In this case I suspect the error message is entirely accurate - you didn't answer my question above, have you checked that your program is written correctly? If you enable extensions that are not supported then that error is the correct and expected return value. |
My program is written correctly. I think the offending instance extensions is VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME, removing it solve the ERROR_EXTENSION_NOT_PRESENT. Annoyingly, renderdoc still does not work with my program and I am greeted by ERROR_OUT_OF_DATE_KHR which likewise was not there when executing outside of renderdoc. This is probably due to swapchain recreation not being implemented yet, but I don't think the behavior of a program should change depended on whether or not it is executed inside or outside renderdoc. |
If your program is unconditionally enabling that VK_KHR_portability_enumeration without checking if it's available or not then no your program is not written correctly, and the error is exactly correct in identifying what you are doing wrong as I was saying above. If you program is invalid and does not use the API correctly then it is not expected to behave correctly under RenderDoc. |
Description
I am building a game engine using Vullkan and GLFW. I tried using renderdoc to debug a problem I am having but the program crash right away.
After digging, I found out that the function glfwGetRequiredInstanceExtensions return an empty array. In normal execution, it return "VK_KHR_surface" and "VK_KHR_wayland_surface".
This cause these extensions not to be included in instance creation.
Steps to reproduce
Normally, the assertion succeeds and the program loop forever. In renderdoc, the program terminates almost immediately.
This is more noticeable using renderdoccmd.
Environment
The text was updated successfully, but these errors were encountered: