src/video/SDL_vulkan_internal.h
changeset 11365 a9bd2625fa01
child 11367 e8fc755a89e8
equal deleted inserted replaced
11364:ec27c4fd6880 11365:a9bd2625fa01
       
     1 /*
       
     2   Simple DirectMedia Layer
       
     3   Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
       
     4 
       
     5   This software is provided 'as-is', without any express or implied
       
     6   warranty.  In no event will the authors be held liable for any damages
       
     7   arising from the use of this software.
       
     8 
       
     9   Permission is granted to anyone to use this software for any purpose,
       
    10   including commercial applications, and to alter it and redistribute it
       
    11   freely, subject to the following restrictions:
       
    12 
       
    13   1. The origin of this software must not be misrepresented; you must not
       
    14      claim that you wrote the original software. If you use this software
       
    15      in a product, an acknowledgment in the product documentation would be
       
    16      appreciated but is not required.
       
    17   2. Altered source versions must be plainly marked as such, and must not be
       
    18      misrepresented as being the original software.
       
    19   3. This notice may not be removed or altered from any source distribution.
       
    20 */
       
    21 #ifndef _SDL_vulkan_internal_h
       
    22 #define _SDL_vulkan_internal_h
       
    23 
       
    24 #include "../SDL_internal.h"
       
    25 
       
    26 #include "SDL_stdinc.h"
       
    27 
       
    28 #if defined(SDL_LOADSO_DISABLED)
       
    29 #undef SDL_VIDEO_VULKAN_SURFACE
       
    30 #define SDL_VIDEO_VULKAN_SURFACE 0
       
    31 #endif
       
    32 
       
    33 #if SDL_VIDEO_DRIVER_ANDROID
       
    34 #define VK_USE_PLATFORM_ANDROID_KHR
       
    35 #endif
       
    36 #if SDL_VIDEO_DRIVER_COCOA
       
    37 #define VK_USE_PLATFORM_MACOS_MVK
       
    38 #endif
       
    39 #if SDL_VIDEO_DRIVER_MIR
       
    40 #define VK_USE_PLATFORM_MIR_KHR
       
    41 #endif
       
    42 #if SDL_VIDEO_DRIVER_UIKIT
       
    43 #define VK_USE_PLATFORM_IOS_MVK
       
    44 #endif
       
    45 #if SDL_VIDEO_DRIVER_WAYLAND
       
    46 #define VK_USE_PLATFORM_WAYLAND_KHR
       
    47 #endif
       
    48 #if SDL_VIDEO_DRIVER_WINDOWS
       
    49 #define VK_USE_PLATFORM_WIN32_KHR
       
    50 #endif
       
    51 #if SDL_VIDEO_DRIVER_X11
       
    52 #define VK_USE_PLATFORM_XLIB_KHR
       
    53 #define VK_USE_PLATFORM_XCB_KHR
       
    54 #endif
       
    55 
       
    56 #if SDL_VIDEO_VULKAN_SURFACE
       
    57 
       
    58 /* Need vulkan.h for the following declarations. Must ensure the first
       
    59  * inclusion of vulkan has the appropriate USE_PLATFORM defined, hence
       
    60  * the above. */
       
    61 #define VK_NO_PROTOTYPES
       
    62 #include "vulkan/vulkan.h"
       
    63 
       
    64 extern const char *SDL_Vulkan_GetResultString(VkResult result);
       
    65 
       
    66 extern VkExtensionProperties *SDL_Vulkan_CreateInstanceExtensionsList(
       
    67     PFN_vkEnumerateInstanceExtensionProperties vkEnumerateInstanceExtensionProperties,
       
    68     Uint32 *extensionCount); /* free returned list with SDL_free */
       
    69 
       
    70 /* Implements functionality of SDL_Vulkan_GetInstanceExtensions for a list of
       
    71  * names passed in nameCount and names. */
       
    72 extern SDL_bool SDL_Vulkan_GetInstanceExtensions_Helper(unsigned *userCount,
       
    73                                                         const char **userNames,
       
    74                                                         unsigned nameCount,
       
    75                                                         const char *const *names);
       
    76 
       
    77 #endif
       
    78 
       
    79 #endif
       
    80 /* vi: set ts=4 sw=4 expandtab: */