mirror of https://github.com/encounter/SDL.git
Be clear that disabling Vulkan surface support disables the entire SDL Vulkan integration
This commit is contained in:
parent
5cd1a95910
commit
ce2b16445e
|
@ -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
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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@
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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_ */
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -124,7 +124,7 @@ 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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue