|
26 | 26 | } |
27 | 27 |
|
28 | 28 | { #note : SDL3-for-Pascal: The following comment includes the original C code. } |
29 | | -{ Avoid including vulkan.h, don't define VkInstance if it's already included } |
| 29 | +{ Avoid including vulkan_core.h, don't define VkInstance if it's already included } |
30 | 30 | { |
31 | | - #ifdef VULKAN_H_ |
| 31 | + #ifdef VULKAN_CORE_H_ |
32 | 32 | #define NO_SDL_VULKAN_TYPEDEFS |
33 | 33 | #endif |
34 | 34 | #ifndef NO_SDL_VULKAN_TYPEDEFS |
35 | 35 | #define VK_DEFINE_HANDLE(object) typedef struct object##_T* object; |
36 | 36 |
|
37 | | - #if defined(__LP64__) || defined(_WIN64) || defined(__x86_64__) || defined(_M_X64) || defined(__ia64) || defined (_M_IA64) || defined(__aarch64__) || defined(__powerpc64__) |
| 37 | + #if defined(__LP64__) || defined(_WIN64) || (defined(__x86_64__) && !defined(__ILP32__)) || defined(_M_X64) || defined(__ia64) || defined (_M_IA64) || defined(__aarch64__) || defined(__powerpc64__) || (defined(__riscv) && __riscv_xlen == 64) |
38 | 38 | #define VK_DEFINE_NON_DISPATCHABLE_HANDLE(object) typedef struct object##_T *object; |
39 | 39 | #else |
40 | 40 | #define VK_DEFINE_NON_DISPATCHABLE_HANDLE(object) typedef uint64_t object; |
|
45 | 45 | VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSurfaceKHR) |
46 | 46 | struct VkAllocationCallbacks; |
47 | 47 | } |
48 | | -{ #todo : Is there a common compiler flag in the Vulkan bindings for Pascal? Couldn't find any common one. Examine. } |
| 48 | +{ #todo : Is there a common compiler flag in the Vulkan bindings for Pascal? |
| 49 | + Couldn't find any common one. Examine. } |
49 | 50 | {$IFDEF VULKAN} |
50 | 51 | {$DEFINE NO_SDL_VULKAN_TYPEDEFS} |
51 | 52 | {$ENDIF} |
52 | 53 | {$IFNDEF NO_SDL_VULKAN_TYPEDEFS} |
53 | 54 | type |
54 | 55 | PVkInstance = ^TVkInstance; |
55 | 56 | TVkInstance = ^TVkInstance_T; |
56 | | - TVkInstance_T = record |
57 | | - end; |
| 57 | + TVkInstance_T = Pointer; |
58 | 58 | PVkPhysicalDevice = ^TVkPhysicalDevice; |
59 | 59 | TVkPhysicalDevice = ^TVkPhysicalDevice_T; |
60 | | - TVkPhysicalDevice_T = record |
61 | | - end; |
| 60 | + TVkPhysicalDevice_T = Pointer; |
62 | 61 | PVkSurfaceKHR = ^TVkSurfaceKHR; |
63 | 62 | TVkSurfaceKHR = ^TVkSurfaceKHR_T; |
64 | | - TVkSurfaceKHR_T = record |
65 | | - end; |
| 63 | + TVkSurfaceKHR_T = Pointer; |
66 | 64 | {$ENDIF} |
67 | 65 | type |
68 | 66 | PPVkAllocationCallbacks = ^PVkAllocationCallbacks; |
69 | 67 | PVkAllocationCallbacks = ^TVkAllocationCallbacks; |
70 | | - TVkAllocationCallbacks = record |
71 | | - {undefined structure} |
72 | | - end; |
| 68 | + TVkAllocationCallbacks = Pointer; {undefined structure} |
73 | 69 |
|
74 | 70 | {* |
75 | 71 | * \name Vulkan support functions |
|
0 commit comments