34 #define _GLFW_FIND_LOADER 1 35 #define _GLFW_REQUIRE_LOADER 2 51 #if !defined(_GLFW_VULKAN_STATIC) 52 #if defined(_GLFW_VULKAN_LIBRARY) 54 #elif defined(_GLFW_WIN32) 56 #elif defined(_GLFW_COCOA) 74 "Vulkan: Loader does not export vkGetInstanceProcAddr");
85 "Vulkan: Failed to retrieve vkEnumerateInstanceExtensionProperties");
90 #endif // _GLFW_VULKAN_STATIC 99 "Vulkan: Failed to query instance extension count: %s",
113 "Vulkan: Failed to query instance extensions: %s",
121 for (i = 0; i <
count; i++)
123 if (strcmp(ep[i].extensionName,
"VK_KHR_surface") == 0)
125 #if defined(_GLFW_WIN32) 126 else if (strcmp(ep[i].extensionName,
"VK_KHR_win32_surface") == 0)
128 #elif defined(_GLFW_COCOA) 129 else if (strcmp(ep[i].extensionName,
"VK_MVK_macos_surface") == 0)
131 #elif defined(_GLFW_X11) 132 else if (strcmp(ep[i].extensionName,
"VK_KHR_xlib_surface") == 0)
134 else if (strcmp(ep[i].extensionName,
"VK_KHR_xcb_surface") == 0)
136 #elif defined(_GLFW_WAYLAND) 137 else if (strcmp(ep[i].extensionName,
"VK_KHR_wayland_surface") == 0)
153 #if !defined(_GLFW_VULKAN_STATIC) 166 return "A fence or query has not yet completed";
168 return "A wait operation has not completed in the specified time";
170 return "An event is signaled";
172 return "An event is unsignaled";
174 return "A return array was too small for the result";
176 return "A host memory allocation has failed";
178 return "A device memory allocation has failed";
180 return "Initialization of an object could not be completed for implementation-specific reasons";
182 return "The logical or physical device has been lost";
184 return "Mapping of a memory object has failed";
186 return "A requested layer is not present or could not be loaded";
188 return "A requested extension is not supported";
190 return "A requested feature is not supported";
192 return "The requested version of Vulkan is not supported by the driver or is otherwise incompatible";
194 return "Too many objects of the type have already been created";
196 return "A requested format is not supported on this device";
198 return "A surface is no longer available";
200 return "A swapchain no longer matches the surface properties exactly, but can still be used";
202 return "A surface has changed in such a way that it is no longer compatible with the swapchain";
204 return "The display used by a swapchain does not use the same presentable image layout";
206 return "The requested window is already connected to a VkSurfaceKHR, or to some other non-Vulkan API";
208 return "A validation layer found an error";
210 return "ERROR: UNKNOWN VULKAN ERROR";
244 const char* procname)
255 #if defined(_GLFW_VULKAN_STATIC) 258 if (strcmp(procname,
"vkGetInstanceProcAddr") == 0)
284 "Vulkan: Window surface creation extensions not found");
313 "Vulkan: Window surface creation extensions not found");
320 "Vulkan: Window surface creation requires the window to have the client API set to GLFW_NO_API");
GLFWAPI GLFWvkproc glfwGetInstanceProcAddress(VkInstance instance, const char *procname)
PFN_vkEnumerateInstanceExtensionProperties EnumerateInstanceExtensionProperties
GLuint64 GLenum void * handle
GLFWAPI int glfwVulkanSupported(void)
Returns whether the Vulkan loader and an ICD have been found.
GLFWbool _glfwInitVulkan(int mode)
struct _GLFWlibrary::@29 vk
#define GLFW_API_UNAVAILABLE
GLFW could not find support for the requested API on the system.
void(* GLFWvkproc)(void)
Vulkan API function pointer type.
GLFWAPI int glfwGetPhysicalDevicePresentationSupport(VkInstance instance, VkPhysicalDevice device, uint32_t queuefamily)
#define _GLFW_REQUIRE_INIT_OR_RETURN(x)
VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateInstanceExtensionProperties(const char *pLayerName, uint32_t *pPropertyCount, VkExtensionProperties *pProperties)
PFN_vkGetInstanceProcAddr GetInstanceProcAddr
VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vkGetInstanceProcAddr(VkInstance instance, const char *pName)
void _glfwInputError(int code, const char *format,...)
const char * _glfwGetVulkanResultString(VkResult result)
#define GLFW_INVALID_VALUE
One of the arguments to the function was an invalid value.
VkResult(VKAPI_PTR * PFN_vkEnumerateInstanceExtensionProperties)(const char *pLayerName, uint32_t *pPropertyCount, VkExtensionProperties *pProperties)
PFN_vkVoidFunction(VKAPI_PTR * PFN_vkGetInstanceProcAddr)(VkInstance instance, const char *pName)
GLFWAPI VkResult glfwCreateWindowSurface(VkInstance instance, GLFWwindow *handle, const VkAllocationCallbacks *allocator, VkSurfaceKHR *surface)
void _glfwPlatformGetRequiredInstanceExtensions(char **extensions)
int _glfwPlatformGetPhysicalDevicePresentationSupport(VkInstance instance, VkPhysicalDevice device, uint32_t queuefamily)
#define _GLFW_FIND_LOADER
GLFWAPI const char ** glfwGetRequiredInstanceExtensions(uint32_t *count)
Returns the Vulkan instance extensions required by GLFW.
void _glfwTerminateVulkan(void)
#define _GLFW_REQUIRE_LOADER
VkResult _glfwPlatformCreateWindowSurface(VkInstance instance, _GLFWwindow *window, const VkAllocationCallbacks *allocator, VkSurfaceKHR *surface)
struct GLFWwindow GLFWwindow