mstask: Implement ITask::DeleteTrigger().
[wine.git] / dlls / vulkan-1 / vulkan.c
blob82fd868baf5cc4b196bf88867effefdeb789a655
1 /* Wine Vulkan loader implementation
3 * Copyright 2018 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 #include <stdarg.h>
22 #include "windef.h"
23 #include "winbase.h"
25 #include "wine/debug.h"
26 #define VK_NO_PROTOTYPES
27 #include "wine/vulkan.h"
29 WINE_DEFAULT_DEBUG_CHANNEL(vulkan);
31 VkResult WINAPI wine_vkEnumerateInstanceExtensionProperties(const char *, uint32_t *, VkExtensionProperties *);
32 PFN_vkVoidFunction WINAPI wine_vkGetInstanceProcAddr(VkInstance, const char *);
34 VkResult WINAPI vkEnumerateInstanceExtensionProperties(const char *layer_name,
35 uint32_t *count, VkExtensionProperties *properties)
37 TRACE("%p %p %p\n", layer_name, count, properties);
39 if (layer_name)
40 return VK_ERROR_LAYER_NOT_PRESENT;
42 return wine_vkEnumerateInstanceExtensionProperties(NULL, count, properties);
45 VkResult WINAPI vkEnumerateInstanceLayerProperties(uint32_t *count,
46 VkLayerProperties *properties)
48 TRACE("%p, %p\n", count, properties);
50 /* We don't support any layers. */
51 *count = 0;
52 return VK_SUCCESS;
55 PFN_vkVoidFunction WINAPI vkGetInstanceProcAddr(VkInstance instance, const char *name)
57 TRACE("%p %s\n", instance, debugstr_a(name));
59 if (!strcmp(name, "vkEnumerateInstanceExtensionProperties"))
60 return (PFN_vkVoidFunction)vkEnumerateInstanceExtensionProperties;
62 if (!strcmp(name, "vkEnumerateInstanceLayerProperties"))
63 return (PFN_vkVoidFunction)vkEnumerateInstanceLayerProperties;
65 if (!strcmp(name, "vkGetInstanceProcAddr"))
66 return (PFN_vkVoidFunction)vkGetInstanceProcAddr;
68 return wine_vkGetInstanceProcAddr(instance, name);
71 BOOL WINAPI DllMain(HINSTANCE hinst, DWORD reason, void *reserved)
73 TRACE("(%p, %u, %p)\n", hinst, reason, reserved);
75 switch (reason)
77 case DLL_WINE_PREATTACH:
78 /* Prefer native as it provides more functionality. */
79 return FALSE;
81 case DLL_PROCESS_ATTACH:
82 DisableThreadLibraryCalls(hinst);
83 return TRUE;
85 return TRUE;