Wine-devel
Threads by month
- ----- 2026 -----
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
July 2018
- 74 participants
- 637 discussions
13 Jul '18
The current version of Vulkan Loader returns VK_API_VERSION_1_1.
Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com>
---
dlls/vulkan-1/tests/vulkan.c | 22 ++++++++++++++++++++++
dlls/vulkan-1/vulkan-1.spec | 2 +-
dlls/vulkan-1/vulkan.c | 14 +++++++++++---
dlls/winevulkan/make_vulkan | 6 +++++-
dlls/winevulkan/vulkan.c | 14 ++++++++++++++
dlls/winevulkan/vulkan_thunks.h | 2 ++
dlls/winevulkan/winevulkan.spec | 2 +-
dlls/winex11.drv/vulkan.c | 18 ++++++++++++++++++
include/wine/vulkan.h | 2 ++
include/wine/vulkan_driver.h | 3 ++-
10 files changed, 78 insertions(+), 7 deletions(-)
diff --git a/dlls/vulkan-1/tests/vulkan.c b/dlls/vulkan-1/tests/vulkan.c
index 087ee16b05df..bf83a2899d93 100644
--- a/dlls/vulkan-1/tests/vulkan.c
+++ b/dlls/vulkan-1/tests/vulkan.c
@@ -114,6 +114,27 @@ static VkResult create_device(VkPhysicalDevice vk_physical_device,
return vkCreateDevice(vk_physical_device, &create_info, NULL, vk_device);
}
+static void test_instance_version(void)
+{
+ PFN_vkEnumerateInstanceVersion pfn_vkEnumerateInstanceVersion;
+ uint32_t version;
+ VkResult vr;
+
+ pfn_vkEnumerateInstanceVersion = (PFN_vkEnumerateInstanceVersion)vkGetInstanceProcAddr(
+ NULL, "vkEnumerateInstanceVersion");
+ if (!pfn_vkEnumerateInstanceVersion)
+ {
+ skip("vkEnumerateInstanceVersion() is not available.\n");
+ return;
+ }
+
+ vr = pfn_vkEnumerateInstanceVersion(&version);
+ ok(vr == VK_SUCCESS, "Got unexpected VkResult %d.\n", vr);
+ ok(version >= VK_API_VERSION_1_0, "Invalid version %#x.\n", version);
+ trace("Vulkan version %u.%u.%u.\n",
+ VK_VERSION_MAJOR(version), VK_VERSION_MINOR(version), VK_VERSION_PATCH(version));
+}
+
static void enumerate_physical_device(VkPhysicalDevice vk_physical_device)
{
VkPhysicalDeviceProperties properties;
@@ -225,6 +246,7 @@ static void for_each_device(void (*test_func)(VkPhysicalDevice))
START_TEST(vulkan)
{
+ test_instance_version();
for_each_device(enumerate_physical_device);
test_physical_device_groups();
}
diff --git a/dlls/vulkan-1/vulkan-1.spec b/dlls/vulkan-1/vulkan-1.spec
index 3defb7cffcb4..c518343a17c4 100644
--- a/dlls/vulkan-1/vulkan-1.spec
+++ b/dlls/vulkan-1/vulkan-1.spec
@@ -148,7 +148,7 @@
@ stdcall vkEnumerateDeviceLayerProperties(ptr ptr ptr) winevulkan.wine_vkEnumerateDeviceLayerProperties
@ stdcall vkEnumerateInstanceExtensionProperties(str ptr ptr)
@ stdcall vkEnumerateInstanceLayerProperties(ptr ptr)
-@ stub vkEnumerateInstanceVersion
+@ stdcall vkEnumerateInstanceVersion(ptr)
@ stdcall vkEnumeratePhysicalDeviceGroups(ptr ptr ptr) winevulkan.wine_vkEnumeratePhysicalDeviceGroups
@ stdcall vkEnumeratePhysicalDevices(ptr ptr ptr) winevulkan.wine_vkEnumeratePhysicalDevices
@ stdcall vkFlushMappedMemoryRanges(ptr long ptr) winevulkan.wine_vkFlushMappedMemoryRanges
diff --git a/dlls/vulkan-1/vulkan.c b/dlls/vulkan-1/vulkan.c
index 82fd868baf5c..abac9e14f26f 100644
--- a/dlls/vulkan-1/vulkan.c
+++ b/dlls/vulkan-1/vulkan.c
@@ -29,12 +29,13 @@
WINE_DEFAULT_DEBUG_CHANNEL(vulkan);
VkResult WINAPI wine_vkEnumerateInstanceExtensionProperties(const char *, uint32_t *, VkExtensionProperties *);
+VkResult WINAPI wine_vkEnumerateInstanceVersion(uint32_t *);
PFN_vkVoidFunction WINAPI wine_vkGetInstanceProcAddr(VkInstance, const char *);
VkResult WINAPI vkEnumerateInstanceExtensionProperties(const char *layer_name,
uint32_t *count, VkExtensionProperties *properties)
{
- TRACE("%p %p %p\n", layer_name, count, properties);
+ TRACE("%p, %p, %p\n", layer_name, count, properties);
if (layer_name)
return VK_ERROR_LAYER_NOT_PRESENT;
@@ -42,6 +43,13 @@ VkResult WINAPI vkEnumerateInstanceExtensionProperties(const char *layer_name,
return wine_vkEnumerateInstanceExtensionProperties(NULL, count, properties);
}
+VkResult WINAPI vkEnumerateInstanceVersion(uint32_t *version)
+{
+ TRACE("%p\n", version);
+
+ return wine_vkEnumerateInstanceVersion(version);
+}
+
VkResult WINAPI vkEnumerateInstanceLayerProperties(uint32_t *count,
VkLayerProperties *properties)
{
@@ -54,7 +62,7 @@ VkResult WINAPI vkEnumerateInstanceLayerProperties(uint32_t *count,
PFN_vkVoidFunction WINAPI vkGetInstanceProcAddr(VkInstance instance, const char *name)
{
- TRACE("%p %s\n", instance, debugstr_a(name));
+ TRACE("%p, %s\n", instance, debugstr_a(name));
if (!strcmp(name, "vkEnumerateInstanceExtensionProperties"))
return (PFN_vkVoidFunction)vkEnumerateInstanceExtensionProperties;
@@ -70,7 +78,7 @@ PFN_vkVoidFunction WINAPI vkGetInstanceProcAddr(VkInstance instance, const char
BOOL WINAPI DllMain(HINSTANCE hinst, DWORD reason, void *reserved)
{
- TRACE("(%p, %u, %p)\n", hinst, reason, reserved);
+ TRACE("%p, %u, %p\n", hinst, reason, reserved);
switch (reason)
{
diff --git a/dlls/winevulkan/make_vulkan b/dlls/winevulkan/make_vulkan
index 193d2ffcdef2..fbb8528f5601 100755
--- a/dlls/winevulkan/make_vulkan
+++ b/dlls/winevulkan/make_vulkan
@@ -65,6 +65,7 @@ LOGGER = logging.Logger("vulkan")
LOGGER.addHandler(logging.StreamHandler())
VK_XML_VERSION = "1.1.76"
+WINE_VK_VERSION = (1, 0)
# Filenames to create.
WINE_VULKAN_H = "../../include/wine/vulkan.h"
@@ -129,7 +130,7 @@ CORE_EXTENSIONS = [
# Functions part of our winevulkan graphics driver interface.
# DRIVER_VERSION should be bumped on any change to driver interface
# in FUNCTION_OVERRIDES
-DRIVER_VERSION = 4
+DRIVER_VERSION = 5
# Table of functions for which we have a special implementation.
# These are regular device / instance functions for which we need
@@ -143,6 +144,7 @@ FUNCTION_OVERRIDES = {
# Global functions
"vkCreateInstance" : {"dispatch" : False, "driver" : True, "thunk" : False},
"vkEnumerateInstanceExtensionProperties" : {"dispatch" : False, "driver" : True, "thunk" : False},
+ "vkEnumerateInstanceVersion": {"dispatch" : False, "driver" : True, "thunk" : False},
"vkGetInstanceProcAddr": {"dispatch" : False, "driver" : True, "thunk" : False},
# Instance functions
@@ -2030,6 +2032,8 @@ class VkGenerator(object):
f.write("#ifndef __WINE_VULKAN_THUNKS_H\n")
f.write("#define __WINE_VULKAN_THUNKS_H\n\n")
+ f.write("#define WINE_VK_VERSION VK_API_VERSION_{0}_{1}\n\n".format(WINE_VK_VERSION[0], WINE_VK_VERSION[1]))
+
# Generate prototypes for device and instance functions requiring a custom implementation.
f.write("/* Functions for which we have custom implementations outside of the thunks. */\n")
for vk_func in self.registry.funcs.values():
diff --git a/dlls/winevulkan/vulkan.c b/dlls/winevulkan/vulkan.c
index cb84c4dd53ad..f2ec38a0f7c1 100644
--- a/dlls/winevulkan/vulkan.c
+++ b/dlls/winevulkan/vulkan.c
@@ -831,6 +831,19 @@ VkResult WINAPI wine_vkEnumerateInstanceExtensionProperties(const char *layer_na
return *count < num_properties ? VK_INCOMPLETE : VK_SUCCESS;
}
+VkResult WINAPI wine_vkEnumerateInstanceVersion(uint32_t *version)
+{
+ VkResult res;
+
+ TRACE("%p\n", version);
+
+ res = vk_funcs->p_vkEnumerateInstanceVersion(version);
+ TRACE("API version %u.%u.%u.\n",
+ VK_VERSION_MAJOR(*version), VK_VERSION_MINOR(*version), VK_VERSION_PATCH(*version));
+ *version = min(WINE_VK_VERSION, *version);
+ return res;
+}
+
VkResult WINAPI wine_vkEnumeratePhysicalDevices(VkInstance instance, uint32_t *count,
VkPhysicalDevice *devices)
{
@@ -1086,6 +1099,7 @@ static const struct vulkan_func vk_global_dispatch_table[] =
{
{"vkCreateInstance", &wine_vkCreateInstance},
{"vkEnumerateInstanceExtensionProperties", &wine_vkEnumerateInstanceExtensionProperties},
+ {"vkEnumerateInstanceVersion", &wine_vkEnumerateInstanceVersion},
{"vkGetInstanceProcAddr", &wine_vkGetInstanceProcAddr},
};
diff --git a/dlls/winevulkan/vulkan_thunks.h b/dlls/winevulkan/vulkan_thunks.h
index a779dfe7ffc2..86b81ab3d7e2 100644
--- a/dlls/winevulkan/vulkan_thunks.h
+++ b/dlls/winevulkan/vulkan_thunks.h
@@ -38,6 +38,8 @@
#ifndef __WINE_VULKAN_THUNKS_H
#define __WINE_VULKAN_THUNKS_H
+#define WINE_VK_VERSION VK_API_VERSION_1_0
+
/* Functions for which we have custom implementations outside of the thunks. */
VkResult WINAPI wine_vkAllocateCommandBuffers(VkDevice device, const VkCommandBufferAllocateInfo *pAllocateInfo, VkCommandBuffer *pCommandBuffers);
void WINAPI wine_vkCmdExecuteCommands(VkCommandBuffer commandBuffer, uint32_t commandBufferCount, const VkCommandBuffer *pCommandBuffers);
diff --git a/dlls/winevulkan/winevulkan.spec b/dlls/winevulkan/winevulkan.spec
index d0ed27d813a4..ee34a99acf46 100644
--- a/dlls/winevulkan/winevulkan.spec
+++ b/dlls/winevulkan/winevulkan.spec
@@ -149,7 +149,7 @@
@ stdcall wine_vkEnumerateDeviceExtensionProperties(ptr str ptr ptr)
@ stdcall wine_vkEnumerateDeviceLayerProperties(ptr ptr ptr)
@ stdcall wine_vkEnumerateInstanceExtensionProperties(str ptr ptr)
-@ stub vkEnumerateInstanceVersion
+@ stdcall wine_vkEnumerateInstanceVersion(ptr)
@ stdcall wine_vkEnumeratePhysicalDeviceGroups(ptr ptr ptr)
@ stdcall wine_vkEnumeratePhysicalDevices(ptr ptr ptr)
@ stdcall wine_vkFlushMappedMemoryRanges(ptr long ptr)
diff --git a/dlls/winex11.drv/vulkan.c b/dlls/winex11.drv/vulkan.c
index a6740a4d1cc0..b0bce1ed57f0 100644
--- a/dlls/winex11.drv/vulkan.c
+++ b/dlls/winex11.drv/vulkan.c
@@ -79,6 +79,7 @@ static void (*pvkDestroyInstance)(VkInstance, const VkAllocationCallbacks *);
static void (*pvkDestroySurfaceKHR)(VkInstance, VkSurfaceKHR, const VkAllocationCallbacks *);
static void (*pvkDestroySwapchainKHR)(VkDevice, VkSwapchainKHR, const VkAllocationCallbacks *);
static VkResult (*pvkEnumerateInstanceExtensionProperties)(const char *, uint32_t *, VkExtensionProperties *);
+static VkResult (*pvkEnumerateInstanceVersion)(uint32_t *);
static VkResult (*pvkGetDeviceGroupSurfacePresentModesKHR)(VkDevice, VkSurfaceKHR, VkDeviceGroupPresentModeFlagsKHR *);
static void * (*pvkGetDeviceProcAddr)(VkDevice, const char *);
static void * (*pvkGetInstanceProcAddr)(VkInstance, const char *);
@@ -128,6 +129,7 @@ static BOOL WINAPI wine_vk_init(INIT_ONCE *once, void *param, void **context)
LOAD_FUNCPTR(vkGetPhysicalDeviceXlibPresentationSupportKHR)
LOAD_FUNCPTR(vkGetSwapchainImagesKHR)
LOAD_FUNCPTR(vkQueuePresentKHR)
+ LOAD_OPTIONAL_FUNCPTR(vkEnumerateInstanceVersion)
LOAD_OPTIONAL_FUNCPTR(vkGetDeviceGroupSurfacePresentModesKHR)
LOAD_OPTIONAL_FUNCPTR(vkGetPhysicalDevicePresentRectanglesKHR)
#undef LOAD_FUNCPTR
@@ -421,6 +423,19 @@ static VkResult X11DRV_vkEnumerateInstanceExtensionProperties(const char *layer_
return res;
}
+static VkResult X11DRV_vkEnumerateInstanceVersion(uint32_t *version)
+{
+ TRACE("%p\n", version);
+
+ if (!pvkEnumerateInstanceVersion)
+ {
+ *version = VK_API_VERSION_1_0;
+ return VK_SUCCESS;
+ }
+
+ return pvkEnumerateInstanceVersion(version);
+}
+
static VkResult X11DRV_vkGetDeviceGroupSurfacePresentModesKHR(VkDevice device,
VkSurfaceKHR surface, VkDeviceGroupPresentModeFlagsKHR *flags)
{
@@ -537,6 +552,7 @@ static const struct vulkan_funcs vulkan_funcs =
X11DRV_vkDestroySurfaceKHR,
X11DRV_vkDestroySwapchainKHR,
X11DRV_vkEnumerateInstanceExtensionProperties,
+ X11DRV_vkEnumerateInstanceVersion,
X11DRV_vkGetDeviceGroupSurfacePresentModesKHR,
X11DRV_vkGetDeviceProcAddr,
X11DRV_vkGetInstanceProcAddr,
@@ -593,6 +609,8 @@ static void *get_vulkan_driver_instance_proc_addr(const struct vulkan_funcs *vul
return vulkan_funcs->p_vkCreateInstance;
if (!strcmp(name, "EnumerateInstanceExtensionProperties"))
return vulkan_funcs->p_vkEnumerateInstanceExtensionProperties;
+ if (!strcmp(name, "EnumerateInstanceVersion"))
+ return vulkan_funcs->p_vkEnumerateInstanceVersion;
if (!instance)
return NULL;
diff --git a/include/wine/vulkan.h b/include/wine/vulkan.h
index caa41f321387..10c1243c2e92 100644
--- a/include/wine/vulkan.h
+++ b/include/wine/vulkan.h
@@ -4299,6 +4299,7 @@ typedef VkResult (VKAPI_PTR *PFN_vkEnumerateDeviceExtensionProperties)(VkPhysica
typedef VkResult (VKAPI_PTR *PFN_vkEnumerateDeviceLayerProperties)(VkPhysicalDevice, uint32_t *, VkLayerProperties *);
typedef VkResult (VKAPI_PTR *PFN_vkEnumerateInstanceExtensionProperties)(const char *, uint32_t *, VkExtensionProperties *);
typedef VkResult (VKAPI_PTR *PFN_vkEnumerateInstanceLayerProperties)(uint32_t *, VkLayerProperties *);
+typedef VkResult (VKAPI_PTR *PFN_vkEnumerateInstanceVersion)(uint32_t *);
typedef VkResult (VKAPI_PTR *PFN_vkEnumeratePhysicalDeviceGroups)(VkInstance, uint32_t *, VkPhysicalDeviceGroupProperties *);
typedef VkResult (VKAPI_PTR *PFN_vkEnumeratePhysicalDeviceGroupsKHR)(VkInstance, uint32_t *, VkPhysicalDeviceGroupProperties *);
typedef VkResult (VKAPI_PTR *PFN_vkEnumeratePhysicalDevices)(VkInstance, uint32_t *, VkPhysicalDevice *);
@@ -4516,6 +4517,7 @@ VkResult VKAPI_CALL vkEnumerateDeviceExtensionProperties(VkPhysicalDevice physic
VkResult VKAPI_CALL vkEnumerateDeviceLayerProperties(VkPhysicalDevice physicalDevice, uint32_t *pPropertyCount, VkLayerProperties *pProperties);
VkResult VKAPI_CALL vkEnumerateInstanceExtensionProperties(const char *pLayerName, uint32_t *pPropertyCount, VkExtensionProperties *pProperties);
VkResult VKAPI_CALL vkEnumerateInstanceLayerProperties(uint32_t *pPropertyCount, VkLayerProperties *pProperties);
+VkResult VKAPI_CALL vkEnumerateInstanceVersion(uint32_t *pApiVersion);
VkResult VKAPI_CALL vkEnumeratePhysicalDeviceGroups(VkInstance instance, uint32_t *pPhysicalDeviceGroupCount, VkPhysicalDeviceGroupProperties *pPhysicalDeviceGroupProperties);
VkResult VKAPI_CALL vkEnumeratePhysicalDeviceGroupsKHR(VkInstance instance, uint32_t *pPhysicalDeviceGroupCount, VkPhysicalDeviceGroupProperties *pPhysicalDeviceGroupProperties);
VkResult VKAPI_CALL vkEnumeratePhysicalDevices(VkInstance instance, uint32_t *pPhysicalDeviceCount, VkPhysicalDevice *pPhysicalDevices);
diff --git a/include/wine/vulkan_driver.h b/include/wine/vulkan_driver.h
index a18728caa225..37fe9ad3066d 100644
--- a/include/wine/vulkan_driver.h
+++ b/include/wine/vulkan_driver.h
@@ -39,7 +39,7 @@
#define __WINE_VULKAN_DRIVER_H
/* Wine internal vulkan driver version, needs to be bumped upon vulkan_funcs changes. */
-#define WINE_VULKAN_DRIVER_VERSION 4
+#define WINE_VULKAN_DRIVER_VERSION 5
struct vulkan_funcs
{
@@ -55,6 +55,7 @@ struct vulkan_funcs
void (*p_vkDestroySurfaceKHR)(VkInstance, VkSurfaceKHR, const VkAllocationCallbacks *);
void (*p_vkDestroySwapchainKHR)(VkDevice, VkSwapchainKHR, const VkAllocationCallbacks *);
VkResult (*p_vkEnumerateInstanceExtensionProperties)(const char *, uint32_t *, VkExtensionProperties *);
+ VkResult (*p_vkEnumerateInstanceVersion)(uint32_t *);
VkResult (*p_vkGetDeviceGroupSurfacePresentModesKHR)(VkDevice, VkSurfaceKHR, VkDeviceGroupPresentModeFlagsKHR *);
void * (*p_vkGetDeviceProcAddr)(VkDevice, const char *);
void * (*p_vkGetInstanceProcAddr)(VkInstance, const char *);
--
2.16.4
1
0
Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com>
---
Not tested with real VK_KHR_device_group implementation.
---
dlls/vulkan-1/vulkan-1.spec | 10 ++---
dlls/winevulkan/make_vulkan | 1 -
dlls/winevulkan/vulkan_thunks.c | 81 +++++++++++++++++++++++++++++++++++++++++
dlls/winevulkan/vulkan_thunks.h | 31 ++++++++++++++++
dlls/winevulkan/winevulkan.spec | 10 ++---
include/wine/vulkan.h | 18 +++++++++
6 files changed, 140 insertions(+), 11 deletions(-)
diff --git a/dlls/vulkan-1/vulkan-1.spec b/dlls/vulkan-1/vulkan-1.spec
index 57323a43d2b7..3defb7cffcb4 100644
--- a/dlls/vulkan-1/vulkan-1.spec
+++ b/dlls/vulkan-1/vulkan-1.spec
@@ -34,7 +34,7 @@
# but only in their entirety and only with respect to the Combined Software.
#
-@ stub vkAcquireNextImage2KHR
+@ stdcall vkAcquireNextImage2KHR(ptr ptr ptr) winevulkan.wine_vkAcquireNextImage2KHR
@ stdcall vkAcquireNextImageKHR(ptr int64 int64 int64 int64 ptr) winevulkan.wine_vkAcquireNextImageKHR
@ stdcall vkAllocateCommandBuffers(ptr ptr ptr) winevulkan.wine_vkAllocateCommandBuffers
@ stdcall vkAllocateDescriptorSets(ptr ptr ptr) winevulkan.wine_vkAllocateDescriptorSets
@@ -60,7 +60,7 @@
@ stdcall vkCmdCopyImageToBuffer(ptr int64 long int64 long ptr) winevulkan.wine_vkCmdCopyImageToBuffer
@ stdcall vkCmdCopyQueryPoolResults(ptr int64 long long int64 int64 int64 long) winevulkan.wine_vkCmdCopyQueryPoolResults
@ stdcall vkCmdDispatch(ptr long long long) winevulkan.wine_vkCmdDispatch
-@ stub vkCmdDispatchBase
+@ stdcall vkCmdDispatchBase(ptr long long long long long long) winevulkan.wine_vkCmdDispatchBase
@ stdcall vkCmdDispatchIndirect(ptr int64 int64) winevulkan.wine_vkCmdDispatchIndirect
@ stdcall vkCmdDraw(ptr long long long long) winevulkan.wine_vkCmdDraw
@ stdcall vkCmdDrawIndexed(ptr long long long long long) winevulkan.wine_vkCmdDrawIndexed
@@ -79,7 +79,7 @@
@ stdcall vkCmdSetBlendConstants(ptr ptr) winevulkan.wine_vkCmdSetBlendConstants
@ stdcall vkCmdSetDepthBias(ptr float float float) winevulkan.wine_vkCmdSetDepthBias
@ stdcall vkCmdSetDepthBounds(ptr float float) winevulkan.wine_vkCmdSetDepthBounds
-@ stub vkCmdSetDeviceMask
+@ stdcall vkCmdSetDeviceMask(ptr long) winevulkan.wine_vkCmdSetDeviceMask
@ stdcall vkCmdSetEvent(ptr int64 long) winevulkan.wine_vkCmdSetEvent
@ stdcall vkCmdSetLineWidth(ptr float) winevulkan.wine_vkCmdSetLineWidth
@ stdcall vkCmdSetScissor(ptr long long ptr) winevulkan.wine_vkCmdSetScissor
@@ -158,8 +158,8 @@
@ stdcall vkGetBufferMemoryRequirements(ptr int64 ptr) winevulkan.wine_vkGetBufferMemoryRequirements
@ stdcall vkGetBufferMemoryRequirements2(ptr ptr ptr) winevulkan.wine_vkGetBufferMemoryRequirements2
@ stdcall vkGetDescriptorSetLayoutSupport(ptr ptr ptr) winevulkan.wine_vkGetDescriptorSetLayoutSupport
-@ stub vkGetDeviceGroupPeerMemoryFeatures
-@ stub vkGetDeviceGroupPresentCapabilitiesKHR
+@ stdcall vkGetDeviceGroupPeerMemoryFeatures(ptr long long long long) winevulkan.wine_vkGetDeviceGroupPeerMemoryFeatures
+@ stdcall vkGetDeviceGroupPresentCapabilitiesKHR(ptr ptr) winevulkan.wine_vkGetDeviceGroupPresentCapabilitiesKHR
@ stdcall vkGetDeviceGroupSurfacePresentModesKHR(ptr int64 long) winevulkan.wine_vkGetDeviceGroupSurfacePresentModesKHR
@ stdcall vkGetDeviceMemoryCommitment(ptr int64 ptr) winevulkan.wine_vkGetDeviceMemoryCommitment
@ stdcall vkGetDeviceProcAddr(ptr str) winevulkan.wine_vkGetDeviceProcAddr
diff --git a/dlls/winevulkan/make_vulkan b/dlls/winevulkan/make_vulkan
index 0f2e8881e4fd..193d2ffcdef2 100755
--- a/dlls/winevulkan/make_vulkan
+++ b/dlls/winevulkan/make_vulkan
@@ -103,7 +103,6 @@ BLACKLISTED_EXTENSIONS = [
"VK_EXT_external_memory_dma_buf", # Linux specific
"VK_EXT_hdr_metadata", # Needs WSI work.
"VK_GOOGLE_display_timing",
- "VK_KHR_device_group", # Needs some thought, but part of Vulkan 1.1 Core.
"VK_KHR_display", # Needs WSI work.
"VK_KHR_external_fence",
"VK_KHR_external_fence_fd",
diff --git a/dlls/winevulkan/vulkan_thunks.c b/dlls/winevulkan/vulkan_thunks.c
index f9bc4be6f90f..b88158cad455 100644
--- a/dlls/winevulkan/vulkan_thunks.c
+++ b/dlls/winevulkan/vulkan_thunks.c
@@ -43,6 +43,19 @@
WINE_DEFAULT_DEBUG_CHANNEL(vulkan);
#if defined(USE_STRUCT_CONVERSION)
+static inline void convert_VkAcquireNextImageInfoKHR_win_to_host(const VkAcquireNextImageInfoKHR *in, VkAcquireNextImageInfoKHR_host *out)
+{
+ if (!in) return;
+
+ out->sType = in->sType;
+ out->pNext = in->pNext;
+ out->swapchain = in->swapchain;
+ out->timeout = in->timeout;
+ out->semaphore = in->semaphore;
+ out->fence = in->fence;
+ out->deviceMask = in->deviceMask;
+}
+
static inline void convert_VkDescriptorSetAllocateInfo_win_to_host(const VkDescriptorSetAllocateInfo *in, VkDescriptorSetAllocateInfo_host *out)
{
if (!in) return;
@@ -1121,6 +1134,23 @@ static inline void free_VkCopyDescriptorSet_array(VkCopyDescriptorSet_host *in,
#endif /* USE_STRUCT_CONVERSION */
+VkResult WINAPI wine_vkAcquireNextImage2KHR(VkDevice device, const VkAcquireNextImageInfoKHR *pAcquireInfo, uint32_t *pImageIndex)
+{
+#if defined(USE_STRUCT_CONVERSION)
+ VkResult result;
+ VkAcquireNextImageInfoKHR_host pAcquireInfo_host;
+ TRACE("%p, %p, %p\n", device, pAcquireInfo, pImageIndex);
+
+ convert_VkAcquireNextImageInfoKHR_win_to_host(pAcquireInfo, &pAcquireInfo_host);
+ result = device->funcs.p_vkAcquireNextImage2KHR(device->device, &pAcquireInfo_host, pImageIndex);
+
+ return result;
+#else
+ TRACE("%p, %p, %p\n", device, pAcquireInfo, pImageIndex);
+ return device->funcs.p_vkAcquireNextImage2KHR(device->device, pAcquireInfo, pImageIndex);
+#endif
+}
+
VkResult WINAPI wine_vkAcquireNextImageKHR(VkDevice device, VkSwapchainKHR swapchain, uint64_t timeout, VkSemaphore semaphore, VkFence fence, uint32_t *pImageIndex)
{
TRACE("%p, 0x%s, 0x%s, 0x%s, 0x%s, %p\n", device, wine_dbgstr_longlong(swapchain), wine_dbgstr_longlong(timeout), wine_dbgstr_longlong(semaphore), wine_dbgstr_longlong(fence), pImageIndex);
@@ -1398,6 +1428,18 @@ void WINAPI wine_vkCmdDispatch(VkCommandBuffer commandBuffer, uint32_t groupCoun
commandBuffer->device->funcs.p_vkCmdDispatch(commandBuffer->command_buffer, groupCountX, groupCountY, groupCountZ);
}
+void WINAPI wine_vkCmdDispatchBase(VkCommandBuffer commandBuffer, uint32_t baseGroupX, uint32_t baseGroupY, uint32_t baseGroupZ, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ)
+{
+ TRACE("%p, %u, %u, %u, %u, %u, %u\n", commandBuffer, baseGroupX, baseGroupY, baseGroupZ, groupCountX, groupCountY, groupCountZ);
+ commandBuffer->device->funcs.p_vkCmdDispatchBase(commandBuffer->command_buffer, baseGroupX, baseGroupY, baseGroupZ, groupCountX, groupCountY, groupCountZ);
+}
+
+static void WINAPI wine_vkCmdDispatchBaseKHR(VkCommandBuffer commandBuffer, uint32_t baseGroupX, uint32_t baseGroupY, uint32_t baseGroupZ, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ)
+{
+ TRACE("%p, %u, %u, %u, %u, %u, %u\n", commandBuffer, baseGroupX, baseGroupY, baseGroupZ, groupCountX, groupCountY, groupCountZ);
+ commandBuffer->device->funcs.p_vkCmdDispatchBaseKHR(commandBuffer->command_buffer, baseGroupX, baseGroupY, baseGroupZ, groupCountX, groupCountY, groupCountZ);
+}
+
void WINAPI wine_vkCmdDispatchIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset)
{
TRACE("%p, 0x%s, 0x%s\n", commandBuffer, wine_dbgstr_longlong(buffer), wine_dbgstr_longlong(offset));
@@ -1559,6 +1601,18 @@ void WINAPI wine_vkCmdSetDepthBounds(VkCommandBuffer commandBuffer, float minDep
commandBuffer->device->funcs.p_vkCmdSetDepthBounds(commandBuffer->command_buffer, minDepthBounds, maxDepthBounds);
}
+void WINAPI wine_vkCmdSetDeviceMask(VkCommandBuffer commandBuffer, uint32_t deviceMask)
+{
+ TRACE("%p, %u\n", commandBuffer, deviceMask);
+ commandBuffer->device->funcs.p_vkCmdSetDeviceMask(commandBuffer->command_buffer, deviceMask);
+}
+
+static void WINAPI wine_vkCmdSetDeviceMaskKHR(VkCommandBuffer commandBuffer, uint32_t deviceMask)
+{
+ TRACE("%p, %u\n", commandBuffer, deviceMask);
+ commandBuffer->device->funcs.p_vkCmdSetDeviceMaskKHR(commandBuffer->command_buffer, deviceMask);
+}
+
static void WINAPI wine_vkCmdSetDiscardRectangleEXT(VkCommandBuffer commandBuffer, uint32_t firstDiscardRectangle, uint32_t discardRectangleCount, const VkRect2D *pDiscardRectangles)
{
TRACE("%p, %u, %u, %p\n", commandBuffer, firstDiscardRectangle, discardRectangleCount, pDiscardRectangles);
@@ -2174,6 +2228,24 @@ static void WINAPI wine_vkGetDescriptorSetLayoutSupportKHR(VkDevice device, cons
device->funcs.p_vkGetDescriptorSetLayoutSupportKHR(device->device, pCreateInfo, pSupport);
}
+void WINAPI wine_vkGetDeviceGroupPeerMemoryFeatures(VkDevice device, uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex, VkPeerMemoryFeatureFlags *pPeerMemoryFeatures)
+{
+ TRACE("%p, %u, %u, %u, %p\n", device, heapIndex, localDeviceIndex, remoteDeviceIndex, pPeerMemoryFeatures);
+ device->funcs.p_vkGetDeviceGroupPeerMemoryFeatures(device->device, heapIndex, localDeviceIndex, remoteDeviceIndex, pPeerMemoryFeatures);
+}
+
+static void WINAPI wine_vkGetDeviceGroupPeerMemoryFeaturesKHR(VkDevice device, uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex, VkPeerMemoryFeatureFlags *pPeerMemoryFeatures)
+{
+ TRACE("%p, %u, %u, %u, %p\n", device, heapIndex, localDeviceIndex, remoteDeviceIndex, pPeerMemoryFeatures);
+ device->funcs.p_vkGetDeviceGroupPeerMemoryFeaturesKHR(device->device, heapIndex, localDeviceIndex, remoteDeviceIndex, pPeerMemoryFeatures);
+}
+
+VkResult WINAPI wine_vkGetDeviceGroupPresentCapabilitiesKHR(VkDevice device, VkDeviceGroupPresentCapabilitiesKHR *pDeviceGroupPresentCapabilities)
+{
+ TRACE("%p, %p\n", device, pDeviceGroupPresentCapabilities);
+ return device->funcs.p_vkGetDeviceGroupPresentCapabilitiesKHR(device->device, pDeviceGroupPresentCapabilities);
+}
+
VkResult WINAPI wine_vkGetDeviceGroupSurfacePresentModesKHR(VkDevice device, VkSurfaceKHR surface, VkDeviceGroupPresentModeFlagsKHR *pModes)
{
TRACE("%p, 0x%s, %p\n", device, wine_dbgstr_longlong(surface), pModes);
@@ -2756,6 +2828,7 @@ VkResult WINAPI wine_vkWaitForFences(VkDevice device, uint32_t fenceCount, const
static const struct vulkan_func vk_device_dispatch_table[] =
{
+ {"vkAcquireNextImage2KHR", &wine_vkAcquireNextImage2KHR},
{"vkAcquireNextImageKHR", &wine_vkAcquireNextImageKHR},
{"vkAllocateCommandBuffers", &wine_vkAllocateCommandBuffers},
{"vkAllocateDescriptorSets", &wine_vkAllocateDescriptorSets},
@@ -2783,6 +2856,8 @@ static const struct vulkan_func vk_device_dispatch_table[] =
{"vkCmdCopyImageToBuffer", &wine_vkCmdCopyImageToBuffer},
{"vkCmdCopyQueryPoolResults", &wine_vkCmdCopyQueryPoolResults},
{"vkCmdDispatch", &wine_vkCmdDispatch},
+ {"vkCmdDispatchBase", &wine_vkCmdDispatchBase},
+ {"vkCmdDispatchBaseKHR", &wine_vkCmdDispatchBaseKHR},
{"vkCmdDispatchIndirect", &wine_vkCmdDispatchIndirect},
{"vkCmdDraw", &wine_vkCmdDraw},
{"vkCmdDrawIndexed", &wine_vkCmdDrawIndexed},
@@ -2807,6 +2882,8 @@ static const struct vulkan_func vk_device_dispatch_table[] =
{"vkCmdSetBlendConstants", &wine_vkCmdSetBlendConstants},
{"vkCmdSetDepthBias", &wine_vkCmdSetDepthBias},
{"vkCmdSetDepthBounds", &wine_vkCmdSetDepthBounds},
+ {"vkCmdSetDeviceMask", &wine_vkCmdSetDeviceMask},
+ {"vkCmdSetDeviceMaskKHR", &wine_vkCmdSetDeviceMaskKHR},
{"vkCmdSetDiscardRectangleEXT", &wine_vkCmdSetDiscardRectangleEXT},
{"vkCmdSetEvent", &wine_vkCmdSetEvent},
{"vkCmdSetLineWidth", &wine_vkCmdSetLineWidth},
@@ -2882,6 +2959,9 @@ static const struct vulkan_func vk_device_dispatch_table[] =
{"vkGetBufferMemoryRequirements2KHR", &wine_vkGetBufferMemoryRequirements2KHR},
{"vkGetDescriptorSetLayoutSupport", &wine_vkGetDescriptorSetLayoutSupport},
{"vkGetDescriptorSetLayoutSupportKHR", &wine_vkGetDescriptorSetLayoutSupportKHR},
+ {"vkGetDeviceGroupPeerMemoryFeatures", &wine_vkGetDeviceGroupPeerMemoryFeatures},
+ {"vkGetDeviceGroupPeerMemoryFeaturesKHR", &wine_vkGetDeviceGroupPeerMemoryFeaturesKHR},
+ {"vkGetDeviceGroupPresentCapabilitiesKHR", &wine_vkGetDeviceGroupPresentCapabilitiesKHR},
{"vkGetDeviceGroupSurfacePresentModesKHR", &wine_vkGetDeviceGroupSurfacePresentModesKHR},
{"vkGetDeviceMemoryCommitment", &wine_vkGetDeviceMemoryCommitment},
{"vkGetDeviceProcAddr", &wine_vkGetDeviceProcAddr},
@@ -3032,6 +3112,7 @@ static const char * const vk_device_extensions[] =
"VK_KHR_bind_memory2",
"VK_KHR_dedicated_allocation",
"VK_KHR_descriptor_update_template",
+ "VK_KHR_device_group",
"VK_KHR_draw_indirect_count",
"VK_KHR_get_memory_requirements2",
"VK_KHR_image_format_list",
diff --git a/dlls/winevulkan/vulkan_thunks.h b/dlls/winevulkan/vulkan_thunks.h
index 6357bfc1bfda..a779dfe7ffc2 100644
--- a/dlls/winevulkan/vulkan_thunks.h
+++ b/dlls/winevulkan/vulkan_thunks.h
@@ -53,6 +53,17 @@ PFN_vkVoidFunction WINAPI wine_vkGetDeviceProcAddr(VkDevice device, const char *
void WINAPI wine_vkGetDeviceQueue(VkDevice device, uint32_t queueFamilyIndex, uint32_t queueIndex, VkQueue *pQueue);
VkResult WINAPI wine_vkQueueSubmit(VkQueue queue, uint32_t submitCount, const VkSubmitInfo *pSubmits, VkFence fence);
+typedef struct VkAcquireNextImageInfoKHR_host
+{
+ VkStructureType sType;
+ const void *pNext;
+ VkSwapchainKHR swapchain;
+ uint64_t timeout;
+ VkSemaphore semaphore;
+ VkFence fence;
+ uint32_t deviceMask;
+} VkAcquireNextImageInfoKHR_host;
+
typedef struct VkCommandBufferAllocateInfo_host
{
VkStructureType sType;
@@ -622,6 +633,11 @@ typedef struct VkCopyDescriptorSet_host
/* For use by vkDevice and children */
struct vulkan_device_funcs
{
+#if defined(USE_STRUCT_CONVERSION)
+ VkResult (*p_vkAcquireNextImage2KHR)(VkDevice, const VkAcquireNextImageInfoKHR_host *, uint32_t *);
+#else
+ VkResult (*p_vkAcquireNextImage2KHR)(VkDevice, const VkAcquireNextImageInfoKHR *, uint32_t *);
+#endif
VkResult (*p_vkAcquireNextImageKHR)(VkDevice, VkSwapchainKHR, uint64_t, VkSemaphore, VkFence, uint32_t *);
#if defined(USE_STRUCT_CONVERSION)
VkResult (*p_vkAllocateCommandBuffers)(VkDevice, const VkCommandBufferAllocateInfo_host *, VkCommandBuffer *);
@@ -697,6 +713,8 @@ struct vulkan_device_funcs
#endif
void (*p_vkCmdCopyQueryPoolResults)(VkCommandBuffer, VkQueryPool, uint32_t, uint32_t, VkBuffer, VkDeviceSize, VkDeviceSize, VkQueryResultFlags);
void (*p_vkCmdDispatch)(VkCommandBuffer, uint32_t, uint32_t, uint32_t);
+ void (*p_vkCmdDispatchBase)(VkCommandBuffer, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t);
+ void (*p_vkCmdDispatchBaseKHR)(VkCommandBuffer, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t);
void (*p_vkCmdDispatchIndirect)(VkCommandBuffer, VkBuffer, VkDeviceSize);
void (*p_vkCmdDraw)(VkCommandBuffer, uint32_t, uint32_t, uint32_t, uint32_t);
void (*p_vkCmdDrawIndexed)(VkCommandBuffer, uint32_t, uint32_t, uint32_t, int32_t, uint32_t);
@@ -729,6 +747,8 @@ struct vulkan_device_funcs
void (*p_vkCmdSetBlendConstants)(VkCommandBuffer, const float[4]);
void (*p_vkCmdSetDepthBias)(VkCommandBuffer, float, float, float);
void (*p_vkCmdSetDepthBounds)(VkCommandBuffer, float, float);
+ void (*p_vkCmdSetDeviceMask)(VkCommandBuffer, uint32_t);
+ void (*p_vkCmdSetDeviceMaskKHR)(VkCommandBuffer, uint32_t);
void (*p_vkCmdSetDiscardRectangleEXT)(VkCommandBuffer, uint32_t, uint32_t, const VkRect2D *);
void (*p_vkCmdSetEvent)(VkCommandBuffer, VkEvent, VkPipelineStageFlags);
void (*p_vkCmdSetLineWidth)(VkCommandBuffer, float);
@@ -860,6 +880,9 @@ struct vulkan_device_funcs
#endif
void (*p_vkGetDescriptorSetLayoutSupport)(VkDevice, const VkDescriptorSetLayoutCreateInfo *, VkDescriptorSetLayoutSupport *);
void (*p_vkGetDescriptorSetLayoutSupportKHR)(VkDevice, const VkDescriptorSetLayoutCreateInfo *, VkDescriptorSetLayoutSupport *);
+ void (*p_vkGetDeviceGroupPeerMemoryFeatures)(VkDevice, uint32_t, uint32_t, uint32_t, VkPeerMemoryFeatureFlags *);
+ void (*p_vkGetDeviceGroupPeerMemoryFeaturesKHR)(VkDevice, uint32_t, uint32_t, uint32_t, VkPeerMemoryFeatureFlags *);
+ VkResult (*p_vkGetDeviceGroupPresentCapabilitiesKHR)(VkDevice, VkDeviceGroupPresentCapabilitiesKHR *);
VkResult (*p_vkGetDeviceGroupSurfacePresentModesKHR)(VkDevice, VkSurfaceKHR, VkDeviceGroupPresentModeFlagsKHR *);
void (*p_vkGetDeviceMemoryCommitment)(VkDevice, VkDeviceMemory, VkDeviceSize *);
void (*p_vkGetDeviceQueue)(VkDevice, uint32_t, uint32_t, VkQueue *);
@@ -1015,6 +1038,7 @@ struct vulkan_instance_funcs
};
#define ALL_VK_DEVICE_FUNCS() \
+ USE_VK_FUNC(vkAcquireNextImage2KHR) \
USE_VK_FUNC(vkAcquireNextImageKHR) \
USE_VK_FUNC(vkAllocateCommandBuffers) \
USE_VK_FUNC(vkAllocateDescriptorSets) \
@@ -1042,6 +1066,8 @@ struct vulkan_instance_funcs
USE_VK_FUNC(vkCmdCopyImageToBuffer) \
USE_VK_FUNC(vkCmdCopyQueryPoolResults) \
USE_VK_FUNC(vkCmdDispatch) \
+ USE_VK_FUNC(vkCmdDispatchBase) \
+ USE_VK_FUNC(vkCmdDispatchBaseKHR) \
USE_VK_FUNC(vkCmdDispatchIndirect) \
USE_VK_FUNC(vkCmdDraw) \
USE_VK_FUNC(vkCmdDrawIndexed) \
@@ -1066,6 +1092,8 @@ struct vulkan_instance_funcs
USE_VK_FUNC(vkCmdSetBlendConstants) \
USE_VK_FUNC(vkCmdSetDepthBias) \
USE_VK_FUNC(vkCmdSetDepthBounds) \
+ USE_VK_FUNC(vkCmdSetDeviceMask) \
+ USE_VK_FUNC(vkCmdSetDeviceMaskKHR) \
USE_VK_FUNC(vkCmdSetDiscardRectangleEXT) \
USE_VK_FUNC(vkCmdSetEvent) \
USE_VK_FUNC(vkCmdSetLineWidth) \
@@ -1141,6 +1169,9 @@ struct vulkan_instance_funcs
USE_VK_FUNC(vkGetBufferMemoryRequirements2KHR) \
USE_VK_FUNC(vkGetDescriptorSetLayoutSupport) \
USE_VK_FUNC(vkGetDescriptorSetLayoutSupportKHR) \
+ USE_VK_FUNC(vkGetDeviceGroupPeerMemoryFeatures) \
+ USE_VK_FUNC(vkGetDeviceGroupPeerMemoryFeaturesKHR) \
+ USE_VK_FUNC(vkGetDeviceGroupPresentCapabilitiesKHR) \
USE_VK_FUNC(vkGetDeviceGroupSurfacePresentModesKHR) \
USE_VK_FUNC(vkGetDeviceMemoryCommitment) \
USE_VK_FUNC(vkGetDeviceQueue) \
diff --git a/dlls/winevulkan/winevulkan.spec b/dlls/winevulkan/winevulkan.spec
index 2785f5caeadb..d0ed27d813a4 100644
--- a/dlls/winevulkan/winevulkan.spec
+++ b/dlls/winevulkan/winevulkan.spec
@@ -36,7 +36,7 @@
@ stdcall vk_icdGetInstanceProcAddr(ptr str) wine_vk_icdGetInstanceProcAddr
@ stdcall vk_icdNegotiateLoaderICDInterfaceVersion(ptr) wine_vk_icdNegotiateLoaderICDInterfaceVersion
-@ stub vkAcquireNextImage2KHR
+@ stdcall wine_vkAcquireNextImage2KHR(ptr ptr ptr)
@ stdcall wine_vkAcquireNextImageKHR(ptr int64 int64 int64 int64 ptr)
@ stdcall wine_vkAllocateCommandBuffers(ptr ptr ptr)
@ stdcall wine_vkAllocateDescriptorSets(ptr ptr ptr)
@@ -62,7 +62,7 @@
@ stdcall wine_vkCmdCopyImageToBuffer(ptr int64 long int64 long ptr)
@ stdcall wine_vkCmdCopyQueryPoolResults(ptr int64 long long int64 int64 int64 long)
@ stdcall wine_vkCmdDispatch(ptr long long long)
-@ stub vkCmdDispatchBase
+@ stdcall wine_vkCmdDispatchBase(ptr long long long long long long)
@ stdcall wine_vkCmdDispatchIndirect(ptr int64 int64)
@ stdcall wine_vkCmdDraw(ptr long long long long)
@ stdcall wine_vkCmdDrawIndexed(ptr long long long long long)
@@ -81,7 +81,7 @@
@ stdcall wine_vkCmdSetBlendConstants(ptr ptr)
@ stdcall wine_vkCmdSetDepthBias(ptr float float float)
@ stdcall wine_vkCmdSetDepthBounds(ptr float float)
-@ stub vkCmdSetDeviceMask
+@ stdcall wine_vkCmdSetDeviceMask(ptr long)
@ stdcall wine_vkCmdSetEvent(ptr int64 long)
@ stdcall wine_vkCmdSetLineWidth(ptr float)
@ stdcall wine_vkCmdSetScissor(ptr long long ptr)
@@ -159,8 +159,8 @@
@ stdcall wine_vkGetBufferMemoryRequirements(ptr int64 ptr)
@ stdcall wine_vkGetBufferMemoryRequirements2(ptr ptr ptr)
@ stdcall wine_vkGetDescriptorSetLayoutSupport(ptr ptr ptr)
-@ stub vkGetDeviceGroupPeerMemoryFeatures
-@ stub vkGetDeviceGroupPresentCapabilitiesKHR
+@ stdcall wine_vkGetDeviceGroupPeerMemoryFeatures(ptr long long long long)
+@ stdcall wine_vkGetDeviceGroupPresentCapabilitiesKHR(ptr ptr)
@ stdcall wine_vkGetDeviceGroupSurfacePresentModesKHR(ptr int64 long)
@ stdcall wine_vkGetDeviceMemoryCommitment(ptr int64 ptr)
@ stdcall wine_vkGetDeviceProcAddr(ptr str)
diff --git a/include/wine/vulkan.h b/include/wine/vulkan.h
index 5f214d8548c7..caa41f321387 100644
--- a/include/wine/vulkan.h
+++ b/include/wine/vulkan.h
@@ -129,6 +129,8 @@
#define VK_NV_EXTERNAL_MEMORY_EXTENSION_NAME "VK_NV_external_memory"
#define VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_SPEC_VERSION 1
#define VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME "VK_KHR_get_physical_device_properties2"
+#define VK_KHR_DEVICE_GROUP_SPEC_VERSION 3
+#define VK_KHR_DEVICE_GROUP_EXTENSION_NAME "VK_KHR_device_group"
#define VK_KHR_SHADER_DRAW_PARAMETERS_SPEC_VERSION 1
#define VK_KHR_SHADER_DRAW_PARAMETERS_EXTENSION_NAME "VK_KHR_shader_draw_parameters"
#define VK_EXT_SHADER_SUBGROUP_BALLOT_SPEC_VERSION 1
@@ -4166,6 +4168,7 @@ typedef struct VkPresentRegionsKHR
const VkPresentRegionKHR *pRegions;
} VkPresentRegionsKHR;
+typedef VkResult (VKAPI_PTR *PFN_vkAcquireNextImage2KHR)(VkDevice, const VkAcquireNextImageInfoKHR *, uint32_t *);
typedef VkResult (VKAPI_PTR *PFN_vkAcquireNextImageKHR)(VkDevice, VkSwapchainKHR, uint64_t, VkSemaphore, VkFence, uint32_t *);
typedef VkResult (VKAPI_PTR *PFN_vkAllocateCommandBuffers)(VkDevice, const VkCommandBufferAllocateInfo *, VkCommandBuffer *);
typedef VkResult (VKAPI_PTR *PFN_vkAllocateDescriptorSets)(VkDevice, const VkDescriptorSetAllocateInfo *, VkDescriptorSet *);
@@ -4193,6 +4196,8 @@ typedef void (VKAPI_PTR *PFN_vkCmdCopyImage)(VkCommandBuffer, VkImage, VkImageLa
typedef void (VKAPI_PTR *PFN_vkCmdCopyImageToBuffer)(VkCommandBuffer, VkImage, VkImageLayout, VkBuffer, uint32_t, const VkBufferImageCopy *);
typedef void (VKAPI_PTR *PFN_vkCmdCopyQueryPoolResults)(VkCommandBuffer, VkQueryPool, uint32_t, uint32_t, VkBuffer, VkDeviceSize, VkDeviceSize, VkQueryResultFlags);
typedef void (VKAPI_PTR *PFN_vkCmdDispatch)(VkCommandBuffer, uint32_t, uint32_t, uint32_t);
+typedef void (VKAPI_PTR *PFN_vkCmdDispatchBase)(VkCommandBuffer, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t);
+typedef void (VKAPI_PTR *PFN_vkCmdDispatchBaseKHR)(VkCommandBuffer, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t);
typedef void (VKAPI_PTR *PFN_vkCmdDispatchIndirect)(VkCommandBuffer, VkBuffer, VkDeviceSize);
typedef void (VKAPI_PTR *PFN_vkCmdDraw)(VkCommandBuffer, uint32_t, uint32_t, uint32_t, uint32_t);
typedef void (VKAPI_PTR *PFN_vkCmdDrawIndexed)(VkCommandBuffer, uint32_t, uint32_t, uint32_t, int32_t, uint32_t);
@@ -4217,6 +4222,8 @@ typedef void (VKAPI_PTR *PFN_vkCmdResolveImage)(VkCommandBuffer, VkImage, VkImag
typedef void (VKAPI_PTR *PFN_vkCmdSetBlendConstants)(VkCommandBuffer, const float[4]);
typedef void (VKAPI_PTR *PFN_vkCmdSetDepthBias)(VkCommandBuffer, float, float, float);
typedef void (VKAPI_PTR *PFN_vkCmdSetDepthBounds)(VkCommandBuffer, float, float);
+typedef void (VKAPI_PTR *PFN_vkCmdSetDeviceMask)(VkCommandBuffer, uint32_t);
+typedef void (VKAPI_PTR *PFN_vkCmdSetDeviceMaskKHR)(VkCommandBuffer, uint32_t);
typedef void (VKAPI_PTR *PFN_vkCmdSetDiscardRectangleEXT)(VkCommandBuffer, uint32_t, uint32_t, const VkRect2D *);
typedef void (VKAPI_PTR *PFN_vkCmdSetEvent)(VkCommandBuffer, VkEvent, VkPipelineStageFlags);
typedef void (VKAPI_PTR *PFN_vkCmdSetLineWidth)(VkCommandBuffer, float);
@@ -4304,6 +4311,9 @@ typedef void (VKAPI_PTR *PFN_vkGetBufferMemoryRequirements2)(VkDevice, const VkB
typedef void (VKAPI_PTR *PFN_vkGetBufferMemoryRequirements2KHR)(VkDevice, const VkBufferMemoryRequirementsInfo2 *, VkMemoryRequirements2 *);
typedef void (VKAPI_PTR *PFN_vkGetDescriptorSetLayoutSupport)(VkDevice, const VkDescriptorSetLayoutCreateInfo *, VkDescriptorSetLayoutSupport *);
typedef void (VKAPI_PTR *PFN_vkGetDescriptorSetLayoutSupportKHR)(VkDevice, const VkDescriptorSetLayoutCreateInfo *, VkDescriptorSetLayoutSupport *);
+typedef void (VKAPI_PTR *PFN_vkGetDeviceGroupPeerMemoryFeatures)(VkDevice, uint32_t, uint32_t, uint32_t, VkPeerMemoryFeatureFlags *);
+typedef void (VKAPI_PTR *PFN_vkGetDeviceGroupPeerMemoryFeaturesKHR)(VkDevice, uint32_t, uint32_t, uint32_t, VkPeerMemoryFeatureFlags *);
+typedef VkResult (VKAPI_PTR *PFN_vkGetDeviceGroupPresentCapabilitiesKHR)(VkDevice, VkDeviceGroupPresentCapabilitiesKHR *);
typedef VkResult (VKAPI_PTR *PFN_vkGetDeviceGroupSurfacePresentModesKHR)(VkDevice, VkSurfaceKHR, VkDeviceGroupPresentModeFlagsKHR *);
typedef void (VKAPI_PTR *PFN_vkGetDeviceMemoryCommitment)(VkDevice, VkDeviceMemory, VkDeviceSize *);
typedef PFN_vkVoidFunction (VKAPI_PTR *PFN_vkGetDeviceProcAddr)(VkDevice, const char *);
@@ -4375,6 +4385,7 @@ typedef void (VKAPI_PTR *PFN_vkUpdateDescriptorSets)(VkDevice, uint32_t, const V
typedef VkResult (VKAPI_PTR *PFN_vkWaitForFences)(VkDevice, uint32_t, const VkFence *, VkBool32, uint64_t);
#ifndef VK_NO_PROTOTYPES
+VkResult VKAPI_CALL vkAcquireNextImage2KHR(VkDevice device, const VkAcquireNextImageInfoKHR *pAcquireInfo, uint32_t *pImageIndex);
VkResult VKAPI_CALL vkAcquireNextImageKHR(VkDevice device, VkSwapchainKHR swapchain, uint64_t timeout, VkSemaphore semaphore, VkFence fence, uint32_t *pImageIndex);
VkResult VKAPI_CALL vkAllocateCommandBuffers(VkDevice device, const VkCommandBufferAllocateInfo *pAllocateInfo, VkCommandBuffer *pCommandBuffers);
VkResult VKAPI_CALL vkAllocateDescriptorSets(VkDevice device, const VkDescriptorSetAllocateInfo *pAllocateInfo, VkDescriptorSet *pDescriptorSets);
@@ -4402,6 +4413,8 @@ void VKAPI_CALL vkCmdCopyImage(VkCommandBuffer commandBuffer, VkImage srcImage,
void VKAPI_CALL vkCmdCopyImageToBuffer(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkBuffer dstBuffer, uint32_t regionCount, const VkBufferImageCopy *pRegions);
void VKAPI_CALL vkCmdCopyQueryPoolResults(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize stride, VkQueryResultFlags flags);
void VKAPI_CALL vkCmdDispatch(VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ);
+void VKAPI_CALL vkCmdDispatchBase(VkCommandBuffer commandBuffer, uint32_t baseGroupX, uint32_t baseGroupY, uint32_t baseGroupZ, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ);
+void VKAPI_CALL vkCmdDispatchBaseKHR(VkCommandBuffer commandBuffer, uint32_t baseGroupX, uint32_t baseGroupY, uint32_t baseGroupZ, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ);
void VKAPI_CALL vkCmdDispatchIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset);
void VKAPI_CALL vkCmdDraw(VkCommandBuffer commandBuffer, uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance);
void VKAPI_CALL vkCmdDrawIndexed(VkCommandBuffer commandBuffer, uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t vertexOffset, uint32_t firstInstance);
@@ -4426,6 +4439,8 @@ void VKAPI_CALL vkCmdResolveImage(VkCommandBuffer commandBuffer, VkImage srcImag
void VKAPI_CALL vkCmdSetBlendConstants(VkCommandBuffer commandBuffer, const float blendConstants[4]);
void VKAPI_CALL vkCmdSetDepthBias(VkCommandBuffer commandBuffer, float depthBiasConstantFactor, float depthBiasClamp, float depthBiasSlopeFactor);
void VKAPI_CALL vkCmdSetDepthBounds(VkCommandBuffer commandBuffer, float minDepthBounds, float maxDepthBounds);
+void VKAPI_CALL vkCmdSetDeviceMask(VkCommandBuffer commandBuffer, uint32_t deviceMask);
+void VKAPI_CALL vkCmdSetDeviceMaskKHR(VkCommandBuffer commandBuffer, uint32_t deviceMask);
void VKAPI_CALL vkCmdSetDiscardRectangleEXT(VkCommandBuffer commandBuffer, uint32_t firstDiscardRectangle, uint32_t discardRectangleCount, const VkRect2D *pDiscardRectangles);
void VKAPI_CALL vkCmdSetEvent(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask);
void VKAPI_CALL vkCmdSetLineWidth(VkCommandBuffer commandBuffer, float lineWidth);
@@ -4513,6 +4528,9 @@ void VKAPI_CALL vkGetBufferMemoryRequirements2(VkDevice device, const VkBufferMe
void VKAPI_CALL vkGetBufferMemoryRequirements2KHR(VkDevice device, const VkBufferMemoryRequirementsInfo2 *pInfo, VkMemoryRequirements2 *pMemoryRequirements);
void VKAPI_CALL vkGetDescriptorSetLayoutSupport(VkDevice device, const VkDescriptorSetLayoutCreateInfo *pCreateInfo, VkDescriptorSetLayoutSupport *pSupport);
void VKAPI_CALL vkGetDescriptorSetLayoutSupportKHR(VkDevice device, const VkDescriptorSetLayoutCreateInfo *pCreateInfo, VkDescriptorSetLayoutSupport *pSupport);
+void VKAPI_CALL vkGetDeviceGroupPeerMemoryFeatures(VkDevice device, uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex, VkPeerMemoryFeatureFlags *pPeerMemoryFeatures);
+void VKAPI_CALL vkGetDeviceGroupPeerMemoryFeaturesKHR(VkDevice device, uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex, VkPeerMemoryFeatureFlags *pPeerMemoryFeatures);
+VkResult VKAPI_CALL vkGetDeviceGroupPresentCapabilitiesKHR(VkDevice device, VkDeviceGroupPresentCapabilitiesKHR *pDeviceGroupPresentCapabilities);
VkResult VKAPI_CALL vkGetDeviceGroupSurfacePresentModesKHR(VkDevice device, VkSurfaceKHR surface, VkDeviceGroupPresentModeFlagsKHR *pModes);
void VKAPI_CALL vkGetDeviceMemoryCommitment(VkDevice device, VkDeviceMemory memory, VkDeviceSize *pCommittedMemoryInBytes);
PFN_vkVoidFunction VKAPI_CALL vkGetDeviceProcAddr(VkDevice device, const char *pName);
--
2.16.4
1
0
13 Jul '18
In order to unwrap VkSurface.
Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com>
---
dlls/vulkan-1/vulkan-1.spec | 4 ++--
dlls/winevulkan/make_vulkan | 8 +++++--
dlls/winevulkan/vulkan_thunks.c | 14 +++++++++++
dlls/winevulkan/vulkan_thunks.h | 4 ++++
dlls/winevulkan/winevulkan.spec | 4 ++--
dlls/winex11.drv/vulkan.c | 51 +++++++++++++++++++++++++++++++----------
include/wine/vulkan.h | 4 ++++
include/wine/vulkan_driver.h | 4 +++-
8 files changed, 74 insertions(+), 19 deletions(-)
diff --git a/dlls/vulkan-1/vulkan-1.spec b/dlls/vulkan-1/vulkan-1.spec
index 8c32b011f251..57323a43d2b7 100644
--- a/dlls/vulkan-1/vulkan-1.spec
+++ b/dlls/vulkan-1/vulkan-1.spec
@@ -160,7 +160,7 @@
@ stdcall vkGetDescriptorSetLayoutSupport(ptr ptr ptr) winevulkan.wine_vkGetDescriptorSetLayoutSupport
@ stub vkGetDeviceGroupPeerMemoryFeatures
@ stub vkGetDeviceGroupPresentCapabilitiesKHR
-@ stub vkGetDeviceGroupSurfacePresentModesKHR
+@ stdcall vkGetDeviceGroupSurfacePresentModesKHR(ptr int64 long) winevulkan.wine_vkGetDeviceGroupSurfacePresentModesKHR
@ stdcall vkGetDeviceMemoryCommitment(ptr int64 ptr) winevulkan.wine_vkGetDeviceMemoryCommitment
@ stdcall vkGetDeviceProcAddr(ptr str) winevulkan.wine_vkGetDeviceProcAddr
@ stdcall vkGetDeviceQueue(ptr long long ptr) winevulkan.wine_vkGetDeviceQueue
@@ -189,7 +189,7 @@
@ stdcall vkGetPhysicalDeviceImageFormatProperties2(ptr ptr ptr) winevulkan.wine_vkGetPhysicalDeviceImageFormatProperties2
@ stdcall vkGetPhysicalDeviceMemoryProperties(ptr ptr) winevulkan.wine_vkGetPhysicalDeviceMemoryProperties
@ stdcall vkGetPhysicalDeviceMemoryProperties2(ptr ptr) winevulkan.wine_vkGetPhysicalDeviceMemoryProperties2
-@ stub vkGetPhysicalDevicePresentRectanglesKHR
+@ stdcall vkGetPhysicalDevicePresentRectanglesKHR(ptr int64 ptr ptr) winevulkan.wine_vkGetPhysicalDevicePresentRectanglesKHR
@ stdcall vkGetPhysicalDeviceProperties(ptr ptr) winevulkan.wine_vkGetPhysicalDeviceProperties
@ stdcall vkGetPhysicalDeviceProperties2(ptr ptr) winevulkan.wine_vkGetPhysicalDeviceProperties2
@ stdcall vkGetPhysicalDeviceQueueFamilyProperties(ptr ptr ptr) winevulkan.wine_vkGetPhysicalDeviceQueueFamilyProperties
diff --git a/dlls/winevulkan/make_vulkan b/dlls/winevulkan/make_vulkan
index 8c00509a82de..0f2e8881e4fd 100755
--- a/dlls/winevulkan/make_vulkan
+++ b/dlls/winevulkan/make_vulkan
@@ -130,7 +130,7 @@ CORE_EXTENSIONS = [
# Functions part of our winevulkan graphics driver interface.
# DRIVER_VERSION should be bumped on any change to driver interface
# in FUNCTION_OVERRIDES
-DRIVER_VERSION = 3
+DRIVER_VERSION = 4
# Table of functions for which we have a special implementation.
# These are regular device / instance functions for which we need
@@ -182,6 +182,10 @@ FUNCTION_OVERRIDES = {
# VK_KHR_device_group_creation
"vkEnumeratePhysicalDeviceGroupsKHR" : {"dispatch" : True, "driver" : False, "thunk" : False},
+
+ # VK_KHR_device_group
+ "vkGetDeviceGroupSurfacePresentModesKHR" : {"dispatch" : True, "driver" : True, "thunk" : True},
+ "vkGetPhysicalDevicePresentRectanglesKHR" : {"dispatch" : True, "driver" : True, "thunk" : True},
}
@@ -397,7 +401,7 @@ class VkFunction(object):
# Required is set while parsing which APIs and types are required
# and is used by the code generation.
- self.required = False
+ self.required = True if self.driver else False
@staticmethod
def from_alias(command, alias):
diff --git a/dlls/winevulkan/vulkan_thunks.c b/dlls/winevulkan/vulkan_thunks.c
index 2a6300341015..f9bc4be6f90f 100644
--- a/dlls/winevulkan/vulkan_thunks.c
+++ b/dlls/winevulkan/vulkan_thunks.c
@@ -2174,6 +2174,12 @@ static void WINAPI wine_vkGetDescriptorSetLayoutSupportKHR(VkDevice device, cons
device->funcs.p_vkGetDescriptorSetLayoutSupportKHR(device->device, pCreateInfo, pSupport);
}
+VkResult WINAPI wine_vkGetDeviceGroupSurfacePresentModesKHR(VkDevice device, VkSurfaceKHR surface, VkDeviceGroupPresentModeFlagsKHR *pModes)
+{
+ TRACE("%p, 0x%s, %p\n", device, wine_dbgstr_longlong(surface), pModes);
+ return device->funcs.p_vkGetDeviceGroupSurfacePresentModesKHR(device->device, surface, pModes);
+}
+
void WINAPI wine_vkGetDeviceMemoryCommitment(VkDevice device, VkDeviceMemory memory, VkDeviceSize *pCommittedMemoryInBytes)
{
TRACE("%p, 0x%s, %p\n", device, wine_dbgstr_longlong(memory), pCommittedMemoryInBytes);
@@ -2436,6 +2442,12 @@ static void WINAPI wine_vkGetPhysicalDeviceMultisamplePropertiesEXT(VkPhysicalDe
physicalDevice->instance->funcs.p_vkGetPhysicalDeviceMultisamplePropertiesEXT(physicalDevice->phys_dev, samples, pMultisampleProperties);
}
+VkResult WINAPI wine_vkGetPhysicalDevicePresentRectanglesKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t *pRectCount, VkRect2D *pRects)
+{
+ TRACE("%p, 0x%s, %p, %p\n", physicalDevice, wine_dbgstr_longlong(surface), pRectCount, pRects);
+ return physicalDevice->instance->funcs.p_vkGetPhysicalDevicePresentRectanglesKHR(physicalDevice->phys_dev, surface, pRectCount, pRects);
+}
+
void WINAPI wine_vkGetPhysicalDeviceProperties(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties *pProperties)
{
#if defined(USE_STRUCT_CONVERSION)
@@ -2870,6 +2882,7 @@ static const struct vulkan_func vk_device_dispatch_table[] =
{"vkGetBufferMemoryRequirements2KHR", &wine_vkGetBufferMemoryRequirements2KHR},
{"vkGetDescriptorSetLayoutSupport", &wine_vkGetDescriptorSetLayoutSupport},
{"vkGetDescriptorSetLayoutSupportKHR", &wine_vkGetDescriptorSetLayoutSupportKHR},
+ {"vkGetDeviceGroupSurfacePresentModesKHR", &wine_vkGetDeviceGroupSurfacePresentModesKHR},
{"vkGetDeviceMemoryCommitment", &wine_vkGetDeviceMemoryCommitment},
{"vkGetDeviceProcAddr", &wine_vkGetDeviceProcAddr},
{"vkGetDeviceQueue", &wine_vkGetDeviceQueue},
@@ -2935,6 +2948,7 @@ static const struct vulkan_func vk_instance_dispatch_table[] =
{"vkGetPhysicalDeviceMemoryProperties2", &wine_vkGetPhysicalDeviceMemoryProperties2},
{"vkGetPhysicalDeviceMemoryProperties2KHR", &wine_vkGetPhysicalDeviceMemoryProperties2KHR},
{"vkGetPhysicalDeviceMultisamplePropertiesEXT", &wine_vkGetPhysicalDeviceMultisamplePropertiesEXT},
+ {"vkGetPhysicalDevicePresentRectanglesKHR", &wine_vkGetPhysicalDevicePresentRectanglesKHR},
{"vkGetPhysicalDeviceProperties", &wine_vkGetPhysicalDeviceProperties},
{"vkGetPhysicalDeviceProperties2", &wine_vkGetPhysicalDeviceProperties2},
{"vkGetPhysicalDeviceProperties2KHR", &wine_vkGetPhysicalDeviceProperties2KHR},
diff --git a/dlls/winevulkan/vulkan_thunks.h b/dlls/winevulkan/vulkan_thunks.h
index c9fe07898000..6357bfc1bfda 100644
--- a/dlls/winevulkan/vulkan_thunks.h
+++ b/dlls/winevulkan/vulkan_thunks.h
@@ -860,6 +860,7 @@ struct vulkan_device_funcs
#endif
void (*p_vkGetDescriptorSetLayoutSupport)(VkDevice, const VkDescriptorSetLayoutCreateInfo *, VkDescriptorSetLayoutSupport *);
void (*p_vkGetDescriptorSetLayoutSupportKHR)(VkDevice, const VkDescriptorSetLayoutCreateInfo *, VkDescriptorSetLayoutSupport *);
+ VkResult (*p_vkGetDeviceGroupSurfacePresentModesKHR)(VkDevice, VkSurfaceKHR, VkDeviceGroupPresentModeFlagsKHR *);
void (*p_vkGetDeviceMemoryCommitment)(VkDevice, VkDeviceMemory, VkDeviceSize *);
void (*p_vkGetDeviceQueue)(VkDevice, uint32_t, uint32_t, VkQueue *);
VkResult (*p_vkGetEventStatus)(VkDevice, VkEvent);
@@ -984,6 +985,7 @@ struct vulkan_instance_funcs
void (*p_vkGetPhysicalDeviceMemoryProperties2KHR)(VkPhysicalDevice, VkPhysicalDeviceMemoryProperties2 *);
#endif
void (*p_vkGetPhysicalDeviceMultisamplePropertiesEXT)(VkPhysicalDevice, VkSampleCountFlagBits, VkMultisamplePropertiesEXT *);
+ VkResult (*p_vkGetPhysicalDevicePresentRectanglesKHR)(VkPhysicalDevice, VkSurfaceKHR, uint32_t *, VkRect2D *);
#if defined(USE_STRUCT_CONVERSION)
void (*p_vkGetPhysicalDeviceProperties)(VkPhysicalDevice, VkPhysicalDeviceProperties_host *);
#else
@@ -1139,6 +1141,7 @@ struct vulkan_instance_funcs
USE_VK_FUNC(vkGetBufferMemoryRequirements2KHR) \
USE_VK_FUNC(vkGetDescriptorSetLayoutSupport) \
USE_VK_FUNC(vkGetDescriptorSetLayoutSupportKHR) \
+ USE_VK_FUNC(vkGetDeviceGroupSurfacePresentModesKHR) \
USE_VK_FUNC(vkGetDeviceMemoryCommitment) \
USE_VK_FUNC(vkGetDeviceQueue) \
USE_VK_FUNC(vkGetEventStatus) \
@@ -1200,6 +1203,7 @@ struct vulkan_instance_funcs
USE_VK_FUNC(vkGetPhysicalDeviceMemoryProperties2) \
USE_VK_FUNC(vkGetPhysicalDeviceMemoryProperties2KHR) \
USE_VK_FUNC(vkGetPhysicalDeviceMultisamplePropertiesEXT) \
+ USE_VK_FUNC(vkGetPhysicalDevicePresentRectanglesKHR) \
USE_VK_FUNC(vkGetPhysicalDeviceProperties) \
USE_VK_FUNC(vkGetPhysicalDeviceProperties2) \
USE_VK_FUNC(vkGetPhysicalDeviceProperties2KHR) \
diff --git a/dlls/winevulkan/winevulkan.spec b/dlls/winevulkan/winevulkan.spec
index c196eb1324a4..2785f5caeadb 100644
--- a/dlls/winevulkan/winevulkan.spec
+++ b/dlls/winevulkan/winevulkan.spec
@@ -161,7 +161,7 @@
@ stdcall wine_vkGetDescriptorSetLayoutSupport(ptr ptr ptr)
@ stub vkGetDeviceGroupPeerMemoryFeatures
@ stub vkGetDeviceGroupPresentCapabilitiesKHR
-@ stub vkGetDeviceGroupSurfacePresentModesKHR
+@ stdcall wine_vkGetDeviceGroupSurfacePresentModesKHR(ptr int64 long)
@ stdcall wine_vkGetDeviceMemoryCommitment(ptr int64 ptr)
@ stdcall wine_vkGetDeviceProcAddr(ptr str)
@ stdcall wine_vkGetDeviceQueue(ptr long long ptr)
@@ -190,7 +190,7 @@
@ stdcall wine_vkGetPhysicalDeviceImageFormatProperties2(ptr ptr ptr)
@ stdcall wine_vkGetPhysicalDeviceMemoryProperties(ptr ptr)
@ stdcall wine_vkGetPhysicalDeviceMemoryProperties2(ptr ptr)
-@ stub vkGetPhysicalDevicePresentRectanglesKHR
+@ stdcall wine_vkGetPhysicalDevicePresentRectanglesKHR(ptr int64 ptr ptr)
@ stdcall wine_vkGetPhysicalDeviceProperties(ptr ptr)
@ stdcall wine_vkGetPhysicalDeviceProperties2(ptr ptr)
@ stdcall wine_vkGetPhysicalDeviceQueueFamilyProperties(ptr ptr ptr)
diff --git a/dlls/winex11.drv/vulkan.c b/dlls/winex11.drv/vulkan.c
index fdb858d93f91..a6740a4d1cc0 100644
--- a/dlls/winex11.drv/vulkan.c
+++ b/dlls/winex11.drv/vulkan.c
@@ -79,8 +79,10 @@ static void (*pvkDestroyInstance)(VkInstance, const VkAllocationCallbacks *);
static void (*pvkDestroySurfaceKHR)(VkInstance, VkSurfaceKHR, const VkAllocationCallbacks *);
static void (*pvkDestroySwapchainKHR)(VkDevice, VkSwapchainKHR, const VkAllocationCallbacks *);
static VkResult (*pvkEnumerateInstanceExtensionProperties)(const char *, uint32_t *, VkExtensionProperties *);
+static VkResult (*pvkGetDeviceGroupSurfacePresentModesKHR)(VkDevice, VkSurfaceKHR, VkDeviceGroupPresentModeFlagsKHR *);
static void * (*pvkGetDeviceProcAddr)(VkDevice, const char *);
static void * (*pvkGetInstanceProcAddr)(VkInstance, const char *);
+static VkResult (*pvkGetPhysicalDevicePresentRectanglesKHR)(VkPhysicalDevice, VkSurfaceKHR, uint32_t *, VkRect2D *);
static VkResult (*pvkGetPhysicalDeviceSurfaceCapabilitiesKHR)(VkPhysicalDevice, VkSurfaceKHR, VkSurfaceCapabilitiesKHR *);
static VkResult (*pvkGetPhysicalDeviceSurfaceFormatsKHR)(VkPhysicalDevice, VkSurfaceKHR, uint32_t *, VkSurfaceFormatKHR *);
static VkResult (*pvkGetPhysicalDeviceSurfacePresentModesKHR)(VkPhysicalDevice, VkSurfaceKHR, uint32_t *, VkPresentModeKHR *);
@@ -103,11 +105,12 @@ static BOOL WINAPI wine_vk_init(INIT_ONCE *once, void *param, void **context)
{
if (!(vulkan_handle = wine_dlopen(SONAME_LIBVULKAN, RTLD_NOW, NULL, 0)))
{
- ERR("Failed to load %s\n", SONAME_LIBVULKAN);
+ ERR("Failed to load %s.\n", SONAME_LIBVULKAN);
return TRUE;
}
-#define LOAD_FUNCPTR(f) if ((p##f = wine_dlsym(vulkan_handle, #f, NULL, 0)) == NULL) goto fail;
+#define LOAD_FUNCPTR(f) if (!(p##f = wine_dlsym(vulkan_handle, #f, NULL, 0))) goto fail;
+#define LOAD_OPTIONAL_FUNCPTR(f) p##f = wine_dlsym(vulkan_handle, #f, NULL, 0);
LOAD_FUNCPTR(vkAcquireNextImageKHR)
LOAD_FUNCPTR(vkCreateInstance)
LOAD_FUNCPTR(vkCreateSwapchainKHR)
@@ -125,7 +128,10 @@ static BOOL WINAPI wine_vk_init(INIT_ONCE *once, void *param, void **context)
LOAD_FUNCPTR(vkGetPhysicalDeviceXlibPresentationSupportKHR)
LOAD_FUNCPTR(vkGetSwapchainImagesKHR)
LOAD_FUNCPTR(vkQueuePresentKHR)
+ LOAD_OPTIONAL_FUNCPTR(vkGetDeviceGroupSurfacePresentModesKHR)
+ LOAD_OPTIONAL_FUNCPTR(vkGetPhysicalDevicePresentRectanglesKHR)
#undef LOAD_FUNCPTR
+#undef LOAD_OPTIONAL_FUNCPTR
vulkan_hwnd_context = XUniqueContext();
@@ -264,8 +270,7 @@ static VkResult X11DRV_vkCreateSwapchainKHR(VkDevice device,
create_info_host = *create_info;
create_info_host.surface = surface_from_handle(create_info->surface)->surface;
- return pvkCreateSwapchainKHR(device, &create_info_host, NULL /* allocator */,
- swapchain);
+ return pvkCreateSwapchainKHR(device, &create_info_host, NULL /* allocator */, swapchain);
}
static VkResult X11DRV_vkCreateWin32SurfaceKHR(VkInstance instance,
@@ -416,6 +421,16 @@ static VkResult X11DRV_vkEnumerateInstanceExtensionProperties(const char *layer_
return res;
}
+static VkResult X11DRV_vkGetDeviceGroupSurfacePresentModesKHR(VkDevice device,
+ VkSurfaceKHR surface, VkDeviceGroupPresentModeFlagsKHR *flags)
+{
+ struct wine_vk_surface *x11_surface = surface_from_handle(surface);
+
+ TRACE("%p, 0x%s, %p\n", device, wine_dbgstr_longlong(surface), flags);
+
+ return pvkGetDeviceGroupSurfacePresentModesKHR(device, x11_surface->surface, flags);
+}
+
static void *X11DRV_vkGetDeviceProcAddr(VkDevice device, const char *name)
{
void *proc_addr;
@@ -440,6 +455,16 @@ static void *X11DRV_vkGetInstanceProcAddr(VkInstance instance, const char *name)
return pvkGetInstanceProcAddr(instance, name);
}
+static VkResult X11DRV_vkGetPhysicalDevicePresentRectanglesKHR(VkPhysicalDevice phys_dev,
+ VkSurfaceKHR surface, uint32_t *count, VkRect2D *rects)
+{
+ struct wine_vk_surface *x11_surface = surface_from_handle(surface);
+
+ TRACE("%p, 0x%s, %p, %p\n", phys_dev, wine_dbgstr_longlong(surface), count, rects);
+
+ return pvkGetPhysicalDevicePresentRectanglesKHR(phys_dev, x11_surface->surface, count, rects);
+}
+
static VkResult X11DRV_vkGetPhysicalDeviceSurfaceCapabilitiesKHR(VkPhysicalDevice phys_dev,
VkSurfaceKHR surface, VkSurfaceCapabilitiesKHR *capabilities)
{
@@ -447,8 +472,7 @@ static VkResult X11DRV_vkGetPhysicalDeviceSurfaceCapabilitiesKHR(VkPhysicalDevic
TRACE("%p, 0x%s, %p\n", phys_dev, wine_dbgstr_longlong(surface), capabilities);
- return pvkGetPhysicalDeviceSurfaceCapabilitiesKHR(phys_dev, x11_surface->surface,
- capabilities);
+ return pvkGetPhysicalDeviceSurfaceCapabilitiesKHR(phys_dev, x11_surface->surface, capabilities);
}
static VkResult X11DRV_vkGetPhysicalDeviceSurfaceFormatsKHR(VkPhysicalDevice phys_dev,
@@ -458,8 +482,7 @@ static VkResult X11DRV_vkGetPhysicalDeviceSurfaceFormatsKHR(VkPhysicalDevice phy
TRACE("%p, 0x%s, %p, %p\n", phys_dev, wine_dbgstr_longlong(surface), count, formats);
- return pvkGetPhysicalDeviceSurfaceFormatsKHR(phys_dev, x11_surface->surface,
- count, formats);
+ return pvkGetPhysicalDeviceSurfaceFormatsKHR(phys_dev, x11_surface->surface, count, formats);
}
static VkResult X11DRV_vkGetPhysicalDeviceSurfacePresentModesKHR(VkPhysicalDevice phys_dev,
@@ -469,8 +492,7 @@ static VkResult X11DRV_vkGetPhysicalDeviceSurfacePresentModesKHR(VkPhysicalDevic
TRACE("%p, 0x%s, %p, %p\n", phys_dev, wine_dbgstr_longlong(surface), count, modes);
- return pvkGetPhysicalDeviceSurfacePresentModesKHR(phys_dev, x11_surface->surface, count,
- modes);
+ return pvkGetPhysicalDeviceSurfacePresentModesKHR(phys_dev, x11_surface->surface, count, modes);
}
static VkResult X11DRV_vkGetPhysicalDeviceSurfaceSupportKHR(VkPhysicalDevice phys_dev,
@@ -480,8 +502,7 @@ static VkResult X11DRV_vkGetPhysicalDeviceSurfaceSupportKHR(VkPhysicalDevice phy
TRACE("%p, %u, 0x%s, %p\n", phys_dev, index, wine_dbgstr_longlong(surface), supported);
- return pvkGetPhysicalDeviceSurfaceSupportKHR(phys_dev, index, x11_surface->surface,
- supported);
+ return pvkGetPhysicalDeviceSurfaceSupportKHR(phys_dev, index, x11_surface->surface, supported);
}
static VkBool32 X11DRV_vkGetPhysicalDeviceWin32PresentationSupportKHR(VkPhysicalDevice phys_dev,
@@ -516,8 +537,10 @@ static const struct vulkan_funcs vulkan_funcs =
X11DRV_vkDestroySurfaceKHR,
X11DRV_vkDestroySwapchainKHR,
X11DRV_vkEnumerateInstanceExtensionProperties,
+ X11DRV_vkGetDeviceGroupSurfacePresentModesKHR,
X11DRV_vkGetDeviceProcAddr,
X11DRV_vkGetInstanceProcAddr,
+ X11DRV_vkGetPhysicalDevicePresentRectanglesKHR,
X11DRV_vkGetPhysicalDeviceSurfaceCapabilitiesKHR,
X11DRV_vkGetPhysicalDeviceSurfaceFormatsKHR,
X11DRV_vkGetPhysicalDeviceSurfacePresentModesKHR,
@@ -541,6 +564,8 @@ static void *get_vulkan_driver_device_proc_addr(const struct vulkan_funcs *vulka
return vulkan_funcs->p_vkCreateSwapchainKHR;
if (!strcmp(name, "DestroySwapchainKHR"))
return vulkan_funcs->p_vkDestroySwapchainKHR;
+ if (!strcmp(name, "GetDeviceGroupSurfacePresentModesKHR"))
+ return vulkan_funcs->p_vkGetDeviceGroupSurfacePresentModesKHR;
if (!strcmp(name, "GetDeviceProcAddr"))
return vulkan_funcs->p_vkGetDeviceProcAddr;
if (!strcmp(name, "GetSwapchainImagesKHR"))
@@ -580,6 +605,8 @@ static void *get_vulkan_driver_instance_proc_addr(const struct vulkan_funcs *vul
return vulkan_funcs->p_vkDestroySurfaceKHR;
if (!strcmp(name, "GetInstanceProcAddr"))
return vulkan_funcs->p_vkGetInstanceProcAddr;
+ if (!strcmp(name, "GetPhysicalDevicePresentRectanglesKHR"))
+ return vulkan_funcs->p_vkGetPhysicalDevicePresentRectanglesKHR;
if (!strcmp(name, "GetPhysicalDeviceSurfaceCapabilitiesKHR"))
return vulkan_funcs->p_vkGetPhysicalDeviceSurfaceCapabilitiesKHR;
if (!strcmp(name, "GetPhysicalDeviceSurfaceFormatsKHR"))
diff --git a/include/wine/vulkan.h b/include/wine/vulkan.h
index 6eec0b8a7625..5f214d8548c7 100644
--- a/include/wine/vulkan.h
+++ b/include/wine/vulkan.h
@@ -4304,6 +4304,7 @@ typedef void (VKAPI_PTR *PFN_vkGetBufferMemoryRequirements2)(VkDevice, const VkB
typedef void (VKAPI_PTR *PFN_vkGetBufferMemoryRequirements2KHR)(VkDevice, const VkBufferMemoryRequirementsInfo2 *, VkMemoryRequirements2 *);
typedef void (VKAPI_PTR *PFN_vkGetDescriptorSetLayoutSupport)(VkDevice, const VkDescriptorSetLayoutCreateInfo *, VkDescriptorSetLayoutSupport *);
typedef void (VKAPI_PTR *PFN_vkGetDescriptorSetLayoutSupportKHR)(VkDevice, const VkDescriptorSetLayoutCreateInfo *, VkDescriptorSetLayoutSupport *);
+typedef VkResult (VKAPI_PTR *PFN_vkGetDeviceGroupSurfacePresentModesKHR)(VkDevice, VkSurfaceKHR, VkDeviceGroupPresentModeFlagsKHR *);
typedef void (VKAPI_PTR *PFN_vkGetDeviceMemoryCommitment)(VkDevice, VkDeviceMemory, VkDeviceSize *);
typedef PFN_vkVoidFunction (VKAPI_PTR *PFN_vkGetDeviceProcAddr)(VkDevice, const char *);
typedef void (VKAPI_PTR *PFN_vkGetDeviceQueue)(VkDevice, uint32_t, uint32_t, VkQueue *);
@@ -4330,6 +4331,7 @@ typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceMemoryProperties)(VkPhysicalDevi
typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceMemoryProperties2)(VkPhysicalDevice, VkPhysicalDeviceMemoryProperties2 *);
typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceMemoryProperties2KHR)(VkPhysicalDevice, VkPhysicalDeviceMemoryProperties2 *);
typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceMultisamplePropertiesEXT)(VkPhysicalDevice, VkSampleCountFlagBits, VkMultisamplePropertiesEXT *);
+typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDevicePresentRectanglesKHR)(VkPhysicalDevice, VkSurfaceKHR, uint32_t *, VkRect2D *);
typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceProperties)(VkPhysicalDevice, VkPhysicalDeviceProperties *);
typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceProperties2)(VkPhysicalDevice, VkPhysicalDeviceProperties2 *);
typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceProperties2KHR)(VkPhysicalDevice, VkPhysicalDeviceProperties2 *);
@@ -4511,6 +4513,7 @@ void VKAPI_CALL vkGetBufferMemoryRequirements2(VkDevice device, const VkBufferMe
void VKAPI_CALL vkGetBufferMemoryRequirements2KHR(VkDevice device, const VkBufferMemoryRequirementsInfo2 *pInfo, VkMemoryRequirements2 *pMemoryRequirements);
void VKAPI_CALL vkGetDescriptorSetLayoutSupport(VkDevice device, const VkDescriptorSetLayoutCreateInfo *pCreateInfo, VkDescriptorSetLayoutSupport *pSupport);
void VKAPI_CALL vkGetDescriptorSetLayoutSupportKHR(VkDevice device, const VkDescriptorSetLayoutCreateInfo *pCreateInfo, VkDescriptorSetLayoutSupport *pSupport);
+VkResult VKAPI_CALL vkGetDeviceGroupSurfacePresentModesKHR(VkDevice device, VkSurfaceKHR surface, VkDeviceGroupPresentModeFlagsKHR *pModes);
void VKAPI_CALL vkGetDeviceMemoryCommitment(VkDevice device, VkDeviceMemory memory, VkDeviceSize *pCommittedMemoryInBytes);
PFN_vkVoidFunction VKAPI_CALL vkGetDeviceProcAddr(VkDevice device, const char *pName);
void VKAPI_CALL vkGetDeviceQueue(VkDevice device, uint32_t queueFamilyIndex, uint32_t queueIndex, VkQueue *pQueue);
@@ -4537,6 +4540,7 @@ void VKAPI_CALL vkGetPhysicalDeviceMemoryProperties(VkPhysicalDevice physicalDev
void VKAPI_CALL vkGetPhysicalDeviceMemoryProperties2(VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties2 *pMemoryProperties);
void VKAPI_CALL vkGetPhysicalDeviceMemoryProperties2KHR(VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties2 *pMemoryProperties);
void VKAPI_CALL vkGetPhysicalDeviceMultisamplePropertiesEXT(VkPhysicalDevice physicalDevice, VkSampleCountFlagBits samples, VkMultisamplePropertiesEXT *pMultisampleProperties);
+VkResult VKAPI_CALL vkGetPhysicalDevicePresentRectanglesKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t *pRectCount, VkRect2D *pRects);
void VKAPI_CALL vkGetPhysicalDeviceProperties(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties *pProperties);
void VKAPI_CALL vkGetPhysicalDeviceProperties2(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties2 *pProperties);
void VKAPI_CALL vkGetPhysicalDeviceProperties2KHR(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties2 *pProperties);
diff --git a/include/wine/vulkan_driver.h b/include/wine/vulkan_driver.h
index c11cf33e9c88..a18728caa225 100644
--- a/include/wine/vulkan_driver.h
+++ b/include/wine/vulkan_driver.h
@@ -39,7 +39,7 @@
#define __WINE_VULKAN_DRIVER_H
/* Wine internal vulkan driver version, needs to be bumped upon vulkan_funcs changes. */
-#define WINE_VULKAN_DRIVER_VERSION 3
+#define WINE_VULKAN_DRIVER_VERSION 4
struct vulkan_funcs
{
@@ -55,8 +55,10 @@ struct vulkan_funcs
void (*p_vkDestroySurfaceKHR)(VkInstance, VkSurfaceKHR, const VkAllocationCallbacks *);
void (*p_vkDestroySwapchainKHR)(VkDevice, VkSwapchainKHR, const VkAllocationCallbacks *);
VkResult (*p_vkEnumerateInstanceExtensionProperties)(const char *, uint32_t *, VkExtensionProperties *);
+ VkResult (*p_vkGetDeviceGroupSurfacePresentModesKHR)(VkDevice, VkSurfaceKHR, VkDeviceGroupPresentModeFlagsKHR *);
void * (*p_vkGetDeviceProcAddr)(VkDevice, const char *);
void * (*p_vkGetInstanceProcAddr)(VkInstance, const char *);
+ VkResult (*p_vkGetPhysicalDevicePresentRectanglesKHR)(VkPhysicalDevice, VkSurfaceKHR, uint32_t *, VkRect2D *);
VkResult (*p_vkGetPhysicalDeviceSurfaceCapabilitiesKHR)(VkPhysicalDevice, VkSurfaceKHR, VkSurfaceCapabilitiesKHR *);
VkResult (*p_vkGetPhysicalDeviceSurfaceFormatsKHR)(VkPhysicalDevice, VkSurfaceKHR, uint32_t *, VkSurfaceFormatKHR *);
VkResult (*p_vkGetPhysicalDeviceSurfacePresentModesKHR)(VkPhysicalDevice, VkSurfaceKHR, uint32_t *, VkPresentModeKHR *);
--
2.16.4
1
0
[PATCH 1/8] winevulkan: Allow running make_vulkan from any working directory.
by Józef Kucia 13 Jul '18
by Józef Kucia 13 Jul '18
13 Jul '18
Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com>
---
dlls/winevulkan/make_vulkan | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/dlls/winevulkan/make_vulkan b/dlls/winevulkan/make_vulkan
index 2672ad77e46c..8c00509a82de 100755
--- a/dlls/winevulkan/make_vulkan
+++ b/dlls/winevulkan/make_vulkan
@@ -2721,6 +2721,11 @@ class VkRegistry(object):
self.handles = sorted(handles, key=lambda handle: handle.name)
self.structs = sorted(structs, key=lambda struct: struct.name)
+def set_working_directory():
+ path = os.path.abspath(__file__)
+ path = os.path.dirname(path)
+ os.chdir(path)
+
def download_vk_xml(filename):
url = "https://raw.github.com/KhronosGroup/Vulkan-Docs/v{0}/xml/vk.xml".format(VK_XML_VERSION)
if not os.path.isfile(filename):
@@ -2738,6 +2743,8 @@ def main():
else: # > 1
LOGGER.setLevel(logging.DEBUG)
+ set_working_directory()
+
vk_xml = "vk-{0}.xml".format(VK_XML_VERSION)
download_vk_xml(vk_xml)
registry = VkRegistry(vk_xml)
--
2.16.4
1
0
13 Jul '18
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
---
Fixes test failure on Windows XP.
This should have been caught by the testbot:
https://testbot.winehq.org/JobDetails.pl?Key=39816
but no e-mail from Marvin was sent.
dlls/kernel32/tests/version.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/dlls/kernel32/tests/version.c b/dlls/kernel32/tests/version.c
index 3bc04fd..49f908b 100644
--- a/dlls/kernel32/tests/version.c
+++ b/dlls/kernel32/tests/version.c
@@ -26,6 +26,7 @@
#include "winternl.h"
static BOOL (WINAPI * pGetProductInfo)(DWORD, DWORD, DWORD, DWORD, DWORD *);
+static UINT (WINAPI * pGetSystemFirmwareTable)(DWORD, DWORD, void *, DWORD);
static NTSTATUS (WINAPI * pNtQuerySystemInformation)(SYSTEM_INFORMATION_CLASS, void *, ULONG, ULONG *);
static NTSTATUS (WINAPI * pRtlGetVersion)(RTL_OSVERSIONINFOEXW *);
@@ -44,6 +45,7 @@ static void init_function_pointers(void)
hmod = GetModuleHandleA("kernel32.dll");
GET_PROC(GetProductInfo);
+ GET_PROC(GetSystemFirmwareTable);
hmod = GetModuleHandleA("ntdll.dll");
@@ -712,6 +714,12 @@ static void test_GetSystemFirmwareTable(void)
SYSTEM_FIRMWARE_TABLE_INFORMATION *sfti = HeapAlloc(GetProcessHeap(), 0, min_sfti_len);
UCHAR *smbios_table;
+ if (!pGetSystemFirmwareTable)
+ {
+ win_skip("GetSystemFirmwareTable not available\n");
+ return;
+ }
+
ok(!!sfti, "Failed to allocate memory\n");
sfti->ProviderSignature = RSMB;
sfti->Action = SystemFirmwareTable_Get;
@@ -729,7 +737,7 @@ static void test_GetSystemFirmwareTable(void)
expected_len -= min_sfti_len;
smbios_table = HeapAlloc(GetProcessHeap(), 0, expected_len);
- len = GetSystemFirmwareTable(RSMB, 0, smbios_table, expected_len);
+ len = pGetSystemFirmwareTable(RSMB, 0, smbios_table, expected_len);
ok(len == expected_len, "Expected length %u, got %u\n", expected_len, len);
ok(len == 0 || !memcmp(smbios_table, sfti->TableBuffer, 6),
"Expected prologue %02x %02x %02x %02x %02x %02x, got %02x %02x %02x %02x %02x %02x\n",
--
2.7.4
2
2
13 Jul '18
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
---
Fixes test failure on Windows XP.
This should have been caught by the testbot:
https://testbot.winehq.org/JobDetails.pl?Key=39816
but no e-mail from Marvin was sent.
dlls/kernel32/tests/version.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/dlls/kernel32/tests/version.c b/dlls/kernel32/tests/version.c
index 3bc04fd..3904e80 100644
--- a/dlls/kernel32/tests/version.c
+++ b/dlls/kernel32/tests/version.c
@@ -26,6 +26,7 @@
#include "winternl.h"
static BOOL (WINAPI * pGetProductInfo)(DWORD, DWORD, DWORD, DWORD, DWORD *);
+static UINT (WINAPI * pGetSystemFirmwareTable)(DWORD, DWORD, void *, DWORD);
static NTSTATUS (WINAPI * pNtQuerySystemInformation)(SYSTEM_INFORMATION_CLASS, void *, ULONG, ULONG *);
static NTSTATUS (WINAPI * pRtlGetVersion)(RTL_OSVERSIONINFOEXW *);
@@ -44,6 +45,7 @@ static void init_function_pointers(void)
hmod = GetModuleHandleA("kernel32.dll");
GET_PROC(GetProductInfo);
+ GET_PROC(GetSystemFirmwareTable);
hmod = GetModuleHandleA("ntdll.dll");
@@ -729,7 +731,7 @@ static void test_GetSystemFirmwareTable(void)
expected_len -= min_sfti_len;
smbios_table = HeapAlloc(GetProcessHeap(), 0, expected_len);
- len = GetSystemFirmwareTable(RSMB, 0, smbios_table, expected_len);
+ len = pGetSystemFirmwareTable(RSMB, 0, smbios_table, expected_len);
ok(len == expected_len, "Expected length %u, got %u\n", expected_len, len);
ok(len == 0 || !memcmp(smbios_table, sfti->TableBuffer, 6),
"Expected prologue %02x %02x %02x %02x %02x %02x, got %02x %02x %02x %02x %02x %02x\n",
--
2.7.4
2
2
13 Jul '18
This avoids entering the loop and flood the result file until we reach the 120 s test timeout
I saw that twice and got 7.5MB big result files
tested:
https://testbot.winehq.org/JobDetails.pl?Key=39844
The WININET_E_INVALID_CA failure on the win2003 testbot is unrelated:
https://test.winehq.org/data/acb879c9d2feae69e8b5b1ede28523a29aef1b89/2003_…
Signed-off-by: Detlef Riekenberg <wine.dev(a)web.de>
---
dlls/winhttp/tests/winhttp.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/dlls/winhttp/tests/winhttp.c b/dlls/winhttp/tests/winhttp.c
index 46504e1b0c..c9e053fbea 100644
--- a/dlls/winhttp/tests/winhttp.c
+++ b/dlls/winhttp/tests/winhttp.c
@@ -4417,9 +4417,11 @@ static void test_chunked_read(void)
goto done;
}
ok( ret, "WinHttpSendRequest failed with error %u\n", GetLastError() );
+ if (!ret) goto done;
ret = WinHttpReceiveResponse( req, NULL );
ok( ret, "WinHttpReceiveResponse failed with error %u\n", GetLastError() );
+ if (!ret) goto done;
header[0] = 0;
len = sizeof(header);
--
2.14.1
2
1
[PATCH] kernel32: Implement K32EnumDeviceDrivers and K32GetDeviceDriverBaseNameA (pt. 2)
by Anthony Lauzon 12 Jul '18
by Anthony Lauzon 12 Jul '18
12 Jul '18
I noticed my submission yesterday was a little undercooked and since I have
spent some more time on it, I thought I'd try to submit a (hopefully)
proper patch to the list. This is a rough implementation of
K32EnumDeviceDrivers and K32GetDeviceDriverBaseNameA.
2
2
[PATCH] msxml3: Add missing const keyword to cache_copy and cache_free (GCC)
by Alex Henrie 12 Jul '18
by Alex Henrie 12 Jul '18
12 Jul '18
Signed-off-by: Alex Henrie <alexhenrie24(a)gmail.com>
---
This resolves several warnings when compiling with GCC 8.1.
---
dlls/msxml3/schema.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/msxml3/schema.c b/dlls/msxml3/schema.c
index 8087985204..faf9cd0aa2 100644
--- a/dlls/msxml3/schema.c
+++ b/dlls/msxml3/schema.c
@@ -980,7 +980,7 @@ static cache_entry* cache_entry_from_url(VARIANT url, xmlChar const* nsURI, MSXM
return entry;
}
-static void cache_free(void* data, xmlChar* name /* ignored */)
+static void cache_free(void* data, const xmlChar* name /* ignored */)
{
cache_entry_release((cache_entry*)data);
}
@@ -1397,7 +1397,7 @@ static HRESULT WINAPI schema_cache_get_namespaceURI(IXMLDOMSchemaCollection2* if
return S_OK;
}
-static void cache_copy(void* data, void* dest, xmlChar* name)
+static void cache_copy(void* data, void* dest, const xmlChar* name)
{
schema_cache* This = (schema_cache*) dest;
cache_entry* entry = (cache_entry*) data;
--
2.18.0
3
3
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
dlls/dbghelp/cpu_i386.c | 4 ++--
dlls/dbghelp/dbghelp.c | 5 ++---
dlls/dbghelp/elf_module.c | 14 ++++++--------
dlls/dbghelp/macho_module.c | 2 +-
dlls/dbghelp/minidump.c | 4 ++--
dlls/dbghelp/module.c | 16 +++++++---------
dlls/dbghelp/msc.c | 2 +-
dlls/dbghelp/stabs.c | 6 +++---
dlls/dbghelp/symbol.c | 2 +-
9 files changed, 25 insertions(+), 30 deletions(-)
diff --git a/dlls/dbghelp/cpu_i386.c b/dlls/dbghelp/cpu_i386.c
index 37b2e2586e..9e207bb0d1 100644
--- a/dlls/dbghelp/cpu_i386.c
+++ b/dlls/dbghelp/cpu_i386.c
@@ -449,7 +449,7 @@ static BOOL i386_stack_walk(struct cpu_stack_walk* csw, LPSTACKFRAME64 frame, CO
* work if the parameter is in fact bigger than 16bit, but
* there's no way to know that here
*/
- for (i = 0; i < sizeof(frame->Params) / sizeof(frame->Params[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(frame->Params); i++)
{
sw_read_mem(csw, p + (2 + i) * sizeof(WORD), &val16, sizeof(val16));
frame->Params[i] = val16;
@@ -482,7 +482,7 @@ static BOOL i386_stack_walk(struct cpu_stack_walk* csw, LPSTACKFRAME64 frame, CO
frame->AddrReturn.Mode = AddrModeFlat;
frame->AddrReturn.Offset = newctx.Eip;
#endif
- for (i = 0; i < sizeof(frame->Params) / sizeof(frame->Params[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(frame->Params); i++)
{
sw_read_mem(csw, frame->AddrFrame.Offset + (2 + i) * sizeof(DWORD), &val32, sizeof(val32));
frame->Params[i] = val32;
diff --git a/dlls/dbghelp/dbghelp.c b/dlls/dbghelp/dbghelp.c
index 0bb591babe..5685c25cd0 100644
--- a/dlls/dbghelp/dbghelp.c
+++ b/dlls/dbghelp/dbghelp.c
@@ -245,9 +245,8 @@ static BOOL WINAPI process_invade_cb(PCWSTR name, ULONG64 base, ULONG size, PVOI
WCHAR tmp[MAX_PATH];
HANDLE hProcess = user;
- if (!GetModuleFileNameExW(hProcess, (HMODULE)(DWORD_PTR)base,
- tmp, sizeof(tmp) / sizeof(WCHAR)))
- lstrcpynW(tmp, name, sizeof(tmp) / sizeof(WCHAR));
+ if (!GetModuleFileNameExW(hProcess, (HMODULE)(DWORD_PTR)base, tmp, ARRAY_SIZE(tmp)))
+ lstrcpynW(tmp, name, ARRAY_SIZE(tmp));
SymLoadModuleExW(hProcess, 0, tmp, name, base, size, NULL, 0);
return TRUE;
diff --git a/dlls/dbghelp/elf_module.c b/dlls/dbghelp/elf_module.c
index 32ce3455db..6b8d47a1e4 100644
--- a/dlls/dbghelp/elf_module.c
+++ b/dlls/dbghelp/elf_module.c
@@ -974,7 +974,7 @@ static BOOL elf_locate_debug_link(struct image_file_map* fmap, const char* filen
{
static const WCHAR globalDebugDirW[] = {'/','u','s','r','/','l','i','b','/','d','e','b','u','g','/'};
static const WCHAR dotDebugW[] = {'.','d','e','b','u','g','/'};
- const size_t globalDebugDirLen = sizeof(globalDebugDirW) / sizeof(WCHAR);
+ const size_t globalDebugDirLen = ARRAY_SIZE(globalDebugDirW);
size_t filename_len;
WCHAR* p = NULL;
WCHAR* slash;
@@ -999,7 +999,7 @@ static BOOL elf_locate_debug_link(struct image_file_map* fmap, const char* filen
/* testing execdir/.debug/filename */
memcpy(slash, dotDebugW, sizeof(dotDebugW));
- MultiByteToWideChar(CP_UNIXCP, 0, filename, -1, slash + sizeof(dotDebugW) / sizeof(WCHAR), filename_len);
+ MultiByteToWideChar(CP_UNIXCP, 0, filename, -1, slash + ARRAY_SIZE(dotDebugW), filename_len);
if (elf_check_debug_link(p, fmap_link, crc)) goto found;
/* testing globaldebugdir/execdir/filename */
@@ -1049,9 +1049,9 @@ static BOOL elf_locate_build_id_target(struct image_file_map* fmap, const BYTE*
(idlen * 2 + 1) * sizeof(WCHAR) + sizeof(dotDebug0W));
z = p;
memcpy(z, globalDebugDirW, sizeof(globalDebugDirW));
- z += sizeof(globalDebugDirW) / sizeof(WCHAR);
+ z += ARRAY_SIZE(globalDebugDirW);
memcpy(z, buildidW, sizeof(buildidW));
- z += sizeof(buildidW) / sizeof(WCHAR);
+ z += ARRAY_SIZE(buildidW);
if (id < idend)
{
@@ -1694,8 +1694,7 @@ static BOOL elf_enum_modules_internal(const struct process* pcs,
ReadProcessMemory(pcs->handle, lm.l_name, bufstr, sizeof(bufstr), NULL))
{
bufstr[sizeof(bufstr) - 1] = '\0';
- MultiByteToWideChar(CP_UNIXCP, 0, bufstr, -1, bufstrW,
- sizeof(bufstrW) / sizeof(WCHAR));
+ MultiByteToWideChar(CP_UNIXCP, 0, bufstr, -1, bufstrW, ARRAY_SIZE(bufstrW));
if (main_name && !bufstrW[0]) strcpyW(bufstrW, main_name);
if (!cb(bufstrW, (unsigned long)lm.l_addr, (unsigned long)lm.l_ld, FALSE, user))
break;
@@ -1729,8 +1728,7 @@ static BOOL elf_enum_modules_internal(const struct process* pcs,
bufstr, sizeof(bufstr), NULL))
{
bufstr[sizeof(bufstr) - 1] = '\0';
- MultiByteToWideChar(CP_UNIXCP, 0, bufstr, -1, bufstrW,
- sizeof(bufstrW) / sizeof(WCHAR));
+ MultiByteToWideChar(CP_UNIXCP, 0, bufstr, -1, bufstrW, ARRAY_SIZE(bufstrW));
if (main_name && !bufstrW[0]) strcpyW(bufstrW, main_name);
if (!cb(bufstrW, (unsigned long)lm.l_addr, (unsigned long)lm.l_ld, FALSE, user))
break;
diff --git a/dlls/dbghelp/macho_module.c b/dlls/dbghelp/macho_module.c
index 52c8e69108..9401dfb0c7 100644
--- a/dlls/dbghelp/macho_module.c
+++ b/dlls/dbghelp/macho_module.c
@@ -1672,7 +1672,7 @@ static BOOL macho_enum_modules_internal(const struct process* pcs,
{
bufstr[sizeof(bufstr) - 1] = '\0';
TRACE("[%d] image file %s\n", i, debugstr_a(bufstr));
- MultiByteToWideChar(CP_UNIXCP, 0, bufstr, -1, bufstrW, sizeof(bufstrW) / sizeof(WCHAR));
+ MultiByteToWideChar(CP_UNIXCP, 0, bufstr, -1, bufstrW, ARRAY_SIZE(bufstrW));
if (main_name && !bufstrW[0]) strcpyW(bufstrW, main_name);
if (!cb(bufstrW, (unsigned long)info_array[i].imageLoadAddress, user)) break;
}
diff --git a/dlls/dbghelp/minidump.c b/dlls/dbghelp/minidump.c
index 4dead52b92..1a5dca9de6 100644
--- a/dlls/dbghelp/minidump.c
+++ b/dlls/dbghelp/minidump.c
@@ -215,9 +215,9 @@ static BOOL add_module(struct dump_context* dc, const WCHAR* name,
if (is_elf ||
!GetModuleFileNameExW(dc->hProcess, (HMODULE)(DWORD_PTR)base,
dc->modules[dc->num_modules].name,
- sizeof(dc->modules[dc->num_modules].name) / sizeof(WCHAR)))
+ ARRAY_SIZE(dc->modules[dc->num_modules].name)))
lstrcpynW(dc->modules[dc->num_modules].name, name,
- sizeof(dc->modules[dc->num_modules].name) / sizeof(WCHAR));
+ ARRAY_SIZE(dc->modules[dc->num_modules].name));
dc->modules[dc->num_modules].base = base;
dc->modules[dc->num_modules].size = size;
dc->modules[dc->num_modules].timestamp = timestamp;
diff --git a/dlls/dbghelp/module.c b/dlls/dbghelp/module.c
index 040bf9b8ed..98fc10c029 100644
--- a/dlls/dbghelp/module.c
+++ b/dlls/dbghelp/module.c
@@ -134,9 +134,8 @@ static void module_fill_module(const WCHAR* in, WCHAR* out, size_t size)
void module_set_module(struct module* module, const WCHAR* name)
{
- module_fill_module(name, module->module.ModuleName,
- sizeof(module->module.ModuleName) / sizeof(module->module.ModuleName[0]));
- module_fill_module(name, module->modulename, sizeof(module->modulename) / sizeof(module->modulename[0]));
+ module_fill_module(name, module->module.ModuleName, ARRAY_SIZE(module->module.ModuleName));
+ module_fill_module(name, module->modulename, ARRAY_SIZE(module->modulename));
}
/* Returned string must be freed by caller */
@@ -215,7 +214,7 @@ struct module* module_new(struct process* pcs, const WCHAR* name,
module->module.ImageSize = size;
module_set_module(module, name);
module->module.ImageName[0] = '\0';
- lstrcpynW(module->module.LoadedImageName, name, sizeof(module->module.LoadedImageName) / sizeof(WCHAR));
+ lstrcpynW(module->module.LoadedImageName, name, ARRAY_SIZE(module->module.LoadedImageName));
module->module.SymType = SymNone;
module->module.NumSyms = 0;
module->module.TimeDateStamp = stamp;
@@ -281,7 +280,7 @@ struct module* module_find_by_nameA(const struct process* pcs, const char* name)
{
WCHAR wname[MAX_PATH];
- MultiByteToWideChar(CP_ACP, 0, name, -1, wname, sizeof(wname) / sizeof(WCHAR));
+ MultiByteToWideChar(CP_ACP, 0, name, -1, wname, ARRAY_SIZE(wname));
return module_find_by_nameW(pcs, wname);
}
@@ -671,8 +670,7 @@ DWORD64 WINAPI SymLoadModuleExW(HANDLE hProcess, HANDLE hFile, PCWSTR wImageNam
if (wModuleName)
module_set_module(module, wModuleName);
if (wImageName)
- lstrcpynW(module->module.ImageName, wImageName,
- sizeof(module->module.ImageName) / sizeof(WCHAR));
+ lstrcpynW(module->module.ImageName, wImageName, ARRAY_SIZE(module->module.ImageName));
return module->module.BaseOfImage;
}
@@ -935,9 +933,9 @@ BOOL WINAPI EnumerateLoadedModulesW64(HANDLE hProcess,
for (i = 0; i < sz; i++)
{
if (!GetModuleInformation(hProcess, hMods[i], &mi, sizeof(mi)) ||
- !GetModuleBaseNameW(hProcess, hMods[i], baseW, sizeof(baseW) / sizeof(WCHAR)))
+ !GetModuleBaseNameW(hProcess, hMods[i], baseW, ARRAY_SIZE(baseW)))
continue;
- module_fill_module(baseW, modW, sizeof(modW) / sizeof(modW[0]));
+ module_fill_module(baseW, modW, ARRAY_SIZE(modW));
EnumLoadedModulesCallback(modW, (DWORD_PTR)mi.lpBaseOfDll, mi.SizeOfImage,
UserContext);
}
diff --git a/dlls/dbghelp/msc.c b/dlls/dbghelp/msc.c
index eba26498cb..cc1259df18 100644
--- a/dlls/dbghelp/msc.c
+++ b/dlls/dbghelp/msc.c
@@ -2893,7 +2893,7 @@ static BOOL pdb_process_file(const struct process* pcs,
msc_dbg->module->module.PdbAge = pdb_info->pdb_files[0].age;
MultiByteToWideChar(CP_ACP, 0, pdb_lookup->filename, -1,
msc_dbg->module->module.LoadedPdbName,
- sizeof(msc_dbg->module->module.LoadedPdbName) / sizeof(WCHAR));
+ ARRAY_SIZE(msc_dbg->module->module.LoadedPdbName));
/* FIXME: we could have a finer grain here */
msc_dbg->module->module.LineNumbers = TRUE;
msc_dbg->module->module.GlobalSymbols = TRUE;
diff --git a/dlls/dbghelp/stabs.c b/dlls/dbghelp/stabs.c
index 846a935a4b..bc5ef356e8 100644
--- a/dlls/dbghelp/stabs.c
+++ b/dlls/dbghelp/stabs.c
@@ -337,7 +337,7 @@ struct ParseTypedefData
#ifdef PTS_DEBUG
static void stabs_pts_push(struct ParseTypedefData* ptd, unsigned line)
{
- assert(ptd->err_idx < sizeof(ptd->errors) / sizeof(ptd->errors[0]));
+ assert(ptd->err_idx < ARRAY_SIZE(ptd->errors));
ptd->errors[ptd->err_idx].line = line;
ptd->errors[ptd->err_idx].ptr = ptd->ptr;
ptd->err_idx++;
@@ -349,7 +349,7 @@ static void stabs_pts_push(struct ParseTypedefData* ptd, unsigned line)
static int stabs_get_basic(struct ParseTypedefData* ptd, unsigned basic, struct symt** symt)
{
- PTS_ABORTIF(ptd, basic >= sizeof(stabs_basic) / sizeof(stabs_basic[0]));
+ PTS_ABORTIF(ptd, basic >= ARRAY_SIZE(stabs_basic));
if (!stabs_basic[basic])
{
@@ -1617,7 +1617,7 @@ BOOL stabs_parse(struct module* module, unsigned long load_offset,
break;
case N_BINCL:
stabs_add_include(stabs_new_include(ptr, n_value));
- assert(incl_stk < (int)(sizeof(incl) / sizeof(incl[0])) - 1);
+ assert(incl_stk < (int) ARRAY_SIZE(incl) - 1);
incl[++incl_stk] = source_idx;
source_idx = source_new(module, NULL, ptr);
break;
diff --git a/dlls/dbghelp/symbol.c b/dlls/dbghelp/symbol.c
index 08ea834b57..de871ecdcd 100644
--- a/dlls/dbghelp/symbol.c
+++ b/dlls/dbghelp/symbol.c
@@ -2077,7 +2077,7 @@ BOOL WINAPI SymAddSymbol(HANDLE hProcess, ULONG64 BaseOfDll, PCSTR name,
{
WCHAR nameW[MAX_SYM_NAME];
- MultiByteToWideChar(CP_ACP, 0, name, -1, nameW, sizeof(nameW) / sizeof(WCHAR));
+ MultiByteToWideChar(CP_ACP, 0, name, -1, nameW, ARRAY_SIZE(nameW));
return SymAddSymbolW(hProcess, BaseOfDll, nameW, addr, size, flags);
}
--
2.14.4
1
0