diff options
35 files changed, 54 insertions, 59 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index fa4dc2f4c..8dcd11967 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -325,7 +325,7 @@ set_option(VIDEO_COCOA "Use Cocoa video driver" ${APPLE}) set_option(DIRECTX "Use DirectX for Windows audio/video" ${WINDOWS}) set_option(RENDER_D3D "Enable the Direct3D render driver" ${WINDOWS}) set_option(VIDEO_VIVANTE "Use Vivante EGL video driver" ${UNIX_SYS}) -dep_option(VIDEO_VULKAN "Enable Vulkan surface creation" ON "ANDROID OR APPLE OR LINUX OR WINDOWS" OFF) +dep_option(VIDEO_VULKAN "Enable Vulkan support" ON "ANDROID OR APPLE OR LINUX OR WINDOWS" OFF) set_option(VIDEO_KMSDRM "Use KMS DRM video driver" ${UNIX_SYS}) dep_option(KMSDRM_SHARED "Dynamically load KMS DRM support" ON "VIDEO_KMSDRM" OFF) @@ -1518,7 +1518,7 @@ elseif(HAIKU) endif() if(VIDEO_VULKAN AND (NOT APPLE OR QUARTZCORE)) - set(SDL_VIDEO_VULKAN_SURFACE 1) + set(SDL_VIDEO_VULKAN 1) endif() # Dummies @@ -21957,7 +21957,7 @@ $as_echo "$as_me: WARNING: Sorry, Vulkan does not work on this configuration." > fi if test x$enable_video_vulkan = xyes; then -$as_echo "#define SDL_VIDEO_VULKAN_SURFACE 1" >>confdefs.h +$as_echo "#define SDL_VIDEO_VULKAN 1" >>confdefs.h SUMMARY_video="${SUMMARY_video} vulkan" fi diff --git a/configure.in b/configure.in index 3734cef44..ca3307eb3 100644 --- a/configure.in +++ b/configure.in @@ -2403,7 +2403,7 @@ CheckEmscriptenGLES() dnl Check to see if Vulkan surface support is desired AC_ARG_ENABLE(video-vulkan, -AC_HELP_STRING([--enable-video-vulkan], [include Vulkan surface support [[default=yes]]]), +AC_HELP_STRING([--enable-video-vulkan], [include Vulkan support [[default=yes]]]), , enable_video_vulkan=yes) dnl Find Vulkan Header @@ -2435,7 +2435,7 @@ CheckVulkan() fi fi if test x$enable_video_vulkan = xyes; then - AC_DEFINE(SDL_VIDEO_VULKAN_SURFACE, 1, [ ]) + AC_DEFINE(SDL_VIDEO_VULKAN, 1, [ ]) SUMMARY_video="${SUMMARY_video} vulkan" fi } diff --git a/docs/README-windows.md b/docs/README-windows.md index d133537f5..71f968eeb 100644 --- a/docs/README-windows.md +++ b/docs/README-windows.md @@ -42,4 +42,4 @@ Known Bugs: Vulkan Surface Support ============== -Support for creating Vulkan surfaces is configured on by default. To disable it change the value of `SDL_VIDEO_VULKAN_SURFACE` to 0 in `SDL_config_windows`. When it is on you must install a [Vulkan SDK](https://www.lunarg.com/vulkan-sdk/) in order to build libSDL. +Support for creating Vulkan surfaces is configured on by default. To disable it change the value of `SDL_VIDEO_VULKAN` to 0 in `SDL_config_windows.h`. You must install the [Vulkan SDK](https://www.lunarg.com/vulkan-sdk/) in order to use Vulkan graphics in your application. diff --git a/include/SDL_config.h.cmake b/include/SDL_config.h.cmake index 4998581a5..c57266c41 100644 --- a/include/SDL_config.h.cmake +++ b/include/SDL_config.h.cmake @@ -354,8 +354,8 @@ #cmakedefine SDL_VIDEO_OPENGL_OSMESA @SDL_VIDEO_OPENGL_OSMESA@ #cmakedefine SDL_VIDEO_OPENGL_OSMESA_DYNAMIC @SDL_VIDEO_OPENGL_OSMESA_DYNAMIC@ -/* Enable Vulkan surface support */ -#cmakedefine SDL_VIDEO_VULKAN_SURFACE @SDL_VIDEO_VULKAN_SURFACE@ +/* Enable Vulkan support */ +#cmakedefine SDL_VIDEO_VULKAN @SDL_VIDEO_VULKAN@ /* Enable system power support */ #cmakedefine SDL_POWER_ANDROID @SDL_POWER_ANDROID@ diff --git a/include/SDL_config.h.in b/include/SDL_config.h.in index 779543efe..8b3d20880 100644 --- a/include/SDL_config.h.in +++ b/include/SDL_config.h.in @@ -351,8 +351,8 @@ #undef SDL_VIDEO_OPENGL_OSMESA #undef SDL_VIDEO_OPENGL_OSMESA_DYNAMIC -/* Enable Vulkan surface support */ -#undef SDL_VIDEO_VULKAN_SURFACE +/* Enable Vulkan support */ +#undef SDL_VIDEO_VULKAN /* Enable system power support */ #undef SDL_POWER_LINUX diff --git a/include/SDL_config_android.h b/include/SDL_config_android.h index edc394451..361bad8b7 100644 --- a/include/SDL_config_android.h +++ b/include/SDL_config_android.h @@ -140,12 +140,12 @@ #define SDL_VIDEO_RENDER_OGL_ES 1 #define SDL_VIDEO_RENDER_OGL_ES2 1 -/* Enable Vulkan surface support */ +/* Enable Vulkan support */ /* Android does not support Vulkan in native code using the "armeabi" ABI. */ -#if !defined(__ARM_EABI__) || defined(__ARM_ARCH_7A__) -#define SDL_VIDEO_VULKAN_SURFACE 1 +#if defined(__ARM_ARCH) && __ARM_ARCH < 7 +#define SDL_VIDEO_VULKAN 0 #else -#define SDL_VIDEO_VULKAN_SURFACE 0 +#define SDL_VIDEO_VULKAN 1 #endif /* Enable system power support */ diff --git a/include/SDL_config_iphoneos.h b/include/SDL_config_iphoneos.h index 51bb0448f..deea03046 100644 --- a/include/SDL_config_iphoneos.h +++ b/include/SDL_config_iphoneos.h @@ -139,11 +139,11 @@ #define SDL_VIDEO_RENDER_OGL_ES 1 #define SDL_VIDEO_RENDER_OGL_ES2 1 -/* Enable Vulkan surface support */ +/* Enable Vulkan support */ #if !TARGET_OS_SIMULATOR && !TARGET_CPU_ARM // Only 64-bit devices have Metal -#define SDL_VIDEO_VULKAN_SURFACE 1 +#define SDL_VIDEO_VULKAN 1 #else -#define SDL_VIDEO_VULKAN_SURFACE 0 +#define SDL_VIDEO_VULKAN 0 #endif /* Enable system power support */ diff --git a/include/SDL_config_macosx.h b/include/SDL_config_macosx.h index 7fdd9f81b..eb6bbd9b1 100644 --- a/include/SDL_config_macosx.h +++ b/include/SDL_config_macosx.h @@ -174,12 +174,12 @@ #define SDL_VIDEO_OPENGL_GLX 1 #endif -/* enable Vulkan surface support */ +/* Enable Vulkan support */ +/* Metal/MoltenVK/Vulkan only supported on 64-bit architectures */ #if TARGET_CPU_X86_64 -/* Metal/MoltenVK/Vulkan not supported on 32-bit architectures. */ -#define SDL_VIDEO_VULKAN_SURFACE 1 +#define SDL_VIDEO_VULKAN 1 #else -#define SDL_VIDEO_VULKAN_SURFACE 0 +#define SDL_VIDEO_VULKAN 0 #endif /* Enable system power support */ diff --git a/include/SDL_config_windows.h b/include/SDL_config_windows.h index 23cdd5d1c..2456c843f 100644 --- a/include/SDL_config_windows.h +++ b/include/SDL_config_windows.h @@ -208,7 +208,8 @@ typedef unsigned int uintptr_t; #define SDL_VIDEO_OPENGL_EGL 1 #endif -#define SDL_VIDEO_VULKAN_SURFACE 1 +/* Enable Vulkan support */ +#define SDL_VIDEO_VULKAN 1 /* Enable system power support */ #define SDL_POWER_WINDOWS 1 diff --git a/src/video/SDL_vulkan_internal.h b/src/video/SDL_vulkan_internal.h index de44bd13e..f62996ed0 100644 --- a/src/video/SDL_vulkan_internal.h +++ b/src/video/SDL_vulkan_internal.h @@ -25,18 +25,12 @@ #include "SDL_stdinc.h" -#if defined(__ANDROID__) && defined(__ARM_ARCH) && __ARM_ARCH < 7 -/* Vulkan isn't supported for the 'armeabi' NDK ABI, error in vk_platform.h */ -#undef SDL_VIDEO_VULKAN_SURFACE -#define SDL_VIDEO_VULKAN_SURFACE 0 -#endif - #if defined(SDL_LOADSO_DISABLED) -#undef SDL_VIDEO_VULKAN_SURFACE -#define SDL_VIDEO_VULKAN_SURFACE 0 +#undef SDL_VIDEO_VULKAN +#define SDL_VIDEO_VULKAN 0 #endif -#if SDL_VIDEO_VULKAN_SURFACE +#if SDL_VIDEO_VULKAN #if SDL_VIDEO_DRIVER_ANDROID #define VK_USE_PLATFORM_ANDROID_KHR @@ -85,7 +79,7 @@ extern SDL_bool SDL_Vulkan_GetInstanceExtensions_Helper(unsigned *userCount, /* No SDL Vulkan support, just include the header for typedefs */ #include "SDL_vulkan.h" -#endif /* SDL_VIDEO_VULKAN_SURFACE */ +#endif /* SDL_VIDEO_VULKAN */ #endif /* SDL_vulkan_internal_h_ */ diff --git a/src/video/SDL_vulkan_utils.c b/src/video/SDL_vulkan_utils.c index d57140942..d71f1b761 100644 --- a/src/video/SDL_vulkan_utils.c +++ b/src/video/SDL_vulkan_utils.c @@ -23,7 +23,7 @@ #include "SDL_vulkan_internal.h" #include "SDL_error.h" -#if SDL_VIDEO_VULKAN_SURFACE +#if SDL_VIDEO_VULKAN /* Based on the headers found in * https://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers diff --git a/src/video/android/SDL_androidvideo.c b/src/video/android/SDL_androidvideo.c index d98870187..f600f736f 100644 --- a/src/video/android/SDL_androidvideo.c +++ b/src/video/android/SDL_androidvideo.c @@ -133,7 +133,7 @@ Android_CreateDevice(int devindex) device->GL_SwapWindow = Android_GLES_SwapWindow; device->GL_DeleteContext = Android_GLES_DeleteContext; -#if SDL_VIDEO_VULKAN_SURFACE +#if SDL_VIDEO_VULKAN device->Vulkan_LoadLibrary = Android_Vulkan_LoadLibrary; device->Vulkan_UnloadLibrary = Android_Vulkan_UnloadLibrary; device->Vulkan_GetInstanceExtensions = Android_Vulkan_GetInstanceExtensions; diff --git a/src/video/android/SDL_androidvulkan.c b/src/video/android/SDL_androidvulkan.c index cbb677add..e6cee24c5 100644 --- a/src/video/android/SDL_androidvulkan.c +++ b/src/video/android/SDL_androidvulkan.c @@ -26,7 +26,7 @@ #include "../../SDL_internal.h" -#if SDL_VIDEO_VULKAN_SURFACE && SDL_VIDEO_DRIVER_ANDROID +#if SDL_VIDEO_VULKAN && SDL_VIDEO_DRIVER_ANDROID #include "SDL_androidvideo.h" #include "SDL_androidwindow.h" diff --git a/src/video/android/SDL_androidvulkan.h b/src/video/android/SDL_androidvulkan.h index d7d372cd9..1b7d797be 100644 --- a/src/video/android/SDL_androidvulkan.h +++ b/src/video/android/SDL_androidvulkan.h @@ -32,7 +32,7 @@ #include "../SDL_vulkan_internal.h" #include "../SDL_sysvideo.h" -#if SDL_VIDEO_VULKAN_SURFACE && SDL_VIDEO_DRIVER_ANDROID +#if SDL_VIDEO_VULKAN && SDL_VIDEO_DRIVER_ANDROID int Android_Vulkan_LoadLibrary(_THIS, const char *path); void Android_Vulkan_UnloadLibrary(_THIS); diff --git a/src/video/cocoa/SDL_cocoavideo.m b/src/video/cocoa/SDL_cocoavideo.m index 9504a772a..18c6337cd 100644 --- a/src/video/cocoa/SDL_cocoavideo.m +++ b/src/video/cocoa/SDL_cocoavideo.m @@ -123,7 +123,7 @@ Cocoa_CreateDevice(int devindex) device->GL_DeleteContext = Cocoa_GL_DeleteContext; #endif -#if SDL_VIDEO_VULKAN_SURFACE +#if SDL_VIDEO_VULKAN device->Vulkan_LoadLibrary = Cocoa_Vulkan_LoadLibrary; device->Vulkan_UnloadLibrary = Cocoa_Vulkan_UnloadLibrary; device->Vulkan_GetInstanceExtensions = Cocoa_Vulkan_GetInstanceExtensions; diff --git a/src/video/cocoa/SDL_cocoavulkan.h b/src/video/cocoa/SDL_cocoavulkan.h index b97163506..1d4340580 100644 --- a/src/video/cocoa/SDL_cocoavulkan.h +++ b/src/video/cocoa/SDL_cocoavulkan.h @@ -33,7 +33,7 @@ #include "../SDL_vulkan_internal.h" #include "../SDL_sysvideo.h" -#if SDL_VIDEO_VULKAN_SURFACE && SDL_VIDEO_DRIVER_COCOA +#if SDL_VIDEO_VULKAN && SDL_VIDEO_DRIVER_COCOA int Cocoa_Vulkan_LoadLibrary(_THIS, const char *path); void Cocoa_Vulkan_UnloadLibrary(_THIS); diff --git a/src/video/cocoa/SDL_cocoavulkan.m b/src/video/cocoa/SDL_cocoavulkan.m index 0f6cbd126..e3b107d76 100644 --- a/src/video/cocoa/SDL_cocoavulkan.m +++ b/src/video/cocoa/SDL_cocoavulkan.m @@ -26,7 +26,7 @@ #include "../../SDL_internal.h" -#if SDL_VIDEO_VULKAN_SURFACE && SDL_VIDEO_DRIVER_COCOA +#if SDL_VIDEO_VULKAN && SDL_VIDEO_DRIVER_COCOA #include "SDL_cocoavideo.h" #include "SDL_cocoawindow.h" diff --git a/src/video/mir/SDL_mirvideo.c b/src/video/mir/SDL_mirvideo.c index 767ada378..147c06ea6 100644 --- a/src/video/mir/SDL_mirvideo.c +++ b/src/video/mir/SDL_mirvideo.c @@ -233,7 +233,7 @@ MIR_CreateDevice(int device_index) device->ShowMessageBox = NULL; -#if SDL_VIDEO_VULKAN_SURFACE +#if SDL_VIDEO_VULKAN device->Vulkan_LoadLibrary = MIR_Vulkan_LoadLibrary; device->Vulkan_UnloadLibrary = MIR_Vulkan_UnloadLibrary; device->Vulkan_GetInstanceExtensions = MIR_Vulkan_GetInstanceExtensions; diff --git a/src/video/mir/SDL_mirvulkan.c b/src/video/mir/SDL_mirvulkan.c index e81cb09ae..72abe8feb 100644 --- a/src/video/mir/SDL_mirvulkan.c +++ b/src/video/mir/SDL_mirvulkan.c @@ -26,7 +26,7 @@ #include "../../SDL_internal.h" -#if SDL_VIDEO_VULKAN_SURFACE && SDL_VIDEO_DRIVER_MIR +#if SDL_VIDEO_VULKAN && SDL_VIDEO_DRIVER_MIR #include "SDL_mirvideo.h" #include "SDL_mirwindow.h" diff --git a/src/video/mir/SDL_mirvulkan.h b/src/video/mir/SDL_mirvulkan.h index 42ad7ccc7..c0e36cfca 100644 --- a/src/video/mir/SDL_mirvulkan.h +++ b/src/video/mir/SDL_mirvulkan.h @@ -32,7 +32,7 @@ #include "../SDL_vulkan_internal.h" #include "../SDL_sysvideo.h" -#if SDL_VIDEO_VULKAN_SURFACE && SDL_VIDEO_DRIVER_MIR +#if SDL_VIDEO_VULKAN && SDL_VIDEO_DRIVER_MIR int MIR_Vulkan_LoadLibrary(_THIS, const char *path); void MIR_Vulkan_UnloadLibrary(_THIS); diff --git a/src/video/uikit/SDL_uikitmetalview.m b/src/video/uikit/SDL_uikitmetalview.m index a9d7875eb..f96f6d6fa 100644 --- a/src/video/uikit/SDL_uikitmetalview.m +++ b/src/video/uikit/SDL_uikitmetalview.m @@ -28,7 +28,7 @@ #include "../../SDL_internal.h" -#if SDL_VIDEO_VULKAN_SURFACE && SDL_VIDEO_DRIVER_UIKIT +#if SDL_VIDEO_VULKAN && SDL_VIDEO_DRIVER_UIKIT #import "../SDL_sysvideo.h" #import "SDL_uikitwindow.h" diff --git a/src/video/uikit/SDL_uikitvideo.m b/src/video/uikit/SDL_uikitvideo.m index 39969db78..44b26c154 100644 --- a/src/video/uikit/SDL_uikitvideo.m +++ b/src/video/uikit/SDL_uikitvideo.m @@ -102,13 +102,13 @@ UIKit_CreateDevice(int devindex) device->GetWindowWMInfo = UIKit_GetWindowWMInfo; device->GetDisplayUsableBounds = UIKit_GetDisplayUsableBounds; - #if SDL_IPHONE_KEYBOARD +#if SDL_IPHONE_KEYBOARD device->HasScreenKeyboardSupport = UIKit_HasScreenKeyboardSupport; device->ShowScreenKeyboard = UIKit_ShowScreenKeyboard; device->HideScreenKeyboard = UIKit_HideScreenKeyboard; device->IsScreenKeyboardShown = UIKit_IsScreenKeyboardShown; device->SetTextInputRect = UIKit_SetTextInputRect; - #endif +#endif device->SetClipboardText = UIKit_SetClipboardText; device->GetClipboardText = UIKit_GetClipboardText; @@ -124,14 +124,14 @@ UIKit_CreateDevice(int devindex) device->GL_LoadLibrary = UIKit_GL_LoadLibrary; device->free = UIKit_DeleteDevice; - #if SDL_VIDEO_VULKAN_SURFACE +#if SDL_VIDEO_VULKAN device->Vulkan_LoadLibrary = UIKit_Vulkan_LoadLibrary; device->Vulkan_UnloadLibrary = UIKit_Vulkan_UnloadLibrary; device->Vulkan_GetInstanceExtensions = UIKit_Vulkan_GetInstanceExtensions; device->Vulkan_CreateSurface = UIKit_Vulkan_CreateSurface; device->Vulkan_GetDrawableSize = UIKit_Vulkan_GetDrawableSize; - #endif +#endif device->gl_config.accelerated = 1; diff --git a/src/video/uikit/SDL_uikitvulkan.h b/src/video/uikit/SDL_uikitvulkan.h index 55eeacf27..f06c11189 100644 --- a/src/video/uikit/SDL_uikitvulkan.h +++ b/src/video/uikit/SDL_uikitvulkan.h @@ -32,7 +32,7 @@ #include "../SDL_vulkan_internal.h" #include "../SDL_sysvideo.h" -#if SDL_VIDEO_VULKAN_SURFACE && SDL_VIDEO_DRIVER_UIKIT +#if SDL_VIDEO_VULKAN && SDL_VIDEO_DRIVER_UIKIT int UIKit_Vulkan_LoadLibrary(_THIS, const char *path); void UIKit_Vulkan_UnloadLibrary(_THIS); diff --git a/src/video/uikit/SDL_uikitvulkan.m b/src/video/uikit/SDL_uikitvulkan.m index 2e951f8dd..4a0257fe0 100644 --- a/src/video/uikit/SDL_uikitvulkan.m +++ b/src/video/uikit/SDL_uikitvulkan.m @@ -26,7 +26,7 @@ #include "../../SDL_internal.h" -#if SDL_VIDEO_VULKAN_SURFACE && SDL_VIDEO_DRIVER_UIKIT +#if SDL_VIDEO_VULKAN && SDL_VIDEO_DRIVER_UIKIT #include "SDL_uikitvideo.h" #include "SDL_uikitwindow.h" diff --git a/src/video/wayland/SDL_waylandvideo.c b/src/video/wayland/SDL_waylandvideo.c index 7c936a74d..e17c99901 100644 --- a/src/video/wayland/SDL_waylandvideo.c +++ b/src/video/wayland/SDL_waylandvideo.c @@ -182,7 +182,7 @@ Wayland_CreateDevice(int devindex) device->GetClipboardText = Wayland_GetClipboardText; device->HasClipboardText = Wayland_HasClipboardText; -#if SDL_VIDEO_VULKAN_SURFACE +#if SDL_VIDEO_VULKAN device->Vulkan_LoadLibrary = Wayland_Vulkan_LoadLibrary; device->Vulkan_UnloadLibrary = Wayland_Vulkan_UnloadLibrary; device->Vulkan_GetInstanceExtensions = Wayland_Vulkan_GetInstanceExtensions; diff --git a/src/video/wayland/SDL_waylandvulkan.c b/src/video/wayland/SDL_waylandvulkan.c index f5a9a3a78..818c642ea 100644 --- a/src/video/wayland/SDL_waylandvulkan.c +++ b/src/video/wayland/SDL_waylandvulkan.c @@ -26,7 +26,7 @@ #include "../../SDL_internal.h" -#if SDL_VIDEO_VULKAN_SURFACE && SDL_VIDEO_DRIVER_WAYLAND +#if SDL_VIDEO_VULKAN && SDL_VIDEO_DRIVER_WAYLAND #include "SDL_waylandvideo.h" #include "SDL_waylandwindow.h" diff --git a/src/video/wayland/SDL_waylandvulkan.h b/src/video/wayland/SDL_waylandvulkan.h index 51c12c2ef..5ad4f4d95 100644 --- a/src/video/wayland/SDL_waylandvulkan.h +++ b/src/video/wayland/SDL_waylandvulkan.h @@ -32,7 +32,7 @@ #include "../SDL_vulkan_internal.h" #include "../SDL_sysvideo.h" -#if SDL_VIDEO_VULKAN_SURFACE && SDL_VIDEO_DRIVER_WAYLAND +#if SDL_VIDEO_VULKAN && SDL_VIDEO_DRIVER_WAYLAND int Wayland_Vulkan_LoadLibrary(_THIS, const char *path); void Wayland_Vulkan_UnloadLibrary(_THIS); diff --git a/src/video/windows/SDL_windowsvideo.c b/src/video/windows/SDL_windowsvideo.c index bff2f4f41..6907bc26c 100644 --- a/src/video/windows/SDL_windowsvideo.c +++ b/src/video/windows/SDL_windowsvideo.c @@ -191,7 +191,7 @@ WIN_CreateDevice(int devindex) device->GL_SwapWindow = WIN_GLES_SwapWindow; device->GL_DeleteContext = WIN_GLES_DeleteContext; #endif -#if SDL_VIDEO_VULKAN_SURFACE +#if SDL_VIDEO_VULKAN device->Vulkan_LoadLibrary = WIN_Vulkan_LoadLibrary; device->Vulkan_UnloadLibrary = WIN_Vulkan_UnloadLibrary; device->Vulkan_GetInstanceExtensions = WIN_Vulkan_GetInstanceExtensions; diff --git a/src/video/windows/SDL_windowsvulkan.c b/src/video/windows/SDL_windowsvulkan.c index 2bd4b66b4..ec3ef2818 100644 --- a/src/video/windows/SDL_windowsvulkan.c +++ b/src/video/windows/SDL_windowsvulkan.c @@ -26,7 +26,7 @@ #include "../../SDL_internal.h" -#if SDL_VIDEO_VULKAN_SURFACE && SDL_VIDEO_DRIVER_WINDOWS +#if SDL_VIDEO_VULKAN && SDL_VIDEO_DRIVER_WINDOWS #include "SDL_windowsvideo.h" #include "SDL_windowswindow.h" diff --git a/src/video/windows/SDL_windowsvulkan.h b/src/video/windows/SDL_windowsvulkan.h index 82284b14f..82e6760c3 100644 --- a/src/video/windows/SDL_windowsvulkan.h +++ b/src/video/windows/SDL_windowsvulkan.h @@ -32,7 +32,7 @@ #include "../SDL_vulkan_internal.h" #include "../SDL_sysvideo.h" -#if SDL_VIDEO_VULKAN_SURFACE && SDL_VIDEO_DRIVER_WINDOWS +#if SDL_VIDEO_VULKAN && SDL_VIDEO_DRIVER_WINDOWS int WIN_Vulkan_LoadLibrary(_THIS, const char *path); void WIN_Vulkan_UnloadLibrary(_THIS); diff --git a/src/video/x11/SDL_x11video.c b/src/video/x11/SDL_x11video.c index a84dbdeb7..a845eebc2 100644 --- a/src/video/x11/SDL_x11video.c +++ b/src/video/x11/SDL_x11video.c @@ -296,7 +296,7 @@ X11_CreateDevice(int devindex) device->free = X11_DeleteDevice; -#if SDL_VIDEO_VULKAN_SURFACE +#if SDL_VIDEO_VULKAN device->Vulkan_LoadLibrary = X11_Vulkan_LoadLibrary; device->Vulkan_UnloadLibrary = X11_Vulkan_UnloadLibrary; device->Vulkan_GetInstanceExtensions = X11_Vulkan_GetInstanceExtensions; diff --git a/src/video/x11/SDL_x11video.h b/src/video/x11/SDL_x11video.h index 1b11aeb87..b58f46886 100644 --- a/src/video/x11/SDL_x11video.h +++ b/src/video/x11/SDL_x11video.h @@ -141,7 +141,7 @@ typedef struct SDL_VideoData KeyCode filter_code; Time filter_time; -#if SDL_VIDEO_VULKAN_SURFACE +#if SDL_VIDEO_VULKAN /* Vulkan variables only valid if _this->vulkan_config.loader_handle is not NULL */ void *vulkan_xlib_xcb_library; PFN_XGetXCBConnection vulkan_XGetXCBConnection; diff --git a/src/video/x11/SDL_x11vulkan.c b/src/video/x11/SDL_x11vulkan.c index 3cba3001e..3894f3792 100644 --- a/src/video/x11/SDL_x11vulkan.c +++ b/src/video/x11/SDL_x11vulkan.c @@ -20,7 +20,7 @@ */ #include "../../SDL_internal.h" -#if SDL_VIDEO_VULKAN_SURFACE && SDL_VIDEO_DRIVER_X11 +#if SDL_VIDEO_VULKAN && SDL_VIDEO_DRIVER_X11 #include "SDL_x11video.h" #include "SDL_assert.h" diff --git a/src/video/x11/SDL_x11vulkan.h b/src/video/x11/SDL_x11vulkan.h index d028473f8..881b19def 100644 --- a/src/video/x11/SDL_x11vulkan.h +++ b/src/video/x11/SDL_x11vulkan.h @@ -25,7 +25,7 @@ #include "../SDL_vulkan_internal.h" -#if SDL_VIDEO_VULKAN_SURFACE && SDL_VIDEO_DRIVER_X11 +#if SDL_VIDEO_VULKAN && SDL_VIDEO_DRIVER_X11 typedef struct xcb_connection_t xcb_connection_t; typedef xcb_connection_t *(*PFN_XGetXCBConnection)(Display *dpy); |