5 ** Copyright (c) 2014-2015 The Khronos Group Inc.
7 ** Permission is hereby granted, free of charge, to any person obtaining a
8 ** copy of this software and/or associated documentation files (the
9 ** "Materials"), to deal in the Materials without restriction, including
10 ** without limitation the rights to use, copy, modify, merge, publish,
11 ** distribute, sublicense, and/or sell copies of the Materials, and to
12 ** permit persons to whom the Materials are furnished to do so, subject to
13 ** the following conditions:
15 ** The above copyright notice and this permission notice shall be included
16 ** in all copies or substantial portions of the Materials.
18 ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
19 ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20 ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
21 ** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
22 ** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
23 ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
24 ** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
28 #ifndef __VK_PLATFORM_H__
29 #define __VK_PLATFORM_H__
37 ***************************************************************************************************
38 * Platform-specific directives and type declarations
39 ***************************************************************************************************
43 // On Windows, VKAPI should equate to the __stdcall convention
44 #define VKAPI __stdcall
45 #elif defined(__GNUC__)
46 // On other platforms using GCC, VKAPI stays undefined
49 // Unsupported Platform!
50 #error "Unsupported OS Platform detected!"
55 #if !defined(VK_NO_STDINT_H)
56 #if defined(_MSC_VER) && (_MSC_VER < 1600)
57 typedef signed __int8
int8_t;
58 typedef unsigned __int8
uint8_t;
59 typedef signed __int16
int16_t;
60 typedef unsigned __int16
uint16_t;
61 typedef signed __int32
int32_t;
62 typedef unsigned __int32
uint32_t;
63 typedef signed __int64
int64_t;
64 typedef unsigned __int64
uint64_t;
68 #endif // !defined(VK_NO_STDINT_H)
70 typedef uint64_t VkDeviceSize
;
71 typedef uint32_t VkBool32
;
73 typedef uint32_t VkSampleMask
;
74 typedef uint32_t VkFlags
;
76 #if (UINTPTR_MAX >= UINT64_MAX)
77 #define VK_UINTPTRLEAST64_MAX UINTPTR_MAX
79 typedef uintptr_t VkUintPtrLeast64
;
81 #define VK_UINTPTRLEAST64_MAX UINT64_MAX
83 typedef uint64_t VkUintPtrLeast64
;
90 #endif // __VK_PLATFORM_H__