release build

Hello

unfortunatelly I can’t find anything about the errorcode
“VK_ERROR_SURFACE_LOST_KHR” in the spec, so I have to ask another question.
I would like to know a good reason for loosing connection to the surface in each
release build but not in debug build. I don’t get it. It doesn’t matter if I change between
x86 or x64 bit build either.
That’s a strange behaviour I’m struggling with.
Thanks for answers. You are welcome!

If this only happens in a release build you probably got some uninitialized values in there. Make sure you init all Vulkan structures where possible so that unless you specify different all values are set to zero. Also run your application with validation layers enabled as they’ll catch pretty much all uninitialized/bogus values helping your where to actually look for them.

I had this error too. The problem was that I was not passing HWND and HINSTANCE correctly to the VkWin32SurfaceCreateInfoKHR structure. I’m passing HWND and HINSTANCE as references so far to make sure that they are not invalid.