icculus@11365
|
1 |
/*
|
icculus@11365
|
2 |
Simple DirectMedia Layer
|
slouken@11811
|
3 |
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
icculus@11365
|
4 |
|
icculus@11365
|
5 |
This software is provided 'as-is', without any express or implied
|
icculus@11365
|
6 |
warranty. In no event will the authors be held liable for any damages
|
icculus@11365
|
7 |
arising from the use of this software.
|
icculus@11365
|
8 |
|
icculus@11365
|
9 |
Permission is granted to anyone to use this software for any purpose,
|
icculus@11365
|
10 |
including commercial applications, and to alter it and redistribute it
|
icculus@11365
|
11 |
freely, subject to the following restrictions:
|
icculus@11365
|
12 |
|
icculus@11365
|
13 |
1. The origin of this software must not be misrepresented; you must not
|
icculus@11365
|
14 |
claim that you wrote the original software. If you use this software
|
icculus@11365
|
15 |
in a product, an acknowledgment in the product documentation would be
|
icculus@11365
|
16 |
appreciated but is not required.
|
icculus@11365
|
17 |
2. Altered source versions must be plainly marked as such, and must not be
|
icculus@11365
|
18 |
misrepresented as being the original software.
|
icculus@11365
|
19 |
3. This notice may not be removed or altered from any source distribution.
|
icculus@11365
|
20 |
*/
|
slouken@11376
|
21 |
#ifndef SDL_vulkan_internal_h_
|
slouken@11376
|
22 |
#define SDL_vulkan_internal_h_
|
icculus@11365
|
23 |
|
icculus@11365
|
24 |
#include "../SDL_internal.h"
|
icculus@11365
|
25 |
|
icculus@11365
|
26 |
#include "SDL_stdinc.h"
|
icculus@11365
|
27 |
|
slouken@11381
|
28 |
#if defined(SDL_LOADSO_DISABLED)
|
slouken@11381
|
29 |
#undef SDL_VIDEO_VULKAN
|
slouken@11381
|
30 |
#define SDL_VIDEO_VULKAN 0
|
slouken@11380
|
31 |
#endif
|
slouken@11380
|
32 |
|
slouken@11381
|
33 |
#if SDL_VIDEO_VULKAN
|
slouken@11380
|
34 |
|
icculus@11365
|
35 |
#if SDL_VIDEO_DRIVER_ANDROID
|
icculus@11365
|
36 |
#define VK_USE_PLATFORM_ANDROID_KHR
|
icculus@11365
|
37 |
#endif
|
icculus@11365
|
38 |
#if SDL_VIDEO_DRIVER_COCOA
|
icculus@11365
|
39 |
#define VK_USE_PLATFORM_MACOS_MVK
|
icculus@11365
|
40 |
#endif
|
icculus@11365
|
41 |
#if SDL_VIDEO_DRIVER_UIKIT
|
icculus@11365
|
42 |
#define VK_USE_PLATFORM_IOS_MVK
|
icculus@11365
|
43 |
#endif
|
icculus@11365
|
44 |
#if SDL_VIDEO_DRIVER_WAYLAND
|
icculus@11365
|
45 |
#define VK_USE_PLATFORM_WAYLAND_KHR
|
slouken@11386
|
46 |
#include "wayland/SDL_waylanddyn.h"
|
icculus@11365
|
47 |
#endif
|
icculus@11365
|
48 |
#if SDL_VIDEO_DRIVER_WINDOWS
|
icculus@11365
|
49 |
#define VK_USE_PLATFORM_WIN32_KHR
|
slouken@11383
|
50 |
#include "../core/windows/SDL_windows.h"
|
icculus@11365
|
51 |
#endif
|
icculus@11365
|
52 |
#if SDL_VIDEO_DRIVER_X11
|
icculus@11365
|
53 |
#define VK_USE_PLATFORM_XLIB_KHR
|
icculus@11365
|
54 |
#define VK_USE_PLATFORM_XCB_KHR
|
icculus@11365
|
55 |
#endif
|
icculus@11365
|
56 |
|
icculus@11365
|
57 |
#define VK_NO_PROTOTYPES
|
icculus@11367
|
58 |
#include "./khronos/vulkan/vulkan.h"
|
icculus@11365
|
59 |
|
slouken@11376
|
60 |
#include "SDL_vulkan.h"
|
slouken@11376
|
61 |
|
slouken@11376
|
62 |
|
icculus@11365
|
63 |
extern const char *SDL_Vulkan_GetResultString(VkResult result);
|
icculus@11365
|
64 |
|
icculus@11365
|
65 |
extern VkExtensionProperties *SDL_Vulkan_CreateInstanceExtensionsList(
|
icculus@11365
|
66 |
PFN_vkEnumerateInstanceExtensionProperties vkEnumerateInstanceExtensionProperties,
|
icculus@11365
|
67 |
Uint32 *extensionCount); /* free returned list with SDL_free */
|
icculus@11365
|
68 |
|
icculus@11365
|
69 |
/* Implements functionality of SDL_Vulkan_GetInstanceExtensions for a list of
|
icculus@11365
|
70 |
* names passed in nameCount and names. */
|
icculus@11365
|
71 |
extern SDL_bool SDL_Vulkan_GetInstanceExtensions_Helper(unsigned *userCount,
|
icculus@11365
|
72 |
const char **userNames,
|
icculus@11365
|
73 |
unsigned nameCount,
|
icculus@11365
|
74 |
const char *const *names);
|
slouken@11380
|
75 |
|
slouken@11380
|
76 |
#else
|
slouken@11380
|
77 |
|
slouken@11380
|
78 |
/* No SDL Vulkan support, just include the header for typedefs */
|
slouken@11380
|
79 |
#include "SDL_vulkan.h"
|
slouken@11380
|
80 |
|
icculus@11891
|
81 |
typedef void (*PFN_vkGetInstanceProcAddr) (void);
|
icculus@11891
|
82 |
typedef int (*PFN_vkEnumerateInstanceExtensionProperties) (void);
|
slouken@11839
|
83 |
|
slouken@11381
|
84 |
#endif /* SDL_VIDEO_VULKAN */
|
icculus@11365
|
85 |
|
slouken@11376
|
86 |
#endif /* SDL_vulkan_internal_h_ */
|
icculus@11365
|
87 |
|
icculus@11365
|
88 |
/* vi: set ts=4 sw=4 expandtab: */
|