winevulkan: Remove DECLSPEC_HIDDEN usage.
[wine.git] / dlls / winevulkan / vulkan_loader.h
blob4e606624819ba0fe2036b1f4b2d446c7090a3a82
1 /* Wine Vulkan ICD private data structures
3 * Copyright 2017 Roderick Colenbrander
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20 #ifndef __WINE_VULKAN_LOADER_H
21 #define __WINE_VULKAN_LOADER_H
23 #include "ntstatus.h"
24 #define WIN32_NO_STATUS
25 #include <stdarg.h>
26 #include <stdlib.h>
27 #include <assert.h>
28 #include "windef.h"
29 #include "winbase.h"
30 #include "winternl.h"
31 #include "wine/debug.h"
32 #include "wine/vulkan.h"
33 #include "wine/unixlib.h"
34 #include "wine/list.h"
36 #include "loader_thunks.h"
38 /* Magic value defined by Vulkan ICD / Loader spec */
39 #define VULKAN_ICD_MAGIC_VALUE 0x01CDC0DE
41 #define WINEVULKAN_QUIRK_GET_DEVICE_PROC_ADDR 0x00000001
42 #define WINEVULKAN_QUIRK_ADJUST_MAX_IMAGE_COUNT 0x00000002
43 #define WINEVULKAN_QUIRK_IGNORE_EXPLICIT_LAYERS 0x00000004
45 /* Base 'class' for our Vulkan dispatchable objects such as VkDevice and VkInstance.
46 * This structure MUST be the first element of a dispatchable object as the ICD
47 * loader depends on it. For now only contains loader_magic, but over time more common
48 * functionality is expected.
50 struct wine_vk_base
52 /* Special section in each dispatchable object for use by the ICD loader for
53 * storing dispatch tables. The start contains a magical value '0x01CDC0DE'.
55 UINT64 loader_magic;
56 UINT64 unix_handle;
59 struct VkPhysicalDevice_T
61 struct wine_vk_base base;
64 struct VkInstance_T
66 struct wine_vk_base base;
67 uint32_t phys_dev_count;
68 struct VkPhysicalDevice_T phys_devs[1];
71 struct VkQueue_T
73 struct wine_vk_base base;
76 struct VkDevice_T
78 struct wine_vk_base base;
79 unsigned int quirks;
80 struct VkQueue_T queues[1];
83 struct vk_command_pool
85 UINT64 unix_handle;
86 struct list command_buffers;
89 static inline struct vk_command_pool *command_pool_from_handle(VkCommandPool handle)
91 return (struct vk_command_pool *)(uintptr_t)handle;
94 struct VkCommandBuffer_T
96 struct wine_vk_base base;
97 struct list pool_link;
100 struct vulkan_func
102 const char *name;
103 void *func;
106 void *wine_vk_get_device_proc_addr(const char *name);
107 void *wine_vk_get_phys_dev_proc_addr(const char *name);
108 void *wine_vk_get_instance_proc_addr(const char *name);
110 /* debug callbacks params */
112 struct wine_vk_debug_utils_params
114 PFN_vkDebugUtilsMessengerCallbackEXT user_callback;
115 void *user_data;
117 VkDebugUtilsMessageSeverityFlagBitsEXT severity;
118 VkDebugUtilsMessageTypeFlagsEXT message_types;
119 VkDebugUtilsMessengerCallbackDataEXT data;
122 struct wine_vk_debug_report_params
124 PFN_vkDebugReportCallbackEXT user_callback;
125 void *user_data;
127 VkDebugReportFlagsEXT flags;
128 VkDebugReportObjectTypeEXT object_type;
129 uint64_t object_handle;
130 size_t location;
131 int32_t code;
132 const char *layer_prefix;
133 const char *message;
136 struct is_available_instance_function_params
138 VkInstance instance;
139 const char *name;
142 struct is_available_device_function_params
144 VkDevice device;
145 const char *name;
148 #define UNIX_CALL(code, params) WINE_UNIX_CALL(unix_ ## code, params)
150 #endif /* __WINE_VULKAN_LOADER_H */