From: Roderick Colenbrander Subject: [PATCH 02/10] winevulkan: Add stub ICD. Message-Id: <20180220062947.4192-3-thunderbird2k@gmail.com> Date: Mon, 19 Feb 2018 22:29:39 -0800 In-Reply-To: <20180220062947.4192-1-thunderbird2k@gmail.com> References: <20180220062947.4192-1-thunderbird2k@gmail.com> Signed-off-by: Roderick Colenbrander --- configure.ac | 1 + dlls/winevulkan/Makefile.in | 6 +++++ dlls/winevulkan/version.rc | 27 +++++++++++++++++++++ dlls/winevulkan/vulkan.c | 54 +++++++++++++++++++++++++++++++++++++++++ dlls/winevulkan/winevulkan.spec | 2 ++ 5 files changed, 90 insertions(+) create mode 100644 dlls/winevulkan/Makefile.in create mode 100644 dlls/winevulkan/version.rc create mode 100644 dlls/winevulkan/vulkan.c create mode 100644 dlls/winevulkan/winevulkan.spec diff --git a/configure.ac b/configure.ac index d06476e6c9..bacbf76e19 100644 --- a/configure.ac +++ b/configure.ac @@ -3681,6 +3681,7 @@ WINE_CONFIG_DLL(wineps16.drv16,enable_win16) WINE_CONFIG_DLL(winepulse.drv) WINE_CONFIG_DLL(wineqtdecoder) WINE_CONFIG_DLL(winex11.drv) +WINE_CONFIG_DLL(winevulkan) WINE_CONFIG_DLL(wing.dll16,enable_win16) WINE_CONFIG_DLL(wing32) WINE_CONFIG_DLL(winhttp,,[clean,implib]) diff --git a/dlls/winevulkan/Makefile.in b/dlls/winevulkan/Makefile.in new file mode 100644 index 0000000000..0bffb487e2 --- /dev/null +++ b/dlls/winevulkan/Makefile.in @@ -0,0 +1,6 @@ +MODULE = winevulkan.dll + +C_SRCS = \ + vulkan.c + +RC_SRCS = version.rc diff --git a/dlls/winevulkan/version.rc b/dlls/winevulkan/version.rc new file mode 100644 index 0000000000..a62ea75a66 --- /dev/null +++ b/dlls/winevulkan/version.rc @@ -0,0 +1,27 @@ +/* + * Copyright 2017 Roderick Colenbrander + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "config.h" /* Needed to get PACKAGE_VERSION */ + +#define WINE_FILEDESCRIPTION_STR "Wine Vulkan ICD" +#define WINE_FILENAME_STR "winevulkan.dll" +#define WINE_FILEVERSION_STR PACKAGE_VERSION +#define WINE_PRODUCTVERSION_STR PACKAGE_VERSION +#define WINE_PRODUCTNAME_STR "Wine Vulkan" + +#include "wine/wine_common_ver.rc" diff --git a/dlls/winevulkan/vulkan.c b/dlls/winevulkan/vulkan.c new file mode 100644 index 0000000000..fe866b4f94 --- /dev/null +++ b/dlls/winevulkan/vulkan.c @@ -0,0 +1,54 @@ +/* Wine Vulkan ICD implementation + * + * Copyright 2017 Roderick Colenbrander + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include + +#include "windef.h" +#include "winbase.h" + +#include "wine/debug.h" +#include "wine/vulkan.h" + +WINE_DEFAULT_DEBUG_CHANNEL(vulkan); + +void * WINAPI wine_vk_icdGetInstanceProcAddr(VkInstance instance, const char *pName) +{ + FIXME("stub: %p %s\n", instance, debugstr_a(pName)); + return NULL; +} + +VkResult WINAPI wine_vk_icdNegotiateLoaderICDInterfaceVersion(uint32_t *pSupportedVersion) +{ + FIXME("stub: %p\n", pSupportedVersion); + return VK_ERROR_INCOMPATIBLE_DRIVER; +} + +BOOL WINAPI DllMain(HINSTANCE hinst, DWORD reason, LPVOID reserved) +{ + switch(reason) + { + case DLL_PROCESS_ATTACH: + DisableThreadLibraryCalls(hinst); + break; + + case DLL_THREAD_ATTACH: + break; + } + return TRUE; +} diff --git a/dlls/winevulkan/winevulkan.spec b/dlls/winevulkan/winevulkan.spec new file mode 100644 index 0000000000..c3bccc11f2 --- /dev/null +++ b/dlls/winevulkan/winevulkan.spec @@ -0,0 +1,2 @@ +@ stdcall vk_icdGetInstanceProcAddr(str ptr) wine_vk_icdGetInstanceProcAddr +@ stdcall vk_icdNegotiateLoaderICDInterfaceVersion(ptr) wine_vk_icdNegotiateLoaderICDInterfaceVersion -- 2.14.3