Бранимир Караџић 2 years ago
parent
commit
82b70a0230
2 changed files with 13 additions and 10 deletions
  1. 1 1
      src/renderer_vk.cpp
  2. 12 9
      src/renderer_vk.h

+ 1 - 1
src/renderer_vk.cpp

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

+ 12 - 9
src/renderer_vk.h

@@ -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 */                                                      \