This commit is contained in:
Бранимир Караџић 2023-08-15 09:27:39 +02:00
parent 64e83a0ec2
commit 82b70a0230
2 changed files with 13 additions and 10 deletions

View File

@ -19,7 +19,7 @@
#if WL_EGL_PLATFORM
# include <wayland-egl-backend.h>
#endif
#endif // WL_EGL_PLATFORM
namespace bgfx { namespace vk
{

View File

@ -6,19 +6,23 @@
#ifndef BGFX_RENDERER_VK_H_HEADER_GUARD
#define BGFX_RENDERER_VK_H_HEADER_GUARD
#ifndef WL_EGL_PLATFORM
# define WL_EGL_PLATFORM 0
#endif // WL_EGL_PLATFORM
#if BX_PLATFORM_ANDROID
# define VK_USE_PLATFORM_ANDROID_KHR
# define KHR_SURFACE_EXTENSION_NAME VK_KHR_ANDROID_SURFACE_EXTENSION_NAME
# define VK_IMPORT_INSTANCE_PLATFORM VK_IMPORT_INSTANCE_ANDROID
#elif BX_PLATFORM_LINUX
#if WL_EGL_PLATFORM
# define VK_USE_PLATFORM_WAYLAND_KHR
# define KHR_SURFACE_EXTENSION_NAME VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME
#else
# define VK_USE_PLATFORM_XLIB_KHR
# define VK_USE_PLATFORM_XCB_KHR
# define KHR_SURFACE_EXTENSION_NAME VK_KHR_XCB_SURFACE_EXTENSION_NAME
#endif // WL_EGL_PLATFORM
# if WL_EGL_PLATFORM
# define VK_USE_PLATFORM_WAYLAND_KHR
# define KHR_SURFACE_EXTENSION_NAME VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME
# else
# define VK_USE_PLATFORM_XLIB_KHR
# define VK_USE_PLATFORM_XCB_KHR
# define KHR_SURFACE_EXTENSION_NAME VK_KHR_XCB_SURFACE_EXTENSION_NAME
# endif // WL_EGL_PLATFORM
# define VK_IMPORT_INSTANCE_PLATFORM VK_IMPORT_INSTANCE_LINUX
#elif BX_PLATFORM_WINDOWS
# define VK_USE_PLATFORM_WIN32_KHR
@ -72,7 +76,6 @@
VK_IMPORT_INSTANCE_FUNC(true, vkCreateWaylandSurfaceKHR); \
VK_IMPORT_INSTANCE_FUNC(true, vkGetPhysicalDeviceWaylandPresentationSupportKHR); \
#else
#define VK_IMPORT_INSTANCE_LINUX \
/* VK_KHR_xlib_surface */ \