mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-01 23:48:29 +00:00
Be clear that disabling Vulkan surface support disables the entire SDL Vulkan integration
This commit is contained in:
@@ -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"
|
||||
|
@@ -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;
|
||||
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user