Module: wine
Branch: master
Commit: 0c87c1c4b70d26af0427686e05617f3a5ec8f720
URL: https://source.winehq.org/git/wine.git/?a=commit;h=0c87c1c4b70d26af0427686e…
Author: Roderick Colenbrander <thunderbird2k(a)gmail.com>
Date: Mon Feb 26 19:42:17 2018 +0100
winex11: Implement vkEnumerateInstanceExtensionProperties.
Signed-off-by: Roderick Colenbrander <thunderbird2k(a)gmail.com>
Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
dlls/winex11.drv/vulkan.c | 28 ++++++++++++++++++++++++++--
1 file changed, 26 insertions(+), 2 deletions(-)
diff --git a/dlls/winex11.drv/vulkan.c b/dlls/winex11.drv/vulkan.c
index b73f379..92f8a0e 100644
--- a/dlls/winex11.drv/vulkan.c
+++ b/dlls/winex11.drv/vulkan.c
@@ -41,8 +41,32 @@ static void X11DRV_vkDestroyInstance(VkInstance instance, const VkAllocationCall
static VkResult X11DRV_vkEnumerateInstanceExtensionProperties(const char *layer_name,
uint32_t *count, VkExtensionProperties* properties)
{
- FIXME("stub: %s %p %p\n", debugstr_a(layer_name), count, properties);
- return VK_ERROR_OUT_OF_HOST_MEMORY;
+ TRACE("layer_name %s, count %p, properties %p\n", debugstr_a(layer_name), count, properties);
+
+ /* This shouldn't get called with layer_name set, the ICD loader prevents it. */
+ if (layer_name)
+ {
+ ERR("Layer enumeration not supported from ICD.\n");
+ return VK_ERROR_LAYER_NOT_PRESENT;
+ }
+
+ if (!properties)
+ {
+ /* When properties is NULL, we need to return the number of extensions
+ * supported. For now report 0 until we add some e.g.
+ * VK_KHR_win32_surface. Long-term this needs to be an intersection
+ * between what the native library supports and what thunks we have.
+ */
+ *count = 0;
+ return VK_SUCCESS;
+ }
+
+ /* When properties is not NULL, we copy the extensions over and set count
+ * to the number of copied extensions. For now we don't have much to do as
+ * we don't support any extensions yet.
+ */
+ *count = 0;
+ return VK_SUCCESS;
}
static void * X11DRV_vkGetInstanceProcAddr(VkInstance instance, const char *name)
Module: wine
Branch: master
Commit: fcc7af83229ee46a177311a658b7ec92ee4d8d50
URL: https://source.winehq.org/git/wine.git/?a=commit;h=fcc7af83229ee46a177311a6…
Author: Roderick Colenbrander <thunderbird2k(a)gmail.com>
Date: Mon Feb 26 19:42:12 2018 +0100
winevulkan: Add stub ICD.
Signed-off-by: Roderick Colenbrander <thunderbird2k(a)gmail.com>
Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
configure | 2 ++
configure.ac | 1 +
dlls/winevulkan/Makefile.in | 6 +++++
dlls/winevulkan/version.rc | 27 ++++++++++++++++++++++
dlls/winevulkan/vulkan.c | 51 +++++++++++++++++++++++++++++++++++++++++
dlls/winevulkan/winevulkan.spec | 2 ++
6 files changed, 89 insertions(+)
diff --git a/configure b/configure
index 7ef096d..10ca89a 100755
--- a/configure
+++ b/configure
@@ -1537,6 +1537,7 @@ enable_wineoss_drv
enable_wineps_drv
enable_winepulse_drv
enable_wineqtdecoder
+enable_winevulkan
enable_winex11_drv
enable_wing32
enable_winhttp
@@ -19036,6 +19037,7 @@ wine_fn_config_dll wineps.drv enable_wineps_drv
wine_fn_config_dll wineps16.drv16 enable_win16
wine_fn_config_dll winepulse.drv enable_winepulse_drv
wine_fn_config_dll wineqtdecoder enable_wineqtdecoder
+wine_fn_config_dll winevulkan enable_winevulkan
wine_fn_config_dll winex11.drv enable_winex11_drv
wine_fn_config_dll wing.dll16 enable_win16
wine_fn_config_dll wing32 enable_wing32
diff --git a/configure.ac b/configure.ac
index 7b796ef..02937ca 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3690,6 +3690,7 @@ WINE_CONFIG_DLL(wineps.drv)
WINE_CONFIG_DLL(wineps16.drv16,enable_win16)
WINE_CONFIG_DLL(winepulse.drv)
WINE_CONFIG_DLL(wineqtdecoder)
+WINE_CONFIG_DLL(winevulkan)
WINE_CONFIG_DLL(winex11.drv)
WINE_CONFIG_DLL(wing.dll16,enable_win16)
WINE_CONFIG_DLL(wing32)
diff --git a/dlls/winevulkan/Makefile.in b/dlls/winevulkan/Makefile.in
new file mode 100644
index 0000000..0bffb48
--- /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 0000000..a62ea75
--- /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 0000000..cac907c
--- /dev/null
+++ b/dlls/winevulkan/vulkan.c
@@ -0,0 +1,51 @@
+/* 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 <stdarg.h>
+
+#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 *name)
+{
+ FIXME("stub: %p %s\n", instance, debugstr_a(name));
+ return NULL;
+}
+
+VkResult WINAPI wine_vk_icdNegotiateLoaderICDInterfaceVersion(uint32_t *supported_version)
+{
+ FIXME("stub: %p\n", supported_version);
+ return VK_ERROR_INCOMPATIBLE_DRIVER;
+}
+
+BOOL WINAPI DllMain(HINSTANCE hinst, DWORD reason, void *reserved)
+{
+ switch (reason)
+ {
+ case DLL_PROCESS_ATTACH:
+ DisableThreadLibraryCalls(hinst);
+ break;
+ }
+ return TRUE;
+}
diff --git a/dlls/winevulkan/winevulkan.spec b/dlls/winevulkan/winevulkan.spec
new file mode 100644
index 0000000..8b87834
--- /dev/null
+++ b/dlls/winevulkan/winevulkan.spec
@@ -0,0 +1,2 @@
+@ stdcall vk_icdGetInstanceProcAddr(ptr str) wine_vk_icdGetInstanceProcAddr
+@ stdcall vk_icdNegotiateLoaderICDInterfaceVersion(ptr) wine_vk_icdNegotiateLoaderICDInterfaceVersion