36#define _GLFW_FIND_LOADER 1
37#define _GLFW_REQUIRE_LOADER 2
53#if !defined(_GLFW_VULKAN_STATIC)
54#if defined(_GLFW_VULKAN_LIBRARY)
56#elif defined(_GLFW_WIN32)
58#elif defined(_GLFW_COCOA)
78 "Vulkan: Loader does not export vkGetInstanceProcAddr");
89 "Vulkan: Failed to retrieve vkEnumerateInstanceExtensionProperties");
103 "Vulkan: Failed to query instance extension count: %s",
117 "Vulkan: Failed to query instance extensions: %s",
125 for (i = 0; i < count; i++)
127 if (strcmp(ep[i].extensionName,
"VK_KHR_surface") == 0)
129#if defined(_GLFW_WIN32)
130 else if (strcmp(ep[i].extensionName,
"VK_KHR_win32_surface") == 0)
132#elif defined(_GLFW_COCOA)
133 else if (strcmp(ep[i].extensionName,
"VK_MVK_macos_surface") == 0)
135 else if (strcmp(ep[i].extensionName,
"VK_EXT_metal_surface") == 0)
137#elif defined(_GLFW_X11)
138 else if (strcmp(ep[i].extensionName,
"VK_KHR_xlib_surface") == 0)
140 else if (strcmp(ep[i].extensionName,
"VK_KHR_xcb_surface") == 0)
142#elif defined(_GLFW_WAYLAND)
143 else if (strcmp(ep[i].extensionName,
"VK_KHR_wayland_surface") == 0)
159#if !defined(_GLFW_VULKAN_STATIC)
172 return "A fence or query has not yet completed";
174 return "A wait operation has not completed in the specified time";
176 return "An event is signaled";
178 return "An event is unsignaled";
180 return "A return array was too small for the result";
182 return "A host memory allocation has failed";
184 return "A device memory allocation has failed";
186 return "Initialization of an object could not be completed for implementation-specific reasons";
188 return "The logical or physical device has been lost";
190 return "Mapping of a memory object has failed";
192 return "A requested layer is not present or could not be loaded";
194 return "A requested extension is not supported";
196 return "A requested feature is not supported";
198 return "The requested version of Vulkan is not supported by the driver or is otherwise incompatible";
200 return "Too many objects of the type have already been created";
202 return "A requested format is not supported on this device";
204 return "A surface is no longer available";
206 return "A swapchain no longer matches the surface properties exactly, but can still be used";
208 return "A surface has changed in such a way that it is no longer compatible with the swapchain";
210 return "The display used by a swapchain does not use the same presentable image layout";
212 return "The requested window is already connected to a VkSurfaceKHR, or to some other non-Vulkan API";
214 return "A validation layer found an error";
216 return "ERROR: UNKNOWN VULKAN ERROR";
233 assert(count !=
NULL);
250 const char* procname)
253 assert(procname !=
NULL);
261#if defined(_GLFW_VULKAN_STATIC)
264 if (strcmp(procname,
"vkGetInstanceProcAddr") == 0)
290 "Vulkan: Window surface creation extensions not found");
306 assert(window !=
NULL);
307 assert(surface !=
NULL);
319 "Vulkan: Window surface creation extensions not found");
326 "Vulkan: Window surface creation requires the window to have the client API set to GLFW_NO_API");
void * _glfwLoadLocalVulkanLoaderNS(void)
void _glfwPlatformGetRequiredInstanceExtensions(char **extensions)
VkResult _glfwPlatformCreateWindowSurface(VkInstance instance, _GLFWwindow *window, const VkAllocationCallbacks *allocator, VkSurfaceKHR *surface)
int _glfwPlatformGetPhysicalDevicePresentationSupport(VkInstance instance, VkPhysicalDevice device, uint32_t queuefamily)
#define GLFW_API_UNAVAILABLE
GLFW could not find support for the requested API on the system.
#define GLFW_INVALID_VALUE
One of the arguments to the function was an invalid value.
void(* GLFWvkproc)(void)
Vulkan API function pointer type.
GLFWAPI int glfwVulkanSupported(void)
Returns whether the Vulkan loader and an ICD have been found.
GLFWAPI const char ** glfwGetRequiredInstanceExtensions(uint32_t *count)
Returns the Vulkan instance extensions required by GLFW.
struct GLFWwindow GLFWwindow
Opaque window object.
void _glfwInputError(int code, const char *format,...)
#define _GLFW_REQUIRE_INIT_OR_RETURN(x)
@ VK_ERROR_INCOMPATIBLE_DISPLAY_KHR
struct _GLFWlibrary::@25 vk
PFN_vkGetInstanceProcAddr GetInstanceProcAddr
PFN_vkEnumerateInstanceExtensionProperties EnumerateInstanceExtensionProperties
#define _GLFW_FIND_LOADER
GLFWbool _glfwInitVulkan(int mode)
GLFWAPI VkResult glfwCreateWindowSurface(VkInstance instance, GLFWwindow *handle, const VkAllocationCallbacks *allocator, VkSurfaceKHR *surface)
GLFWAPI int glfwGetPhysicalDevicePresentationSupport(VkInstance instance, VkPhysicalDevice device, uint32_t queuefamily)
void _glfwTerminateVulkan(void)
const char * _glfwGetVulkanResultString(VkResult result)
GLFWAPI GLFWvkproc glfwGetInstanceProcAddress(VkInstance instance, const char *procname)
#define _GLFW_REQUIRE_LOADER
PFN_vkVoidFunction(GLAD_API_PTR * PFN_vkGetInstanceProcAddr)(VkInstance instance, const char *pName)
VkResult(GLAD_API_PTR * PFN_vkEnumerateInstanceExtensionProperties)(const char *pLayerName, uint32_t *pPropertyCount, VkExtensionProperties *pProperties)
@ VK_ERROR_VALIDATION_FAILED_EXT
@ VK_ERROR_EXTENSION_NOT_PRESENT
@ VK_ERROR_OUT_OF_HOST_MEMORY
@ VK_ERROR_INITIALIZATION_FAILED
@ VK_ERROR_OUT_OF_DEVICE_MEMORY
@ VK_ERROR_NATIVE_WINDOW_IN_USE_KHR
@ VK_ERROR_OUT_OF_DATE_KHR
@ VK_ERROR_FORMAT_NOT_SUPPORTED
@ VK_ERROR_SURFACE_LOST_KHR
@ VK_ERROR_FEATURE_NOT_PRESENT
@ VK_ERROR_TOO_MANY_OBJECTS
@ VK_ERROR_MEMORY_MAP_FAILED
@ VK_ERROR_LAYER_NOT_PRESENT
@ VK_ERROR_INCOMPATIBLE_DRIVER
#define vkGetInstanceProcAddr
#define vkEnumerateInstanceExtensionProperties