blob: a854485a79ac486e69e502a771e976261cb43b6d [file] [log] [blame]
Chia-I Wuc1e0f962014-08-04 08:03:57 +08001/*
Courtney Goeltzenleuchter0b018602015-04-08 15:36:08 -06002 * Vulkan
Chia-I Wuc1e0f962014-08-04 08:03:57 +08003 *
4 * Copyright (C) 2014 LunarG, Inc.
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the "Software"),
8 * to deal in the Software without restriction, including without limitation
9 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 * and/or sell copies of the Software, and to permit persons to whom the
11 * Software is furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included
14 * in all copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 * DEALINGS IN THE SOFTWARE.
Chia-I Wud8ab1e62014-09-02 08:32:09 +080023 *
24 * Authors:
25 * Chia-I Wu <olv@lunarg.com>
Chia-I Wuc1e0f962014-08-04 08:03:57 +080026 */
27
28#ifndef LOADER_H
29#define LOADER_H
30
Courtney Goeltzenleuchter0b018602015-04-08 15:36:08 -060031#include <vulkan.h>
Courtney Goeltzenleuchter67146d02015-06-10 17:39:03 -060032#include <vk_debug_report_lunarg.h>
Chia-I Wu73e9db32015-04-16 22:02:10 +080033#include <vk_wsi_lunarg.h>
Courtney Goeltzenleuchter0b018602015-04-08 15:36:08 -060034#include <vkLayer.h>
35#include <vkIcd.h>
Chia-I Wufe333ed2015-04-11 15:34:07 +080036#include <assert.h>
37
Chia-I Wuc1e0f962014-08-04 08:03:57 +080038#if defined(__GNUC__) && __GNUC__ >= 4
39# define LOADER_EXPORT __attribute__((visibility("default")))
40#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)
41# define LOADER_EXPORT __attribute__((visibility("default")))
42#else
43# define LOADER_EXPORT
44#endif
45
Courtney Goeltzenleuchter48403a92015-06-07 18:24:30 -060046#define MAX_EXTENSION_NAME_SIZE 255
Jon Ashburn13482452015-05-12 17:26:48 -060047#define MAX_LAYER_LIBRARIES 64
Jon Ashburn10f4e822015-06-10 10:06:06 -060048#define MAX_GPUS_PER_ICD 16
Jon Ashburn13482452015-05-12 17:26:48 -060049
Courtney Goeltzenleuchter67146d02015-06-10 17:39:03 -060050enum extension_origin {
51 VK_EXTENSION_ORIGIN_ICD,
52 VK_EXTENSION_ORIGIN_LAYER,
53 VK_EXTENSION_ORIGIN_LOADER
Jon Ashburn13482452015-05-12 17:26:48 -060054};
55
Courtney Goeltzenleuchter67146d02015-06-10 17:39:03 -060056struct loader_extension_property {
57 VkExtensionProperties info;
58 const char *lib_name;
59 enum extension_origin origin;
Courtney Goeltzenleuchter99ad4482015-06-07 17:28:17 -060060 // An extension library can export the same extension
61 // under different names. Handy to provide a "grouping"
62 // such as Validation. However, the loader requires
63 // that a layer be included only once in a chain.
64 // During layer scanning the loader will check if
Jon Ashburn392c5622015-06-10 16:11:42 -060065 // the vkGetInstanceProcAddr is the same as an existing extension
Courtney Goeltzenleuchter99ad4482015-06-07 17:28:17 -060066 // If so, it will link them together via the alias pointer.
67 // At initialization time we'll follow the alias pointer
68 // to the "base" extension and then use that extension
69 // internally to ensure we reject duplicates
Jon Ashburn392c5622015-06-10 16:11:42 -060070 PFN_vkGPA get_proc_addr;
Courtney Goeltzenleuchter99ad4482015-06-07 17:28:17 -060071 struct loader_extension_property *alias;
Courtney Goeltzenleuchter67146d02015-06-10 17:39:03 -060072};
73
74struct loader_extension_list {
75 size_t capacity;
76 uint32_t count;
77 struct loader_extension_property *list;
78};
79
80struct loader_scanned_layers {
81 char *lib_name;
82
83 /* cache of global extensions for a specific layer */
Courtney Goeltzenleuchter67146d02015-06-10 17:39:03 -060084 struct loader_extension_list global_extension_list;
85
Courtney Goeltzenleuchter1c512402015-06-17 20:51:59 -060086 bool physical_device_extensions_supported;
Courtney Goeltzenleuchter67146d02015-06-10 17:39:03 -060087 /*
88 * cache of device extensions for a specific layer,
89 * filled in at CreateInstance time
90 */
Courtney Goeltzenleuchter1c512402015-06-17 20:51:59 -060091 struct loader_extension_list physical_device_extension_list;
Jon Ashburn13482452015-05-12 17:26:48 -060092};
93
Jon Ashburn10f4e822015-06-10 10:06:06 -060094/* per CreateDevice structure */
95struct loader_device {
96 VkLayerDispatchTable loader_dispatch;
97 VkDevice device; // device object from the icd
98
99 uint32_t app_extension_count;
100 VkExtensionProperties *app_extension_props;
101
102 struct loader_extension_list enabled_device_extensions;
103 struct loader_extension_list activated_layer_list;
104
105 struct loader_device *next;
106};
107
Jon Ashburn392c5622015-06-10 16:11:42 -0600108/* per ICD structure */
Jon Ashburnebfa25e2015-05-15 15:09:35 -0600109struct loader_icd {
110 const struct loader_scanned_icds *scanned_icds;
111
Jon Ashburn10f4e822015-06-10 10:06:06 -0600112 struct loader_device *logical_device_list;
Jon Ashburnebfa25e2015-05-15 15:09:35 -0600113 uint32_t gpu_count;
Jon Ashburn392c5622015-06-10 16:11:42 -0600114 VkPhysicalDevice *gpus; // enumerated PhysicalDevices
Jon Ashburnebfa25e2015-05-15 15:09:35 -0600115 VkInstance instance; // instance object from the icd
Jon Ashburnc89dd4a2015-05-18 13:20:15 -0600116 PFN_vkGetDeviceProcAddr GetDeviceProcAddr;
Jon Ashburnebfa25e2015-05-15 15:09:35 -0600117 PFN_vkDestroyInstance DestroyInstance;
118 PFN_vkEnumeratePhysicalDevices EnumeratePhysicalDevices;
Chris Forbes1c946ec2015-06-21 22:55:02 +1200119 PFN_vkGetPhysicalDeviceFeatures GetPhysicalDeviceFeatures;
120 PFN_vkGetPhysicalDeviceFormatInfo GetPhysicalDeviceFormatInfo;
121 PFN_vkGetPhysicalDeviceLimits GetPhysicalDeviceLimits;
Jon Ashburnebfa25e2015-05-15 15:09:35 -0600122 PFN_vkCreateDevice CreateDevice;
Tony Barbour4e657ba2015-06-24 16:06:58 -0600123 PFN_vkGetPhysicalDeviceProperties GetPhysicalDeviceProperties;
124 PFN_vkGetPhysicalDevicePerformance GetPhysicalDevicePerformance;
125 PFN_vkGetPhysicalDeviceQueueCount GetPhysicalDeviceQueueCount;
126 PFN_vkGetPhysicalDeviceQueueProperties GetPhysicalDeviceQueueProperties;
127 PFN_vkGetPhysicalDeviceMemoryProperties GetPhysicalDeviceMemoryProperties;
128 PFN_vkGetPhysicalDeviceExtensionCount GetPhysicalDeviceExtensionCount;
129 PFN_vkGetPhysicalDeviceExtensionProperties GetPhysicalDeviceExtensionProperties;
Courtney Goeltzenleuchter67146d02015-06-10 17:39:03 -0600130 PFN_vkDbgCreateMsgCallback DbgCreateMsgCallback;
131 PFN_vkDbgDestroyMsgCallback DbgDestroyMsgCallback;
Courtney Goeltzenleuchter1c512402015-06-17 20:51:59 -0600132 /*
133 * Fill in the cache of available extensions from all layers that
134 * operate with this physical device.
Tony Barbour4e657ba2015-06-24 16:06:58 -0600135 * This cache will be used to satisfy calls to GetPhysicalDeviceExtensionProperties
Courtney Goeltzenleuchter1c512402015-06-17 20:51:59 -0600136 */
Jon Ashburn10f4e822015-06-10 10:06:06 -0600137 struct loader_extension_list device_extension_cache[MAX_GPUS_PER_ICD];
138 struct loader_icd *next;
Jon Ashburnebfa25e2015-05-15 15:09:35 -0600139};
140
Jon Ashburn392c5622015-06-10 16:11:42 -0600141/* per instance structure */
Jon Ashburn13482452015-05-12 17:26:48 -0600142struct loader_instance {
Jon Ashburnebfa25e2015-05-15 15:09:35 -0600143 VkLayerInstanceDispatchTable *disp; // must be first entry in structure
144
Jon Ashburn13482452015-05-12 17:26:48 -0600145 uint32_t layer_count;
Jon Ashburn13482452015-05-12 17:26:48 -0600146 uint32_t total_gpu_count;
Courtney Goeltzenleuchter67146d02015-06-10 17:39:03 -0600147 uint32_t total_icd_count;
Jon Ashburn13482452015-05-12 17:26:48 -0600148 struct loader_icd *icds;
149 struct loader_instance *next;
Courtney Goeltzenleuchter67146d02015-06-10 17:39:03 -0600150
151 /* TODO: Should keep track of application provided allocation functions */
152
153 /*
154 * CreateMsgCallback is global and needs to be
155 * applied to all layers and ICDs.
156 * What happens if a layer is enabled on both the instance chain
157 * as well as the device chain and a call to CreateMsgCallback is made?
158 * Do we need to make sure that each layer / driver only gets called once?
159 * Should a layer implementing support for CreateMsgCallback only be allowed (?)
160 * to live on one chain? Or maybe make it the application's responsibility.
161 * If the app enables DRAW_STATE on at both CreateInstance time and CreateDevice
162 * time, CreateMsgCallback will call the DRAW_STATE layer twice. Once via
163 * the instance chain and once via the device chain.
164 * The loader should only return the DEBUG_REPORT extension as supported
165 * for the GetGlobalExtensionSupport call. That should help eliminate one
166 * duplication.
167 * Since the instance chain requires us iterating over the available ICDs
168 * and each ICD will have it's own unique MsgCallback object we need to
169 * track those objects to give back the right one.
170 * This also implies that the loader has to intercept vkDestroyObject and
171 * if the extension is enabled and the object type is a MsgCallback then
172 * we must translate the object into the proper ICD specific ones.
173 * DestroyObject works on a device chain. Should not be what's destroying
174 * the MsgCallback object. That needs to be an instance thing. So, since
175 * we used an instance to create it, we need a custom Destroy that also
176 * takes an instance. That way we can iterate over the ICDs properly.
177 * Example use:
178 * CreateInstance: DEBUG_REPORT
179 * Loader will create instance chain with enabled extensions.
180 * TODO: Should validation layers be enabled here? If not, they will not be in the instance chain.
181 * fn = GetProcAddr(INSTANCE, "vkCreateMsgCallback") -> point to loader's vkCreateMsgCallback
182 * App creates a callback object: fn(..., &MsgCallbackObject1)
183 * Have only established the instance chain so far. Loader will call the instance chain.
184 * Each layer in the instance chain will call down to the next layer, terminating with
185 * the CreateMsgCallback loader terminator function that creates the actual MsgCallbackObject1 object.
186 * The loader CreateMsgCallback terminator will iterate over the ICDs.
187 * Calling each ICD that supports vkCreateMsgCallback and collect answers in icd_msg_callback_map here.
188 * As result is sent back up the chain each layer has opportunity to record the callback operation and
189 * appropriate MsgCallback object.
190 * ...
191 * Any reports matching the flags set in MsgCallbackObject1 will generate the defined callback behavior
192 * in the layer / ICD that initiated that report.
193 * ...
194 * CreateDevice: MemTracker:...
195 * App does not include DEBUG_REPORT as that is a global extension.
196 * TODO: GetExtensionSupport must not report DEBUG_REPORT when using instance.
197 * App MUST include any desired validation layers or they will not participate in the device call chain.
198 * App creates a callback object: fn(..., &MsgCallbackObject2)
199 * Loader's vkCreateMsgCallback is called.
200 * Loader sends call down instance chain - this is a global extension - any validation layer that was
201 * enabled at CreateInstance will be able to register the callback. Loader will iterate over the ICDs and
202 * will record the ICD's version of the MsgCallback2 object here.
203 * ...
204 * Any report will go to the layer's report function and it will check the flags for MsgCallbackObject1
205 * and MsgCallbackObject2 and take the appropriate action as indicated by the app.
206 * ...
207 * App calls vkDestroyMsgCallback( MsgCallbackObject1 )
208 * Loader's DestroyMsgCallback is where call starts. DestroyMsgCallback will be sent down instance chain
209 * ending in the loader's DestroyMsgCallback terminator which will iterate over the ICD's destroying each
210 * ICD version of that MsgCallback object and then destroy the loader's version of the object.
211 * Any reports generated after this will only have MsgCallbackObject2 available.
212 */
213 struct loader_msg_callback_map_entry *icd_msg_callback_map;
214
215 struct loader_extension_list enabled_instance_extensions;
Courtney Goeltzenleuchter99ad4482015-06-07 17:28:17 -0600216 struct loader_extension_list activated_layer_list;
Courtney Goeltzenleuchter67146d02015-06-10 17:39:03 -0600217
218 uint32_t app_extension_count;
219 VkExtensionProperties *app_extension_props;
220
221 bool debug_report_enabled;
Courtney Goeltzenleuchter67146d02015-06-10 17:39:03 -0600222 VkLayerDbgFunctionNode *DbgFunctionHead;
223};
224
Courtney Goeltzenleuchter53919232015-06-08 15:04:02 -0600225static inline struct loader_instance *loader_instance(VkInstance instance) {
226 return (struct loader_instance *) instance;
227}
228
Courtney Goeltzenleuchter67146d02015-06-10 17:39:03 -0600229struct loader_lib_info {
230 const char *lib_name;
231 uint32_t ref_count;
232 loader_platform_dl_handle lib_handle;
Jon Ashburn13482452015-05-12 17:26:48 -0600233};
234
235struct loader_struct {
236 struct loader_instance *instances;
237 bool icds_scanned;
238 struct loader_scanned_icds *scanned_icd_list;
Courtney Goeltzenleuchter67146d02015-06-10 17:39:03 -0600239 bool layers_scanned;
240
241 unsigned int loaded_layer_lib_count;
242 struct loader_lib_info *loaded_layer_lib_list;
243
Jon Ashburn13482452015-05-12 17:26:48 -0600244 char *layer_dirs;
Courtney Goeltzenleuchter67146d02015-06-10 17:39:03 -0600245
246 /* TODO: eliminate fixed limit */
247 unsigned int scanned_layer_count; // indicate number of scanned layers
Jon Ashburn13482452015-05-12 17:26:48 -0600248 size_t scanned_ext_list_capacity;
Courtney Goeltzenleuchter67146d02015-06-10 17:39:03 -0600249 struct loader_scanned_layers scanned_layers[MAX_LAYER_LIBRARIES];
250
Tony Barbour4e657ba2015-06-24 16:06:58 -0600251 /* Keep track of all the extensions available via GetGlobalExtensionProperties */
Courtney Goeltzenleuchter67146d02015-06-10 17:39:03 -0600252 struct loader_extension_list global_extensions;
253};
254
255struct loader_scanned_icds {
256 char *lib_name;
257 loader_platform_dl_handle handle;
258
259 PFN_vkCreateInstance CreateInstance;
260 PFN_vkDestroyInstance DestroyInstance;
261 PFN_vkEnumeratePhysicalDevices EnumeratePhysicalDevices;
Tony Barbour4e657ba2015-06-24 16:06:58 -0600262 PFN_vkGetGlobalExtensionCount GetGlobalExtensionCount;
263 PFN_vkGetGlobalExtensionProperties GetGlobalExtensionProperties;
264 PFN_vkGetPhysicalDeviceExtensionCount GetPhysicalDeviceExtensionCount;
265 PFN_vkGetPhysicalDeviceExtensionProperties GetPhysicalDeviceExtensionProperties;
Courtney Goeltzenleuchter67146d02015-06-10 17:39:03 -0600266 VkInstance instance;
267 struct loader_scanned_icds *next;
268
269 /* cache of global extensions for specific ICD */
270 struct loader_extension_list global_extension_list;
271
272 /*
273 * cache of device extensions for specific ICD,
274 * filled in at CreateInstance time
275 */
Courtney Goeltzenleuchter1c512402015-06-17 20:51:59 -0600276 struct loader_extension_list device_extension_list;
Jon Ashburn13482452015-05-12 17:26:48 -0600277};
278
Jon Ashburn62a54d12015-05-01 18:00:33 -0600279static inline void loader_set_dispatch(VkObject obj, const void *data)
Chia-I Wufe333ed2015-04-11 15:34:07 +0800280{
281 *((const void **) obj) = data;
282}
283
Jon Ashburn62a54d12015-05-01 18:00:33 -0600284static inline VkLayerDispatchTable *loader_get_dispatch(const VkObject obj)
Chia-I Wufe333ed2015-04-11 15:34:07 +0800285{
Jon Ashburn62a54d12015-05-01 18:00:33 -0600286 return *((VkLayerDispatchTable **) obj);
Chia-I Wufe333ed2015-04-11 15:34:07 +0800287}
288
Jon Ashburn13482452015-05-12 17:26:48 -0600289static inline VkLayerInstanceDispatchTable *loader_get_instance_dispatch(const VkObject obj)
290{
291 return *((VkLayerInstanceDispatchTable **) obj);
292}
293
Jon Ashburn62a54d12015-05-01 18:00:33 -0600294static inline void loader_init_dispatch(VkObject obj, const void *data)
Chia-I Wufe333ed2015-04-11 15:34:07 +0800295{
Jon Ashburn167b2b12015-04-15 13:34:33 -0600296#ifdef DEBUG
Chia-I Wufe333ed2015-04-11 15:34:07 +0800297 assert(valid_loader_magic_value(obj) &&
298 "Incompatible ICD, first dword must be initialized to ICD_LOADER_MAGIC. See loader/README.md for details.");
Jon Ashburn167b2b12015-04-15 13:34:33 -0600299#endif
Chia-I Wufe333ed2015-04-11 15:34:07 +0800300
Jon Ashburn62a54d12015-05-01 18:00:33 -0600301 loader_set_dispatch(obj, data);
Chia-I Wufe333ed2015-04-11 15:34:07 +0800302}
303
Jon Ashburn13482452015-05-12 17:26:48 -0600304/* global variables used across files */
305extern struct loader_struct loader;
306extern LOADER_PLATFORM_THREAD_ONCE_DEFINITION(once_icd);
307extern LOADER_PLATFORM_THREAD_ONCE_DEFINITION(once_layer);
308extern LOADER_PLATFORM_THREAD_ONCE_DEFINITION(once_exts);
Jon Ashburn7e8d8b42015-05-29 13:15:39 -0600309extern loader_platform_thread_mutex loader_lock;
310extern const VkLayerInstanceDispatchTable instance_disp;
Jon Ashburn37e7f972015-04-06 10:58:22 -0600311
Courtney Goeltzenleuchter67146d02015-06-10 17:39:03 -0600312struct loader_msg_callback_map_entry {
313 VkDbgMsgCallback icd_obj;
314 VkDbgMsgCallback loader_obj;
315};
316
317bool compare_vk_extension_properties(
318 const VkExtensionProperties* op1,
319 const VkExtensionProperties* op2);
320
Jon Ashburn13482452015-05-12 17:26:48 -0600321/* instance layer chain termination entrypoint definitions */
322VkResult loader_CreateInstance(
323 const VkInstanceCreateInfo* pCreateInfo,
324 VkInstance* pInstance);
Chia-I Wufe333ed2015-04-11 15:34:07 +0800325
Jon Ashburn13482452015-05-12 17:26:48 -0600326VkResult loader_DestroyInstance(
327 VkInstance instance);
328
329VkResult loader_EnumeratePhysicalDevices(
330 VkInstance instance,
331 uint32_t* pPhysicalDeviceCount,
332 VkPhysicalDevice* pPhysicalDevices);
Chris Forbes1c946ec2015-06-21 22:55:02 +1200333
Chris Forbes1c946ec2015-06-21 22:55:02 +1200334VkResult loader_GetPhysicalDeviceFeatures(
335 VkPhysicalDevice physicalDevice,
336 VkPhysicalDeviceFeatures* pFeatures);
337
338VkResult loader_GetPhysicalDeviceFormatInfo(
339 VkPhysicalDevice physicalDevice,
340 VkFormat format,
341 VkFormatProperties* pFormatInfo);
342
343VkResult loader_GetPhysicalDeviceLimits(
344 VkPhysicalDevice physicalDevice,
345 VkPhysicalDeviceLimits* pLimits);
346
Tony Barbour4e657ba2015-06-24 16:06:58 -0600347
348VkResult loader_GetPhysicalDeviceProperties (
349 VkPhysicalDevice physicalDevice,
350 VkPhysicalDeviceProperties* pProperties);
351
352VkResult loader_GetPhysicalDevicePerformance (
353 VkPhysicalDevice physicalDevice,
354 VkPhysicalDevicePerformance* pPerformance);
355
356VkResult loader_GetPhysicalDeviceExtensionProperties (
357 VkPhysicalDevice physicalDevice,
358 uint32_t extensionIndex,
359 VkExtensionProperties* pProperties);
360
361VkResult loader_GetPhysicalDeviceExtensionCount (
362 VkPhysicalDevice physicalDevice,
363 uint32_t* pCount);
364
365VkResult loader_GetPhysicalDeviceQueueCount (
366 VkPhysicalDevice physicalDevice,
367 uint32_t* pCount);
368
369VkResult loader_GetPhysicalDeviceQueueProperties (
370 VkPhysicalDevice physicalDevice,
371 uint32_t count,
372 VkPhysicalDeviceQueueProperties * pProperties);
373
374VkResult loader_GetPhysicalDeviceMemoryProperties (
375 VkPhysicalDevice physicalDevice,
376 VkPhysicalDeviceMemoryProperties * pProperties);
Jon Ashburn7e8d8b42015-05-29 13:15:39 -0600377
Jon Ashburnebfa25e2015-05-15 15:09:35 -0600378VkResult loader_CreateDevice(
379 VkPhysicalDevice gpu,
380 const VkDeviceCreateInfo* pCreateInfo,
381 VkDevice* pDevice);
Jon Ashburn13482452015-05-12 17:26:48 -0600382
Courtney Goeltzenleuchter67146d02015-06-10 17:39:03 -0600383/* helper function definitions */
384bool has_vk_extension_property(
385 const VkExtensionProperties *vk_ext_prop,
386 const struct loader_extension_list *ext_list);
Jon Ashburn13482452015-05-12 17:26:48 -0600387
Courtney Goeltzenleuchter67146d02015-06-10 17:39:03 -0600388void loader_add_to_ext_list(
389 struct loader_extension_list *ext_list,
390 uint32_t prop_list_count,
391 const struct loader_extension_property *props);
Courtney Goeltzenleuchter54fcee12015-06-08 15:09:22 -0600392void loader_destroy_ext_list(struct loader_extension_list *ext_info);
Jon Ashburn13482452015-05-12 17:26:48 -0600393
Courtney Goeltzenleuchter67146d02015-06-10 17:39:03 -0600394bool loader_is_extension_scanned(const VkExtensionProperties *ext_prop);
Jon Ashburn13482452015-05-12 17:26:48 -0600395void loader_icd_scan(void);
396void layer_lib_scan(void);
397void loader_coalesce_extensions(void);
Courtney Goeltzenleuchter67146d02015-06-10 17:39:03 -0600398
Jon Ashburn540a90d2015-05-28 19:16:58 -0600399struct loader_icd * loader_get_icd(const VkPhysicalDevice gpu,
Jon Ashburnebfa25e2015-05-15 15:09:35 -0600400 uint32_t *gpu_index);
Jon Ashburn10f4e822015-06-10 10:06:06 -0600401void loader_remove_logical_device(VkDevice device);
402void loader_enable_instance_layers(struct loader_instance *inst);
403void loader_deactivate_instance_layers(struct loader_instance *instance);
Jon Ashburn13482452015-05-12 17:26:48 -0600404uint32_t loader_activate_instance_layers(struct loader_instance *inst);
Courtney Goeltzenleuchter1c512402015-06-17 20:51:59 -0600405void loader_activate_instance_layer_extensions(struct loader_instance *inst);
Chia-I Wuc1e0f962014-08-04 08:03:57 +0800406#endif /* LOADER_H */