Instead of leaking "kernel" pointers.
-- v2: winevulkan: Separate PE and Unix VkCommandBuffer structs. winevulkan: Wrap VkCommandPool on PE side. winevulkan: Separate PE and Unix VkPhysicalDevice strucrts. winevulkan: Separate PE and Unix VkInstance structs. winevulkan: Separate PE and Unix VkQueue structs. winevulkan: Separate PE and Unix VkDevice structs.
From: Jacek Caban jacek@codeweavers.com
--- dlls/winevulkan/loader.c | 42 ++- dlls/winevulkan/loader_thunks.c | 18 -- dlls/winevulkan/loader_thunks.h | 1 + dlls/winevulkan/make_vulkan | 40 +-- dlls/winevulkan/vulkan.c | 54 ++-- dlls/winevulkan/vulkan_loader.h | 6 +- dlls/winevulkan/vulkan_private.h | 14 +- dlls/winevulkan/vulkan_thunks.c | 532 +++++++++++++++---------------- 8 files changed, 370 insertions(+), 337 deletions(-)
diff --git a/dlls/winevulkan/loader.c b/dlls/winevulkan/loader.c index 61e4eaf112d..9fdd0c3f1d0 100644 --- a/dlls/winevulkan/loader.c +++ b/dlls/winevulkan/loader.c @@ -100,6 +100,13 @@ static BOOL is_available_device_function(VkDevice device, const char *name) return vk_unix_call(unix_is_available_device_function, ¶ms); }
+static void *alloc_vk_object(size_t size) +{ + struct wine_vk_base *object = calloc(1, size); + object->loader_magic = VULKAN_ICD_MAGIC_VALUE; + return object; +} + PFN_vkVoidFunction WINAPI vkGetInstanceProcAddr(VkInstance instance, const char *name) { void *func; @@ -172,8 +179,8 @@ PFN_vkVoidFunction WINAPI vkGetDeviceProcAddr(VkDevice device, const char *name) * https://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers/issues/2323 * https://github.com/KhronosGroup/Vulkan-Docs/issues/655 */ - if (((struct wine_vk_device_base *)device)->quirks & WINEVULKAN_QUIRK_GET_DEVICE_PROC_ADDR - && ((func = wine_vk_get_instance_proc_addr(name)) + if ((device->quirks & WINEVULKAN_QUIRK_GET_DEVICE_PROC_ADDR) + && ((func = wine_vk_get_instance_proc_addr(name)) || (func = wine_vk_get_phys_dev_proc_addr(name)))) { WARN("Returning instance function %s.\n", debugstr_a(name)); @@ -417,6 +424,37 @@ void WINAPI vkGetPhysicalDeviceProperties2KHR(VkPhysicalDevice phys_dev, fill_luid_property(properties2); }
+VkResult WINAPI vkCreateDevice(VkPhysicalDevice phys_dev, const VkDeviceCreateInfo *create_info, + const VkAllocationCallbacks *allocator, VkDevice *ret) +{ + struct vkCreateDevice_params params; + VkDevice device; + VkResult result; + + if (!(device = alloc_vk_object(sizeof(*device)))) + return VK_ERROR_OUT_OF_HOST_MEMORY; + + params.physicalDevice = phys_dev; + params.pCreateInfo = create_info; + params.pAllocator = allocator; + params.pDevice = ret; + params.client_ptr = device; + result = vk_unix_call(unix_vkCreateDevice, ¶ms); + if (!device->base.unix_handle) + free(device); + return result; +} + +void WINAPI vkDestroyDevice(VkDevice device, const VkAllocationCallbacks *allocator) +{ + struct vkDestroyDevice_params params; + + params.device = device; + params.pAllocator = allocator; + vk_unix_call(unix_vkDestroyDevice, ¶ms); + free(device); +} + static BOOL WINAPI call_vulkan_debug_report_callback( struct wine_vk_debug_report_params *params, ULONG size ) { return params->user_callback(params->flags, params->object_type, params->object_handle, params->location, diff --git a/dlls/winevulkan/loader_thunks.c b/dlls/winevulkan/loader_thunks.c index c205d4890c0..db4d39bc7fd 100644 --- a/dlls/winevulkan/loader_thunks.c +++ b/dlls/winevulkan/loader_thunks.c @@ -2110,16 +2110,6 @@ VkResult WINAPI vkCreateDescriptorUpdateTemplateKHR(VkDevice device, const VkDes return vk_unix_call(unix_vkCreateDescriptorUpdateTemplateKHR, ¶ms); }
-VkResult WINAPI vkCreateDevice(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkDevice *pDevice) -{ - struct vkCreateDevice_params params; - params.physicalDevice = physicalDevice; - params.pCreateInfo = pCreateInfo; - params.pAllocator = pAllocator; - params.pDevice = pDevice; - return vk_unix_call(unix_vkCreateDevice, ¶ms); -} - VkResult WINAPI vkCreateEvent(VkDevice device, const VkEventCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkEvent *pEvent) { struct vkCreateEvent_params params; @@ -2541,14 +2531,6 @@ void WINAPI vkDestroyDescriptorUpdateTemplateKHR(VkDevice device, VkDescriptorUp vk_unix_call(unix_vkDestroyDescriptorUpdateTemplateKHR, ¶ms); }
-void WINAPI vkDestroyDevice(VkDevice device, const VkAllocationCallbacks *pAllocator) -{ - struct vkDestroyDevice_params params; - params.device = device; - params.pAllocator = pAllocator; - vk_unix_call(unix_vkDestroyDevice, ¶ms); -} - void WINAPI vkDestroyEvent(VkDevice device, VkEvent event, const VkAllocationCallbacks *pAllocator) { struct vkDestroyEvent_params params; diff --git a/dlls/winevulkan/loader_thunks.h b/dlls/winevulkan/loader_thunks.h index 8718a2fea31..814f5781fbe 100644 --- a/dlls/winevulkan/loader_thunks.h +++ b/dlls/winevulkan/loader_thunks.h @@ -2155,6 +2155,7 @@ struct vkCreateDevice_params const VkDeviceCreateInfo *pCreateInfo; const VkAllocationCallbacks *pAllocator; VkDevice *pDevice; + void *client_ptr; };
struct vkCreateEvent_params diff --git a/dlls/winevulkan/make_vulkan b/dlls/winevulkan/make_vulkan index a42bf0a6908..2b56fcd0da9 100755 --- a/dlls/winevulkan/make_vulkan +++ b/dlls/winevulkan/make_vulkan @@ -186,7 +186,7 @@ FUNCTION_OVERRIDES = { "vkGetInstanceProcAddr": {"dispatch" : False, "driver" : True, "thunk" : ThunkType.NONE, "loader_thunk" : ThunkType.NONE},
# Instance functions - "vkCreateDevice" : {"dispatch" : True, "driver" : False, "thunk" : ThunkType.NONE}, + "vkCreateDevice" : {"dispatch" : True, "driver" : False, "thunk" : ThunkType.NONE, "loader_thunk" : ThunkType.PRIVATE, "extra_param" : "client_ptr"}, "vkDestroyInstance" : {"dispatch" : False, "driver" : True, "thunk" : ThunkType.NONE }, "vkEnumerateDeviceExtensionProperties" : {"dispatch" : True, "driver" : False, "thunk" : ThunkType.NONE}, "vkEnumerateDeviceLayerProperties": {"dispatch": True, "driver": False, "thunk": ThunkType.NONE}, @@ -205,7 +205,7 @@ FUNCTION_OVERRIDES = { "vkCreateComputePipelines" : {"dispatch": True, "driver" : False, "thunk" : ThunkType.PRIVATE}, "vkCreateGraphicsPipelines" : {"dispatch": True, "driver" : False, "thunk" : ThunkType.PRIVATE}, "vkDestroyCommandPool" : {"dispatch": True, "driver" : False, "thunk" : ThunkType.NONE}, - "vkDestroyDevice" : {"dispatch" : True, "driver" : False, "thunk" : ThunkType.NONE}, + "vkDestroyDevice" : {"dispatch" : True, "driver" : False, "thunk" : ThunkType.NONE, "loader_thunk" : ThunkType.PRIVATE}, "vkFreeCommandBuffers" : {"dispatch" : True, "driver" : False, "thunk" : ThunkType.NONE}, "vkGetDeviceProcAddr" : {"dispatch" : False, "driver" : True, "thunk" : ThunkType.NONE, "loader_thunk" : ThunkType.NONE}, "vkGetDeviceQueue" : {"dispatch": True, "driver" : False, "thunk" : ThunkType.NONE}, @@ -553,6 +553,7 @@ class VkFunction(object): self.driver = func_info["driver"] if func_info else False self.thunk_type = func_info["thunk"] if func_info else ThunkType.PUBLIC self.loader_thunk_type = func_info["loader_thunk"] if func_info and "loader_thunk" in func_info else ThunkType.PUBLIC + self.extra_param = func_info["extra_param"] if func_info and "extra_param" in func_info else None
# Required is set while parsing which APIs and types are required # and is used by the code generation. @@ -767,8 +768,8 @@ class VkFunction(object): body += "{0}result = ".format(params_prefix) elif self.type != "void": body += "return " - body += "{0}{1}.p_{2}({3});\n".format(params_prefix, self.params[0].dispatch_table(), - self.name, params) + body += "{0}.p_{1}({2});\n".format(self.params[0].dispatch_table(params_prefix), + self.name, params) if self.type == "void" or self.returns_longlong(): body += " return STATUS_SUCCESS;\n"
@@ -828,12 +829,12 @@ class VkFunction(object):
# Call the native Vulkan function. if self.type == "void": - body += " {0}{1}.p_{2}({3});\n".format(params_prefix, self.params[0].dispatch_table(), - self.name, params) + body += " {0}.p_{1}({2});\n".format(self.params[0].dispatch_table(params_prefix), + self.name, params) else: - body += " {0}result = {1}{2}.p_{3}({4});\n".format(result_prefix, params_prefix, - self.params[0].dispatch_table(), - self.name, params) + body += " {0}result = {1}.p_{2}({3});\n".format(result_prefix, + self.params[0].dispatch_table(params_prefix), + self.name, params)
body += "\n"
@@ -1053,20 +1054,19 @@ class VkHandle(object): parent = handle.attrib.get("parent") # Most objects have a parent e.g. VkQueue has VkDevice. return VkHandle(name, _type, parent)
- def dispatch_table(self): + def dispatch_table(self, param): if not self.is_dispatchable(): return None
if self.parent is None: # Should only happen for VkInstance - return "funcs" + return "{0}->funcs".format(param) elif self.name == "VkDevice": - # VkDevice has VkInstance as a parent, but has its own dispatch table. - return "funcs" + return "wine_device_from_handle({0})->funcs".format(param) elif self.parent in ["VkInstance", "VkPhysicalDevice"]: - return "instance->funcs" + return "{0}->instance->funcs".format(param) elif self.parent in ["VkDevice", "VkCommandPool"]: - return "device->funcs" + return "{0}->device->funcs".format(param) else: LOGGER.error("Unhandled dispatchable parent: {0}".format(self.parent))
@@ -1100,6 +1100,8 @@ class VkHandle(object): return "wine_debug_utils_messenger_from_handle({0})->debug_messenger".format(name) if self.name == "VkDebugReportCallbackEXT": return "wine_debug_report_callback_from_handle({0})->debug_callback".format(name) + if self.name == "VkDevice": + return "wine_device_from_handle({0})->device".format(name) if self.name == "VkSurfaceKHR": return "wine_surface_from_handle({0})->surface".format(name)
@@ -1107,8 +1109,6 @@ class VkHandle(object):
if self.name == "VkCommandBuffer": native_handle_name = "command_buffer" - if self.name == "VkDevice": - native_handle_name = "device" if self.name == "VkInstance": native_handle_name = "instance" if self.name == "VkPhysicalDevice": @@ -1701,13 +1701,13 @@ class VkParam(object):
return self._direction
- def dispatch_table(self): + def dispatch_table(self, params_prefix=""): """ Return functions dispatch table pointer for dispatchable objects. """
if not self.is_dispatchable(): return None
- return "{0}->{1}".format(self.name, self.handle.dispatch_table()) + return self.handle.dispatch_table(params_prefix + self.name)
def format_string(self): return self.format_str @@ -3076,6 +3076,8 @@ class VkGenerator(object): f.write("{\n"); for p in vk_func.params: f.write(" {0};\n".format(p.definition(is_member=True))) + if vk_func.extra_param: + f.write(" void *{0};\n".format(vk_func.extra_param)) if vk_func.returns_longlong(): f.write(" {0} result;\n".format(vk_func.type)) f.write("};\n\n"); diff --git a/dlls/winevulkan/vulkan.c b/dlls/winevulkan/vulkan.c index 7f9026268bf..ce26cdcc69f 100644 --- a/dlls/winevulkan/vulkan.c +++ b/dlls/winevulkan/vulkan.c @@ -23,7 +23,6 @@
#include "config.h" #include <time.h> -#include <stdlib.h>
#include "vulkan_private.h" #include "wine/vulkan_driver.h" @@ -62,8 +61,8 @@ static uint32_t wine_vk_count_struct_(void *s, VkStructureType t)
static const struct vulkan_funcs *vk_funcs;
-#define WINE_VK_ADD_DISPATCHABLE_MAPPING(instance, object, native_handle) \ - wine_vk_add_handle_mapping((instance), (uint64_t) (uintptr_t) (object), (uint64_t) (uintptr_t) (native_handle), &(object)->mapping) +#define WINE_VK_ADD_DISPATCHABLE_MAPPING(instance, client_handle, native_handle, object) \ + wine_vk_add_handle_mapping((instance), (uintptr_t)(client_handle), (uintptr_t)(native_handle), &(object)->mapping) #define WINE_VK_ADD_NON_DISPATCHABLE_MAPPING(instance, object, native_handle) \ wine_vk_add_handle_mapping((instance), (uint64_t) (uintptr_t) (object), (uint64_t) (native_handle), &(object)->mapping) static void wine_vk_add_handle_mapping(struct VkInstance_T *instance, uint64_t wrapped_handle, @@ -238,7 +237,7 @@ static struct VkPhysicalDevice_T *wine_vk_physical_device_alloc(struct VkInstanc object->instance = instance; object->phys_dev = phys_dev;
- WINE_VK_ADD_DISPATCHABLE_MAPPING(instance, object, phys_dev); + WINE_VK_ADD_DISPATCHABLE_MAPPING(instance, object, phys_dev, object);
res = instance->funcs.p_vkEnumerateDeviceExtensionProperties(phys_dev, NULL, &num_host_properties, NULL); @@ -306,7 +305,7 @@ err: return NULL; }
-static void wine_vk_free_command_buffers(struct VkDevice_T *device, +static void wine_vk_free_command_buffers(struct wine_device *device, struct wine_cmd_pool *pool, uint32_t count, const VkCommandBuffer *buffers) { unsigned int i; @@ -323,7 +322,7 @@ static void wine_vk_free_command_buffers(struct VkDevice_T *device, } }
-static void wine_vk_device_get_queues(struct VkDevice_T *device, +static void wine_vk_device_get_queues(struct wine_device *device, uint32_t family_index, uint32_t queue_count, VkDeviceQueueCreateFlags flags, struct VkQueue_T* queues) { @@ -359,7 +358,7 @@ static void wine_vk_device_get_queues(struct VkDevice_T *device, device->funcs.p_vkGetDeviceQueue(device->device, family_index, i, &queue->queue); }
- WINE_VK_ADD_DISPATCHABLE_MAPPING(device->phys_dev->instance, queue, queue->queue); + WINE_VK_ADD_DISPATCHABLE_MAPPING(device->phys_dev->instance, queue, queue->queue, queue); } }
@@ -405,7 +404,7 @@ static VkResult wine_vk_device_convert_create_info(const VkDeviceCreateInfo *src /* Helper function used for freeing a device structure. This function supports full * and partial object cleanups and can thus be used for vkCreateDevice failures. */ -static void wine_vk_device_free(struct VkDevice_T *device) +static void wine_vk_device_free(struct wine_device *device) { struct VkQueue_T *queue;
@@ -637,7 +636,7 @@ static void wine_vk_instance_free(struct VkInstance_T *instance) NTSTATUS wine_vkAllocateCommandBuffers(void *args) { struct vkAllocateCommandBuffers_params *params = args; - VkDevice device = params->device; + struct wine_device *device = wine_device_from_handle(params->device); const VkCommandBufferAllocateInfo *allocate_info = params->pAllocateInfo; VkCommandBuffer *buffers = params->pCommandBuffers; struct wine_cmd_pool *pool; @@ -675,7 +674,8 @@ NTSTATUS wine_vkAllocateCommandBuffers(void *args) list_add_tail(&pool->command_buffers, &buffers[i]->pool_link); res = device->funcs.p_vkAllocateCommandBuffers(device->device, &allocate_info_host, &buffers[i]->command_buffer); - WINE_VK_ADD_DISPATCHABLE_MAPPING(device->phys_dev->instance, buffers[i], buffers[i]->command_buffer); + WINE_VK_ADD_DISPATCHABLE_MAPPING(device->phys_dev->instance, buffers[i], + buffers[i]->command_buffer, buffers[i]); if (res != VK_SUCCESS) { ERR("Failed to allocate command buffer, res=%d.\n", res); @@ -699,14 +699,15 @@ NTSTATUS wine_vkCreateDevice(void *args) VkPhysicalDevice phys_dev = params->physicalDevice; const VkDeviceCreateInfo *create_info = params->pCreateInfo; const VkAllocationCallbacks *allocator = params->pAllocator; - VkDevice *device = params->pDevice; + VkDevice *ret_device = params->pDevice; + VkDevice device_handle = params->client_ptr; VkDeviceCreateInfo create_info_host; struct VkQueue_T *next_queue; - struct VkDevice_T *object; + struct wine_device *object; unsigned int i; VkResult res;
- TRACE("%p, %p, %p, %p\n", phys_dev, create_info, allocator, device); + TRACE("%p, %p, %p, %p\n", phys_dev, create_info, allocator, ret_device);
if (allocator) FIXME("Support for allocation callbacks not implemented yet\n"); @@ -725,7 +726,6 @@ NTSTATUS wine_vkCreateDevice(void *args) if (!(object = calloc(1, sizeof(*object)))) return VK_ERROR_OUT_OF_HOST_MEMORY;
- object->base.base.loader_magic = VULKAN_ICD_MAGIC_VALUE; object->phys_dev = phys_dev;
res = wine_vk_device_convert_create_info(create_info, &create_info_host); @@ -735,7 +735,7 @@ NTSTATUS wine_vkCreateDevice(void *args) res = phys_dev->instance->funcs.p_vkCreateDevice(phys_dev->phys_dev, &create_info_host, NULL /* allocator */, &object->device); wine_vk_device_free_create_info(&create_info_host); - WINE_VK_ADD_DISPATCHABLE_MAPPING(phys_dev->instance, object, object->device); + WINE_VK_ADD_DISPATCHABLE_MAPPING(phys_dev->instance, device_handle, object->device, object); if (res != VK_SUCCESS) { WARN("Failed to create device, res=%d.\n", res); @@ -780,9 +780,9 @@ NTSTATUS wine_vkCreateDevice(void *args) next_queue += queue_count; }
- object->base.quirks = phys_dev->instance->quirks; - - *device = object; + device_handle->quirks = phys_dev->instance->quirks; + device_handle->base.unix_handle = (uintptr_t)object; + *ret_device = device_handle; TRACE("Created device %p (native device %p).\n", object, object->device); return VK_SUCCESS;
@@ -830,7 +830,7 @@ NTSTATUS wine_vkCreateInstance(void *args) return res; }
- WINE_VK_ADD_DISPATCHABLE_MAPPING(object, object, object->instance); + WINE_VK_ADD_DISPATCHABLE_MAPPING(object, object, object->instance, object);
/* Load all instance functions we are aware of. Note the loader takes care * of any filtering for extensions which were not requested, but which the @@ -876,7 +876,7 @@ NTSTATUS wine_vkCreateInstance(void *args) NTSTATUS wine_vkDestroyDevice(void *args) { struct vkDestroyDevice_params *params = args; - VkDevice device = params->device; + struct wine_device *device = wine_device_from_handle(params->device); const VkAllocationCallbacks *allocator = params->pAllocator;
TRACE("%p %p\n", device, allocator); @@ -1058,7 +1058,7 @@ NTSTATUS wine_vkEnumeratePhysicalDevices(void *args) NTSTATUS wine_vkFreeCommandBuffers(void *args) { struct vkFreeCommandBuffers_params *params = args; - VkDevice device = params->device; + struct wine_device *device = wine_device_from_handle(params->device); struct wine_cmd_pool *pool = wine_cmd_pool_from_handle(params->commandPool); uint32_t count = params->commandBufferCount; const VkCommandBuffer *buffers = params->pCommandBuffers; @@ -1069,8 +1069,9 @@ NTSTATUS wine_vkFreeCommandBuffers(void *args) return STATUS_SUCCESS; }
-static VkQueue wine_vk_device_find_queue(VkDevice device, const VkDeviceQueueInfo2 *info) +static VkQueue wine_vk_device_find_queue(VkDevice handle, const VkDeviceQueueInfo2 *info) { + struct wine_device *device = wine_device_from_handle(handle); struct VkQueue_T* queue; uint32_t i;
@@ -1129,7 +1130,7 @@ NTSTATUS wine_vkGetDeviceQueue2(void *args) NTSTATUS wine_vkCreateCommandPool(void *args) { struct vkCreateCommandPool_params *params = args; - VkDevice device = params->device; + struct wine_device *device = wine_device_from_handle(params->device); const VkCommandPoolCreateInfo *info = params->pCreateInfo; const VkAllocationCallbacks *allocator = params->pAllocator; VkCommandPool *command_pool = params->pCommandPool; @@ -1164,7 +1165,7 @@ NTSTATUS wine_vkCreateCommandPool(void *args) NTSTATUS wine_vkDestroyCommandPool(void *args) { struct vkDestroyCommandPool_params *params = args; - VkDevice device = params->device; + struct wine_device *device = wine_device_from_handle(params->device); VkCommandPool handle = params->commandPool; const VkAllocationCallbacks *allocator = params->pAllocator; struct wine_cmd_pool *pool = wine_cmd_pool_from_handle(handle); @@ -1393,7 +1394,7 @@ static inline uint64_t convert_timestamp(VkTimeDomainEXT host_domain, VkTimeDoma NTSTATUS wine_vkGetCalibratedTimestampsEXT(void *args) { struct vkGetCalibratedTimestampsEXT_params *params = args; - VkDevice device = params->device; + struct wine_device *device = wine_device_from_handle(params->device); uint32_t timestamp_count = params->timestampCount; const VkCalibratedTimestampInfoEXT *timestamp_infos = params->pTimestampInfos; uint64_t *timestamps = params->pTimestamps; @@ -1881,5 +1882,6 @@ NTSTATUS vk_is_available_instance_function(void *arg) NTSTATUS vk_is_available_device_function(void *arg) { struct is_available_device_function_params *params = arg; - return !!vk_funcs->p_vkGetDeviceProcAddr(params->device->device, params->name); + struct wine_device *device = wine_device_from_handle(params->device); + return !!vk_funcs->p_vkGetDeviceProcAddr(device->device, params->name); } diff --git a/dlls/winevulkan/vulkan_loader.h b/dlls/winevulkan/vulkan_loader.h index 1bee2cb71c6..5baecf2cd30 100644 --- a/dlls/winevulkan/vulkan_loader.h +++ b/dlls/winevulkan/vulkan_loader.h @@ -23,6 +23,7 @@ #include "ntstatus.h" #define WIN32_NO_STATUS #include <stdarg.h> +#include <stdlib.h> #include "windef.h" #include "winbase.h" #include "winternl.h" @@ -49,10 +50,11 @@ struct wine_vk_base /* Special section in each dispatchable object for use by the ICD loader for * storing dispatch tables. The start contains a magical value '0x01CDC0DE'. */ - UINT_PTR loader_magic; + UINT64 loader_magic; + UINT64 unix_handle; };
-struct wine_vk_device_base +struct VkDevice_T { struct wine_vk_base base; unsigned int quirks; diff --git a/dlls/winevulkan/vulkan_private.h b/dlls/winevulkan/vulkan_private.h index 4460539ae59..c57cd2693bd 100644 --- a/dlls/winevulkan/vulkan_private.h +++ b/dlls/winevulkan/vulkan_private.h @@ -46,18 +46,19 @@ struct wine_vk_mapping struct VkCommandBuffer_T { struct wine_vk_base base; - struct VkDevice_T *device; /* parent */ + struct wine_device *device; /* parent */ VkCommandBuffer command_buffer; /* native command buffer */
struct list pool_link; struct wine_vk_mapping mapping; };
-struct VkDevice_T +struct wine_device { - struct wine_vk_device_base base; struct vulkan_device_funcs funcs; struct VkPhysicalDevice_T *phys_dev; /* parent */ + + VkDevice handle; /* client device */ VkDevice device; /* native device */
struct VkQueue_T* queues; @@ -66,6 +67,11 @@ struct VkDevice_T struct wine_vk_mapping mapping; };
+static inline struct wine_device *wine_device_from_handle(VkDevice handle) +{ + return (struct wine_device *)(uintptr_t)handle->base.unix_handle; +} + struct wine_debug_utils_messenger;
struct wine_debug_report_callback @@ -121,7 +127,7 @@ struct VkPhysicalDevice_T struct VkQueue_T { struct wine_vk_base base; - struct VkDevice_T *device; /* parent */ + struct wine_device *device; /* parent */ VkQueue queue; /* native queue */
uint32_t family_index; diff --git a/dlls/winevulkan/vulkan_thunks.c b/dlls/winevulkan/vulkan_thunks.c index 45e3818e309..638db4f7289 100644 --- a/dlls/winevulkan/vulkan_thunks.c +++ b/dlls/winevulkan/vulkan_thunks.c @@ -5271,12 +5271,12 @@ static NTSTATUS wine_vkAcquireNextImage2KHR(void *args) TRACE("%p, %p, %p\n", params->device, params->pAcquireInfo, params->pImageIndex);
convert_VkAcquireNextImageInfoKHR_win_to_host(params->pAcquireInfo, &pAcquireInfo_host); - result = params->device->funcs.p_vkAcquireNextImage2KHR(params->device->device, &pAcquireInfo_host, params->pImageIndex); + result = wine_device_from_handle(params->device)->funcs.p_vkAcquireNextImage2KHR(wine_device_from_handle(params->device)->device, &pAcquireInfo_host, params->pImageIndex);
return result; #else TRACE("%p, %p, %p\n", params->device, params->pAcquireInfo, params->pImageIndex); - return params->device->funcs.p_vkAcquireNextImage2KHR(params->device->device, params->pAcquireInfo, params->pImageIndex); + return wine_device_from_handle(params->device)->funcs.p_vkAcquireNextImage2KHR(wine_device_from_handle(params->device)->device, params->pAcquireInfo, params->pImageIndex); #endif }
@@ -5284,14 +5284,14 @@ static NTSTATUS wine_vkAcquireNextImageKHR(void *args) { struct vkAcquireNextImageKHR_params *params = args; TRACE("%p, 0x%s, 0x%s, 0x%s, 0x%s, %p\n", params->device, wine_dbgstr_longlong(params->swapchain), wine_dbgstr_longlong(params->timeout), wine_dbgstr_longlong(params->semaphore), wine_dbgstr_longlong(params->fence), params->pImageIndex); - return params->device->funcs.p_vkAcquireNextImageKHR(params->device->device, params->swapchain, params->timeout, params->semaphore, params->fence, params->pImageIndex); + return wine_device_from_handle(params->device)->funcs.p_vkAcquireNextImageKHR(wine_device_from_handle(params->device)->device, params->swapchain, params->timeout, params->semaphore, params->fence, params->pImageIndex); }
static NTSTATUS wine_vkAcquirePerformanceConfigurationINTEL(void *args) { struct vkAcquirePerformanceConfigurationINTEL_params *params = args; TRACE("%p, %p, %p\n", params->device, params->pAcquireInfo, params->pConfiguration); - return params->device->funcs.p_vkAcquirePerformanceConfigurationINTEL(params->device->device, params->pAcquireInfo, params->pConfiguration); + return wine_device_from_handle(params->device)->funcs.p_vkAcquirePerformanceConfigurationINTEL(wine_device_from_handle(params->device)->device, params->pAcquireInfo, params->pConfiguration); }
static NTSTATUS wine_vkAcquireProfilingLockKHR(void *args) @@ -5303,12 +5303,12 @@ static NTSTATUS wine_vkAcquireProfilingLockKHR(void *args) TRACE("%p, %p\n", params->device, params->pInfo);
convert_VkAcquireProfilingLockInfoKHR_win_to_host(params->pInfo, &pInfo_host); - result = params->device->funcs.p_vkAcquireProfilingLockKHR(params->device->device, &pInfo_host); + result = wine_device_from_handle(params->device)->funcs.p_vkAcquireProfilingLockKHR(wine_device_from_handle(params->device)->device, &pInfo_host);
return result; #else TRACE("%p, %p\n", params->device, params->pInfo); - return params->device->funcs.p_vkAcquireProfilingLockKHR(params->device->device, params->pInfo); + return wine_device_from_handle(params->device)->funcs.p_vkAcquireProfilingLockKHR(wine_device_from_handle(params->device)->device, params->pInfo); #endif }
@@ -5321,12 +5321,12 @@ static NTSTATUS wine_vkAllocateDescriptorSets(void *args) TRACE("%p, %p, %p\n", params->device, params->pAllocateInfo, params->pDescriptorSets);
convert_VkDescriptorSetAllocateInfo_win_to_host(params->pAllocateInfo, &pAllocateInfo_host); - result = params->device->funcs.p_vkAllocateDescriptorSets(params->device->device, &pAllocateInfo_host, params->pDescriptorSets); + result = wine_device_from_handle(params->device)->funcs.p_vkAllocateDescriptorSets(wine_device_from_handle(params->device)->device, &pAllocateInfo_host, params->pDescriptorSets);
return result; #else TRACE("%p, %p, %p\n", params->device, params->pAllocateInfo, params->pDescriptorSets); - return params->device->funcs.p_vkAllocateDescriptorSets(params->device->device, params->pAllocateInfo, params->pDescriptorSets); + return wine_device_from_handle(params->device)->funcs.p_vkAllocateDescriptorSets(wine_device_from_handle(params->device)->device, params->pAllocateInfo, params->pDescriptorSets); #endif }
@@ -5339,12 +5339,12 @@ static NTSTATUS wine_vkAllocateMemory(void *args) TRACE("%p, %p, %p, %p\n", params->device, params->pAllocateInfo, params->pAllocator, params->pMemory);
convert_VkMemoryAllocateInfo_win_to_host(params->pAllocateInfo, &pAllocateInfo_host); - result = params->device->funcs.p_vkAllocateMemory(params->device->device, &pAllocateInfo_host, NULL, params->pMemory); + result = wine_device_from_handle(params->device)->funcs.p_vkAllocateMemory(wine_device_from_handle(params->device)->device, &pAllocateInfo_host, NULL, params->pMemory);
return result; #else TRACE("%p, %p, %p, %p\n", params->device, params->pAllocateInfo, params->pAllocator, params->pMemory); - return params->device->funcs.p_vkAllocateMemory(params->device->device, params->pAllocateInfo, NULL, params->pMemory); + return wine_device_from_handle(params->device)->funcs.p_vkAllocateMemory(wine_device_from_handle(params->device)->device, params->pAllocateInfo, NULL, params->pMemory); #endif }
@@ -5376,13 +5376,13 @@ static NTSTATUS wine_vkBindAccelerationStructureMemoryNV(void *args) TRACE("%p, %u, %p\n", params->device, params->bindInfoCount, params->pBindInfos);
pBindInfos_host = convert_VkBindAccelerationStructureMemoryInfoNV_array_win_to_host(params->pBindInfos, params->bindInfoCount); - result = params->device->funcs.p_vkBindAccelerationStructureMemoryNV(params->device->device, params->bindInfoCount, pBindInfos_host); + result = wine_device_from_handle(params->device)->funcs.p_vkBindAccelerationStructureMemoryNV(wine_device_from_handle(params->device)->device, params->bindInfoCount, pBindInfos_host);
free_VkBindAccelerationStructureMemoryInfoNV_array(pBindInfos_host, params->bindInfoCount); return result; #else TRACE("%p, %u, %p\n", params->device, params->bindInfoCount, params->pBindInfos); - return params->device->funcs.p_vkBindAccelerationStructureMemoryNV(params->device->device, params->bindInfoCount, params->pBindInfos); + return wine_device_from_handle(params->device)->funcs.p_vkBindAccelerationStructureMemoryNV(wine_device_from_handle(params->device)->device, params->bindInfoCount, params->pBindInfos); #endif }
@@ -5390,7 +5390,7 @@ static NTSTATUS wine_vkBindBufferMemory(void *args) { struct vkBindBufferMemory_params *params = args; TRACE("%p, 0x%s, 0x%s, 0x%s\n", params->device, wine_dbgstr_longlong(params->buffer), wine_dbgstr_longlong(params->memory), wine_dbgstr_longlong(params->memoryOffset)); - return params->device->funcs.p_vkBindBufferMemory(params->device->device, params->buffer, params->memory, params->memoryOffset); + return wine_device_from_handle(params->device)->funcs.p_vkBindBufferMemory(wine_device_from_handle(params->device)->device, params->buffer, params->memory, params->memoryOffset); }
static NTSTATUS wine_vkBindBufferMemory2(void *args) @@ -5402,13 +5402,13 @@ static NTSTATUS wine_vkBindBufferMemory2(void *args) TRACE("%p, %u, %p\n", params->device, params->bindInfoCount, params->pBindInfos);
pBindInfos_host = convert_VkBindBufferMemoryInfo_array_win_to_host(params->pBindInfos, params->bindInfoCount); - result = params->device->funcs.p_vkBindBufferMemory2(params->device->device, params->bindInfoCount, pBindInfos_host); + result = wine_device_from_handle(params->device)->funcs.p_vkBindBufferMemory2(wine_device_from_handle(params->device)->device, params->bindInfoCount, pBindInfos_host);
free_VkBindBufferMemoryInfo_array(pBindInfos_host, params->bindInfoCount); return result; #else TRACE("%p, %u, %p\n", params->device, params->bindInfoCount, params->pBindInfos); - return params->device->funcs.p_vkBindBufferMemory2(params->device->device, params->bindInfoCount, params->pBindInfos); + return wine_device_from_handle(params->device)->funcs.p_vkBindBufferMemory2(wine_device_from_handle(params->device)->device, params->bindInfoCount, params->pBindInfos); #endif }
@@ -5421,13 +5421,13 @@ static NTSTATUS wine_vkBindBufferMemory2KHR(void *args) TRACE("%p, %u, %p\n", params->device, params->bindInfoCount, params->pBindInfos);
pBindInfos_host = convert_VkBindBufferMemoryInfo_array_win_to_host(params->pBindInfos, params->bindInfoCount); - result = params->device->funcs.p_vkBindBufferMemory2KHR(params->device->device, params->bindInfoCount, pBindInfos_host); + result = wine_device_from_handle(params->device)->funcs.p_vkBindBufferMemory2KHR(wine_device_from_handle(params->device)->device, params->bindInfoCount, pBindInfos_host);
free_VkBindBufferMemoryInfo_array(pBindInfos_host, params->bindInfoCount); return result; #else TRACE("%p, %u, %p\n", params->device, params->bindInfoCount, params->pBindInfos); - return params->device->funcs.p_vkBindBufferMemory2KHR(params->device->device, params->bindInfoCount, params->pBindInfos); + return wine_device_from_handle(params->device)->funcs.p_vkBindBufferMemory2KHR(wine_device_from_handle(params->device)->device, params->bindInfoCount, params->pBindInfos); #endif }
@@ -5435,7 +5435,7 @@ static NTSTATUS wine_vkBindImageMemory(void *args) { struct vkBindImageMemory_params *params = args; TRACE("%p, 0x%s, 0x%s, 0x%s\n", params->device, wine_dbgstr_longlong(params->image), wine_dbgstr_longlong(params->memory), wine_dbgstr_longlong(params->memoryOffset)); - return params->device->funcs.p_vkBindImageMemory(params->device->device, params->image, params->memory, params->memoryOffset); + return wine_device_from_handle(params->device)->funcs.p_vkBindImageMemory(wine_device_from_handle(params->device)->device, params->image, params->memory, params->memoryOffset); }
static NTSTATUS wine_vkBindImageMemory2(void *args) @@ -5447,13 +5447,13 @@ static NTSTATUS wine_vkBindImageMemory2(void *args) TRACE("%p, %u, %p\n", params->device, params->bindInfoCount, params->pBindInfos);
pBindInfos_host = convert_VkBindImageMemoryInfo_array_win_to_host(params->pBindInfos, params->bindInfoCount); - result = params->device->funcs.p_vkBindImageMemory2(params->device->device, params->bindInfoCount, pBindInfos_host); + result = wine_device_from_handle(params->device)->funcs.p_vkBindImageMemory2(wine_device_from_handle(params->device)->device, params->bindInfoCount, pBindInfos_host);
free_VkBindImageMemoryInfo_array(pBindInfos_host, params->bindInfoCount); return result; #else TRACE("%p, %u, %p\n", params->device, params->bindInfoCount, params->pBindInfos); - return params->device->funcs.p_vkBindImageMemory2(params->device->device, params->bindInfoCount, params->pBindInfos); + return wine_device_from_handle(params->device)->funcs.p_vkBindImageMemory2(wine_device_from_handle(params->device)->device, params->bindInfoCount, params->pBindInfos); #endif }
@@ -5466,13 +5466,13 @@ static NTSTATUS wine_vkBindImageMemory2KHR(void *args) TRACE("%p, %u, %p\n", params->device, params->bindInfoCount, params->pBindInfos);
pBindInfos_host = convert_VkBindImageMemoryInfo_array_win_to_host(params->pBindInfos, params->bindInfoCount); - result = params->device->funcs.p_vkBindImageMemory2KHR(params->device->device, params->bindInfoCount, pBindInfos_host); + result = wine_device_from_handle(params->device)->funcs.p_vkBindImageMemory2KHR(wine_device_from_handle(params->device)->device, params->bindInfoCount, pBindInfos_host);
free_VkBindImageMemoryInfo_array(pBindInfos_host, params->bindInfoCount); return result; #else TRACE("%p, %u, %p\n", params->device, params->bindInfoCount, params->pBindInfos); - return params->device->funcs.p_vkBindImageMemory2KHR(params->device->device, params->bindInfoCount, params->pBindInfos); + return wine_device_from_handle(params->device)->funcs.p_vkBindImageMemory2KHR(wine_device_from_handle(params->device)->device, params->bindInfoCount, params->pBindInfos); #endif }
@@ -5485,13 +5485,13 @@ static NTSTATUS wine_vkBuildAccelerationStructuresKHR(void *args) TRACE("%p, 0x%s, %u, %p, %p\n", params->device, wine_dbgstr_longlong(params->deferredOperation), params->infoCount, params->pInfos, params->ppBuildRangeInfos);
pInfos_host = convert_VkAccelerationStructureBuildGeometryInfoKHR_array_win_to_host(params->pInfos, params->infoCount); - result = params->device->funcs.p_vkBuildAccelerationStructuresKHR(params->device->device, params->deferredOperation, params->infoCount, pInfos_host, params->ppBuildRangeInfos); + result = wine_device_from_handle(params->device)->funcs.p_vkBuildAccelerationStructuresKHR(wine_device_from_handle(params->device)->device, params->deferredOperation, params->infoCount, pInfos_host, params->ppBuildRangeInfos);
free_VkAccelerationStructureBuildGeometryInfoKHR_array(pInfos_host, params->infoCount); return result; #else TRACE("%p, 0x%s, %u, %p, %p\n", params->device, wine_dbgstr_longlong(params->deferredOperation), params->infoCount, params->pInfos, params->ppBuildRangeInfos); - return params->device->funcs.p_vkBuildAccelerationStructuresKHR(params->device->device, params->deferredOperation, params->infoCount, params->pInfos, params->ppBuildRangeInfos); + return wine_device_from_handle(params->device)->funcs.p_vkBuildAccelerationStructuresKHR(wine_device_from_handle(params->device)->device, params->deferredOperation, params->infoCount, params->pInfos, params->ppBuildRangeInfos); #endif }
@@ -7416,7 +7416,7 @@ static NTSTATUS wine_vkCompileDeferredNV(void *args) { struct vkCompileDeferredNV_params *params = args; TRACE("%p, 0x%s, %u\n", params->device, wine_dbgstr_longlong(params->pipeline), params->shader); - return params->device->funcs.p_vkCompileDeferredNV(params->device->device, params->pipeline, params->shader); + return wine_device_from_handle(params->device)->funcs.p_vkCompileDeferredNV(wine_device_from_handle(params->device)->device, params->pipeline, params->shader); }
static NTSTATUS wine_vkCopyAccelerationStructureKHR(void *args) @@ -7428,12 +7428,12 @@ static NTSTATUS wine_vkCopyAccelerationStructureKHR(void *args) TRACE("%p, 0x%s, %p\n", params->device, wine_dbgstr_longlong(params->deferredOperation), params->pInfo);
convert_VkCopyAccelerationStructureInfoKHR_win_to_host(params->pInfo, &pInfo_host); - result = params->device->funcs.p_vkCopyAccelerationStructureKHR(params->device->device, params->deferredOperation, &pInfo_host); + result = wine_device_from_handle(params->device)->funcs.p_vkCopyAccelerationStructureKHR(wine_device_from_handle(params->device)->device, params->deferredOperation, &pInfo_host);
return result; #else TRACE("%p, 0x%s, %p\n", params->device, wine_dbgstr_longlong(params->deferredOperation), params->pInfo); - return params->device->funcs.p_vkCopyAccelerationStructureKHR(params->device->device, params->deferredOperation, params->pInfo); + return wine_device_from_handle(params->device)->funcs.p_vkCopyAccelerationStructureKHR(wine_device_from_handle(params->device)->device, params->deferredOperation, params->pInfo); #endif }
@@ -7446,12 +7446,12 @@ static NTSTATUS wine_vkCopyAccelerationStructureToMemoryKHR(void *args) TRACE("%p, 0x%s, %p\n", params->device, wine_dbgstr_longlong(params->deferredOperation), params->pInfo);
convert_VkCopyAccelerationStructureToMemoryInfoKHR_win_to_host(params->pInfo, &pInfo_host); - result = params->device->funcs.p_vkCopyAccelerationStructureToMemoryKHR(params->device->device, params->deferredOperation, &pInfo_host); + result = wine_device_from_handle(params->device)->funcs.p_vkCopyAccelerationStructureToMemoryKHR(wine_device_from_handle(params->device)->device, params->deferredOperation, &pInfo_host);
return result; #else TRACE("%p, 0x%s, %p\n", params->device, wine_dbgstr_longlong(params->deferredOperation), params->pInfo); - return params->device->funcs.p_vkCopyAccelerationStructureToMemoryKHR(params->device->device, params->deferredOperation, params->pInfo); + return wine_device_from_handle(params->device)->funcs.p_vkCopyAccelerationStructureToMemoryKHR(wine_device_from_handle(params->device)->device, params->deferredOperation, params->pInfo); #endif }
@@ -7464,12 +7464,12 @@ static NTSTATUS wine_vkCopyMemoryToAccelerationStructureKHR(void *args) TRACE("%p, 0x%s, %p\n", params->device, wine_dbgstr_longlong(params->deferredOperation), params->pInfo);
convert_VkCopyMemoryToAccelerationStructureInfoKHR_win_to_host(params->pInfo, &pInfo_host); - result = params->device->funcs.p_vkCopyMemoryToAccelerationStructureKHR(params->device->device, params->deferredOperation, &pInfo_host); + result = wine_device_from_handle(params->device)->funcs.p_vkCopyMemoryToAccelerationStructureKHR(wine_device_from_handle(params->device)->device, params->deferredOperation, &pInfo_host);
return result; #else TRACE("%p, 0x%s, %p\n", params->device, wine_dbgstr_longlong(params->deferredOperation), params->pInfo); - return params->device->funcs.p_vkCopyMemoryToAccelerationStructureKHR(params->device->device, params->deferredOperation, params->pInfo); + return wine_device_from_handle(params->device)->funcs.p_vkCopyMemoryToAccelerationStructureKHR(wine_device_from_handle(params->device)->device, params->deferredOperation, params->pInfo); #endif }
@@ -7482,12 +7482,12 @@ static NTSTATUS wine_vkCreateAccelerationStructureKHR(void *args) TRACE("%p, %p, %p, %p\n", params->device, params->pCreateInfo, params->pAllocator, params->pAccelerationStructure);
convert_VkAccelerationStructureCreateInfoKHR_win_to_host(params->pCreateInfo, &pCreateInfo_host); - result = params->device->funcs.p_vkCreateAccelerationStructureKHR(params->device->device, &pCreateInfo_host, NULL, params->pAccelerationStructure); + result = wine_device_from_handle(params->device)->funcs.p_vkCreateAccelerationStructureKHR(wine_device_from_handle(params->device)->device, &pCreateInfo_host, NULL, params->pAccelerationStructure);
return result; #else TRACE("%p, %p, %p, %p\n", params->device, params->pCreateInfo, params->pAllocator, params->pAccelerationStructure); - return params->device->funcs.p_vkCreateAccelerationStructureKHR(params->device->device, params->pCreateInfo, NULL, params->pAccelerationStructure); + return wine_device_from_handle(params->device)->funcs.p_vkCreateAccelerationStructureKHR(wine_device_from_handle(params->device)->device, params->pCreateInfo, NULL, params->pAccelerationStructure); #endif }
@@ -7500,12 +7500,12 @@ static NTSTATUS wine_vkCreateAccelerationStructureNV(void *args) TRACE("%p, %p, %p, %p\n", params->device, params->pCreateInfo, params->pAllocator, params->pAccelerationStructure);
convert_VkAccelerationStructureCreateInfoNV_win_to_host(params->pCreateInfo, &pCreateInfo_host); - result = params->device->funcs.p_vkCreateAccelerationStructureNV(params->device->device, &pCreateInfo_host, NULL, params->pAccelerationStructure); + result = wine_device_from_handle(params->device)->funcs.p_vkCreateAccelerationStructureNV(wine_device_from_handle(params->device)->device, &pCreateInfo_host, NULL, params->pAccelerationStructure);
return result; #else TRACE("%p, %p, %p, %p\n", params->device, params->pCreateInfo, params->pAllocator, params->pAccelerationStructure); - return params->device->funcs.p_vkCreateAccelerationStructureNV(params->device->device, params->pCreateInfo, NULL, params->pAccelerationStructure); + return wine_device_from_handle(params->device)->funcs.p_vkCreateAccelerationStructureNV(wine_device_from_handle(params->device)->device, params->pCreateInfo, NULL, params->pAccelerationStructure); #endif }
@@ -7518,12 +7518,12 @@ static NTSTATUS wine_vkCreateBuffer(void *args) TRACE("%p, %p, %p, %p\n", params->device, params->pCreateInfo, params->pAllocator, params->pBuffer);
convert_VkBufferCreateInfo_win_to_host(params->pCreateInfo, &pCreateInfo_host); - result = params->device->funcs.p_vkCreateBuffer(params->device->device, &pCreateInfo_host, NULL, params->pBuffer); + result = wine_device_from_handle(params->device)->funcs.p_vkCreateBuffer(wine_device_from_handle(params->device)->device, &pCreateInfo_host, NULL, params->pBuffer);
return result; #else TRACE("%p, %p, %p, %p\n", params->device, params->pCreateInfo, params->pAllocator, params->pBuffer); - return params->device->funcs.p_vkCreateBuffer(params->device->device, params->pCreateInfo, NULL, params->pBuffer); + return wine_device_from_handle(params->device)->funcs.p_vkCreateBuffer(wine_device_from_handle(params->device)->device, params->pCreateInfo, NULL, params->pBuffer); #endif }
@@ -7536,12 +7536,12 @@ static NTSTATUS wine_vkCreateBufferView(void *args) TRACE("%p, %p, %p, %p\n", params->device, params->pCreateInfo, params->pAllocator, params->pView);
convert_VkBufferViewCreateInfo_win_to_host(params->pCreateInfo, &pCreateInfo_host); - result = params->device->funcs.p_vkCreateBufferView(params->device->device, &pCreateInfo_host, NULL, params->pView); + result = wine_device_from_handle(params->device)->funcs.p_vkCreateBufferView(wine_device_from_handle(params->device)->device, &pCreateInfo_host, NULL, params->pView);
return result; #else TRACE("%p, %p, %p, %p\n", params->device, params->pCreateInfo, params->pAllocator, params->pView); - return params->device->funcs.p_vkCreateBufferView(params->device->device, params->pCreateInfo, NULL, params->pView); + return wine_device_from_handle(params->device)->funcs.p_vkCreateBufferView(wine_device_from_handle(params->device)->device, params->pCreateInfo, NULL, params->pView); #endif }
@@ -7551,12 +7551,12 @@ VkResult thunk_vkCreateComputePipelines(VkDevice device, VkPipelineCache pipelin VkResult result; VkComputePipelineCreateInfo_host *pCreateInfos_host; pCreateInfos_host = convert_VkComputePipelineCreateInfo_array_win_to_host(pCreateInfos, createInfoCount); - result = device->funcs.p_vkCreateComputePipelines(device->device, pipelineCache, createInfoCount, pCreateInfos_host, NULL, pPipelines); + result = wine_device_from_handle(device)->funcs.p_vkCreateComputePipelines(wine_device_from_handle(device)->device, pipelineCache, createInfoCount, pCreateInfos_host, NULL, pPipelines);
free_VkComputePipelineCreateInfo_array(pCreateInfos_host, createInfoCount); return result; #else - return device->funcs.p_vkCreateComputePipelines(device->device, pipelineCache, createInfoCount, pCreateInfos, NULL, pPipelines); + return wine_device_from_handle(device)->funcs.p_vkCreateComputePipelines(wine_device_from_handle(device)->device, pipelineCache, createInfoCount, pCreateInfos, NULL, pPipelines); #endif }
@@ -7569,12 +7569,12 @@ static NTSTATUS wine_vkCreateCuFunctionNVX(void *args) TRACE("%p, %p, %p, %p\n", params->device, params->pCreateInfo, params->pAllocator, params->pFunction);
convert_VkCuFunctionCreateInfoNVX_win_to_host(params->pCreateInfo, &pCreateInfo_host); - result = params->device->funcs.p_vkCreateCuFunctionNVX(params->device->device, &pCreateInfo_host, NULL, params->pFunction); + result = wine_device_from_handle(params->device)->funcs.p_vkCreateCuFunctionNVX(wine_device_from_handle(params->device)->device, &pCreateInfo_host, NULL, params->pFunction);
return result; #else TRACE("%p, %p, %p, %p\n", params->device, params->pCreateInfo, params->pAllocator, params->pFunction); - return params->device->funcs.p_vkCreateCuFunctionNVX(params->device->device, params->pCreateInfo, NULL, params->pFunction); + return wine_device_from_handle(params->device)->funcs.p_vkCreateCuFunctionNVX(wine_device_from_handle(params->device)->device, params->pCreateInfo, NULL, params->pFunction); #endif }
@@ -7582,28 +7582,28 @@ static NTSTATUS wine_vkCreateCuModuleNVX(void *args) { struct vkCreateCuModuleNVX_params *params = args; TRACE("%p, %p, %p, %p\n", params->device, params->pCreateInfo, params->pAllocator, params->pModule); - return params->device->funcs.p_vkCreateCuModuleNVX(params->device->device, params->pCreateInfo, NULL, params->pModule); + return wine_device_from_handle(params->device)->funcs.p_vkCreateCuModuleNVX(wine_device_from_handle(params->device)->device, params->pCreateInfo, NULL, params->pModule); }
static NTSTATUS wine_vkCreateDeferredOperationKHR(void *args) { struct vkCreateDeferredOperationKHR_params *params = args; TRACE("%p, %p, %p\n", params->device, params->pAllocator, params->pDeferredOperation); - return params->device->funcs.p_vkCreateDeferredOperationKHR(params->device->device, NULL, params->pDeferredOperation); + return wine_device_from_handle(params->device)->funcs.p_vkCreateDeferredOperationKHR(wine_device_from_handle(params->device)->device, NULL, params->pDeferredOperation); }
static NTSTATUS wine_vkCreateDescriptorPool(void *args) { struct vkCreateDescriptorPool_params *params = args; TRACE("%p, %p, %p, %p\n", params->device, params->pCreateInfo, params->pAllocator, params->pDescriptorPool); - return params->device->funcs.p_vkCreateDescriptorPool(params->device->device, params->pCreateInfo, NULL, params->pDescriptorPool); + return wine_device_from_handle(params->device)->funcs.p_vkCreateDescriptorPool(wine_device_from_handle(params->device)->device, params->pCreateInfo, NULL, params->pDescriptorPool); }
static NTSTATUS wine_vkCreateDescriptorSetLayout(void *args) { struct vkCreateDescriptorSetLayout_params *params = args; TRACE("%p, %p, %p, %p\n", params->device, params->pCreateInfo, params->pAllocator, params->pSetLayout); - return params->device->funcs.p_vkCreateDescriptorSetLayout(params->device->device, params->pCreateInfo, NULL, params->pSetLayout); + return wine_device_from_handle(params->device)->funcs.p_vkCreateDescriptorSetLayout(wine_device_from_handle(params->device)->device, params->pCreateInfo, NULL, params->pSetLayout); }
static NTSTATUS wine_vkCreateDescriptorUpdateTemplate(void *args) @@ -7615,12 +7615,12 @@ static NTSTATUS wine_vkCreateDescriptorUpdateTemplate(void *args) TRACE("%p, %p, %p, %p\n", params->device, params->pCreateInfo, params->pAllocator, params->pDescriptorUpdateTemplate);
convert_VkDescriptorUpdateTemplateCreateInfo_win_to_host(params->pCreateInfo, &pCreateInfo_host); - result = params->device->funcs.p_vkCreateDescriptorUpdateTemplate(params->device->device, &pCreateInfo_host, NULL, params->pDescriptorUpdateTemplate); + result = wine_device_from_handle(params->device)->funcs.p_vkCreateDescriptorUpdateTemplate(wine_device_from_handle(params->device)->device, &pCreateInfo_host, NULL, params->pDescriptorUpdateTemplate);
return result; #else TRACE("%p, %p, %p, %p\n", params->device, params->pCreateInfo, params->pAllocator, params->pDescriptorUpdateTemplate); - return params->device->funcs.p_vkCreateDescriptorUpdateTemplate(params->device->device, params->pCreateInfo, NULL, params->pDescriptorUpdateTemplate); + return wine_device_from_handle(params->device)->funcs.p_vkCreateDescriptorUpdateTemplate(wine_device_from_handle(params->device)->device, params->pCreateInfo, NULL, params->pDescriptorUpdateTemplate); #endif }
@@ -7633,12 +7633,12 @@ static NTSTATUS wine_vkCreateDescriptorUpdateTemplateKHR(void *args) TRACE("%p, %p, %p, %p\n", params->device, params->pCreateInfo, params->pAllocator, params->pDescriptorUpdateTemplate);
convert_VkDescriptorUpdateTemplateCreateInfo_win_to_host(params->pCreateInfo, &pCreateInfo_host); - result = params->device->funcs.p_vkCreateDescriptorUpdateTemplateKHR(params->device->device, &pCreateInfo_host, NULL, params->pDescriptorUpdateTemplate); + result = wine_device_from_handle(params->device)->funcs.p_vkCreateDescriptorUpdateTemplateKHR(wine_device_from_handle(params->device)->device, &pCreateInfo_host, NULL, params->pDescriptorUpdateTemplate);
return result; #else TRACE("%p, %p, %p, %p\n", params->device, params->pCreateInfo, params->pAllocator, params->pDescriptorUpdateTemplate); - return params->device->funcs.p_vkCreateDescriptorUpdateTemplateKHR(params->device->device, params->pCreateInfo, NULL, params->pDescriptorUpdateTemplate); + return wine_device_from_handle(params->device)->funcs.p_vkCreateDescriptorUpdateTemplateKHR(wine_device_from_handle(params->device)->device, params->pCreateInfo, NULL, params->pDescriptorUpdateTemplate); #endif }
@@ -7646,14 +7646,14 @@ static NTSTATUS wine_vkCreateEvent(void *args) { struct vkCreateEvent_params *params = args; TRACE("%p, %p, %p, %p\n", params->device, params->pCreateInfo, params->pAllocator, params->pEvent); - return params->device->funcs.p_vkCreateEvent(params->device->device, params->pCreateInfo, NULL, params->pEvent); + return wine_device_from_handle(params->device)->funcs.p_vkCreateEvent(wine_device_from_handle(params->device)->device, params->pCreateInfo, NULL, params->pEvent); }
static NTSTATUS wine_vkCreateFence(void *args) { struct vkCreateFence_params *params = args; TRACE("%p, %p, %p, %p\n", params->device, params->pCreateInfo, params->pAllocator, params->pFence); - return params->device->funcs.p_vkCreateFence(params->device->device, params->pCreateInfo, NULL, params->pFence); + return wine_device_from_handle(params->device)->funcs.p_vkCreateFence(wine_device_from_handle(params->device)->device, params->pCreateInfo, NULL, params->pFence); }
static NTSTATUS wine_vkCreateFramebuffer(void *args) @@ -7665,12 +7665,12 @@ static NTSTATUS wine_vkCreateFramebuffer(void *args) TRACE("%p, %p, %p, %p\n", params->device, params->pCreateInfo, params->pAllocator, params->pFramebuffer);
convert_VkFramebufferCreateInfo_win_to_host(params->pCreateInfo, &pCreateInfo_host); - result = params->device->funcs.p_vkCreateFramebuffer(params->device->device, &pCreateInfo_host, NULL, params->pFramebuffer); + result = wine_device_from_handle(params->device)->funcs.p_vkCreateFramebuffer(wine_device_from_handle(params->device)->device, &pCreateInfo_host, NULL, params->pFramebuffer);
return result; #else TRACE("%p, %p, %p, %p\n", params->device, params->pCreateInfo, params->pAllocator, params->pFramebuffer); - return params->device->funcs.p_vkCreateFramebuffer(params->device->device, params->pCreateInfo, NULL, params->pFramebuffer); + return wine_device_from_handle(params->device)->funcs.p_vkCreateFramebuffer(wine_device_from_handle(params->device)->device, params->pCreateInfo, NULL, params->pFramebuffer); #endif }
@@ -7680,12 +7680,12 @@ VkResult thunk_vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipeli VkResult result; VkGraphicsPipelineCreateInfo_host *pCreateInfos_host; pCreateInfos_host = convert_VkGraphicsPipelineCreateInfo_array_win_to_host(pCreateInfos, createInfoCount); - result = device->funcs.p_vkCreateGraphicsPipelines(device->device, pipelineCache, createInfoCount, pCreateInfos_host, NULL, pPipelines); + result = wine_device_from_handle(device)->funcs.p_vkCreateGraphicsPipelines(wine_device_from_handle(device)->device, pipelineCache, createInfoCount, pCreateInfos_host, NULL, pPipelines);
free_VkGraphicsPipelineCreateInfo_array(pCreateInfos_host, createInfoCount); return result; #else - return device->funcs.p_vkCreateGraphicsPipelines(device->device, pipelineCache, createInfoCount, pCreateInfos, NULL, pPipelines); + return wine_device_from_handle(device)->funcs.p_vkCreateGraphicsPipelines(wine_device_from_handle(device)->device, pipelineCache, createInfoCount, pCreateInfos, NULL, pPipelines); #endif }
@@ -7693,7 +7693,7 @@ static NTSTATUS wine_vkCreateImage(void *args) { struct vkCreateImage_params *params = args; TRACE("%p, %p, %p, %p\n", params->device, params->pCreateInfo, params->pAllocator, params->pImage); - return params->device->funcs.p_vkCreateImage(params->device->device, params->pCreateInfo, NULL, params->pImage); + return wine_device_from_handle(params->device)->funcs.p_vkCreateImage(wine_device_from_handle(params->device)->device, params->pCreateInfo, NULL, params->pImage); }
static NTSTATUS wine_vkCreateImageView(void *args) @@ -7705,12 +7705,12 @@ static NTSTATUS wine_vkCreateImageView(void *args) TRACE("%p, %p, %p, %p\n", params->device, params->pCreateInfo, params->pAllocator, params->pView);
convert_VkImageViewCreateInfo_win_to_host(params->pCreateInfo, &pCreateInfo_host); - result = params->device->funcs.p_vkCreateImageView(params->device->device, &pCreateInfo_host, NULL, params->pView); + result = wine_device_from_handle(params->device)->funcs.p_vkCreateImageView(wine_device_from_handle(params->device)->device, &pCreateInfo_host, NULL, params->pView);
return result; #else TRACE("%p, %p, %p, %p\n", params->device, params->pCreateInfo, params->pAllocator, params->pView); - return params->device->funcs.p_vkCreateImageView(params->device->device, params->pCreateInfo, NULL, params->pView); + return wine_device_from_handle(params->device)->funcs.p_vkCreateImageView(wine_device_from_handle(params->device)->device, params->pCreateInfo, NULL, params->pView); #endif }
@@ -7723,13 +7723,13 @@ static NTSTATUS wine_vkCreateIndirectCommandsLayoutNV(void *args) TRACE("%p, %p, %p, %p\n", params->device, params->pCreateInfo, params->pAllocator, params->pIndirectCommandsLayout);
convert_VkIndirectCommandsLayoutCreateInfoNV_win_to_host(params->pCreateInfo, &pCreateInfo_host); - result = params->device->funcs.p_vkCreateIndirectCommandsLayoutNV(params->device->device, &pCreateInfo_host, NULL, params->pIndirectCommandsLayout); + result = wine_device_from_handle(params->device)->funcs.p_vkCreateIndirectCommandsLayoutNV(wine_device_from_handle(params->device)->device, &pCreateInfo_host, NULL, params->pIndirectCommandsLayout);
free_VkIndirectCommandsLayoutCreateInfoNV(&pCreateInfo_host); return result; #else TRACE("%p, %p, %p, %p\n", params->device, params->pCreateInfo, params->pAllocator, params->pIndirectCommandsLayout); - return params->device->funcs.p_vkCreateIndirectCommandsLayoutNV(params->device->device, params->pCreateInfo, NULL, params->pIndirectCommandsLayout); + return wine_device_from_handle(params->device)->funcs.p_vkCreateIndirectCommandsLayoutNV(wine_device_from_handle(params->device)->device, params->pCreateInfo, NULL, params->pIndirectCommandsLayout); #endif }
@@ -7737,35 +7737,35 @@ static NTSTATUS wine_vkCreatePipelineCache(void *args) { struct vkCreatePipelineCache_params *params = args; TRACE("%p, %p, %p, %p\n", params->device, params->pCreateInfo, params->pAllocator, params->pPipelineCache); - return params->device->funcs.p_vkCreatePipelineCache(params->device->device, params->pCreateInfo, NULL, params->pPipelineCache); + return wine_device_from_handle(params->device)->funcs.p_vkCreatePipelineCache(wine_device_from_handle(params->device)->device, params->pCreateInfo, NULL, params->pPipelineCache); }
static NTSTATUS wine_vkCreatePipelineLayout(void *args) { struct vkCreatePipelineLayout_params *params = args; TRACE("%p, %p, %p, %p\n", params->device, params->pCreateInfo, params->pAllocator, params->pPipelineLayout); - return params->device->funcs.p_vkCreatePipelineLayout(params->device->device, params->pCreateInfo, NULL, params->pPipelineLayout); + return wine_device_from_handle(params->device)->funcs.p_vkCreatePipelineLayout(wine_device_from_handle(params->device)->device, params->pCreateInfo, NULL, params->pPipelineLayout); }
static NTSTATUS wine_vkCreatePrivateDataSlot(void *args) { struct vkCreatePrivateDataSlot_params *params = args; TRACE("%p, %p, %p, %p\n", params->device, params->pCreateInfo, params->pAllocator, params->pPrivateDataSlot); - return params->device->funcs.p_vkCreatePrivateDataSlot(params->device->device, params->pCreateInfo, NULL, params->pPrivateDataSlot); + return wine_device_from_handle(params->device)->funcs.p_vkCreatePrivateDataSlot(wine_device_from_handle(params->device)->device, params->pCreateInfo, NULL, params->pPrivateDataSlot); }
static NTSTATUS wine_vkCreatePrivateDataSlotEXT(void *args) { struct vkCreatePrivateDataSlotEXT_params *params = args; TRACE("%p, %p, %p, %p\n", params->device, params->pCreateInfo, params->pAllocator, params->pPrivateDataSlot); - return params->device->funcs.p_vkCreatePrivateDataSlotEXT(params->device->device, params->pCreateInfo, NULL, params->pPrivateDataSlot); + return wine_device_from_handle(params->device)->funcs.p_vkCreatePrivateDataSlotEXT(wine_device_from_handle(params->device)->device, params->pCreateInfo, NULL, params->pPrivateDataSlot); }
static NTSTATUS wine_vkCreateQueryPool(void *args) { struct vkCreateQueryPool_params *params = args; TRACE("%p, %p, %p, %p\n", params->device, params->pCreateInfo, params->pAllocator, params->pQueryPool); - return params->device->funcs.p_vkCreateQueryPool(params->device->device, params->pCreateInfo, NULL, params->pQueryPool); + return wine_device_from_handle(params->device)->funcs.p_vkCreateQueryPool(wine_device_from_handle(params->device)->device, params->pCreateInfo, NULL, params->pQueryPool); }
VkResult thunk_vkCreateRayTracingPipelinesKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkRayTracingPipelineCreateInfoKHR *pCreateInfos, const VkAllocationCallbacks *pAllocator, VkPipeline *pPipelines) @@ -7774,12 +7774,12 @@ VkResult thunk_vkCreateRayTracingPipelinesKHR(VkDevice device, VkDeferredOperati VkResult result; VkRayTracingPipelineCreateInfoKHR_host *pCreateInfos_host; pCreateInfos_host = convert_VkRayTracingPipelineCreateInfoKHR_array_win_to_host(pCreateInfos, createInfoCount); - result = device->funcs.p_vkCreateRayTracingPipelinesKHR(device->device, deferredOperation, pipelineCache, createInfoCount, pCreateInfos_host, NULL, pPipelines); + result = wine_device_from_handle(device)->funcs.p_vkCreateRayTracingPipelinesKHR(wine_device_from_handle(device)->device, deferredOperation, pipelineCache, createInfoCount, pCreateInfos_host, NULL, pPipelines);
free_VkRayTracingPipelineCreateInfoKHR_array(pCreateInfos_host, createInfoCount); return result; #else - return device->funcs.p_vkCreateRayTracingPipelinesKHR(device->device, deferredOperation, pipelineCache, createInfoCount, pCreateInfos, NULL, pPipelines); + return wine_device_from_handle(device)->funcs.p_vkCreateRayTracingPipelinesKHR(wine_device_from_handle(device)->device, deferredOperation, pipelineCache, createInfoCount, pCreateInfos, NULL, pPipelines); #endif }
@@ -7789,12 +7789,12 @@ VkResult thunk_vkCreateRayTracingPipelinesNV(VkDevice device, VkPipelineCache pi VkResult result; VkRayTracingPipelineCreateInfoNV_host *pCreateInfos_host; pCreateInfos_host = convert_VkRayTracingPipelineCreateInfoNV_array_win_to_host(pCreateInfos, createInfoCount); - result = device->funcs.p_vkCreateRayTracingPipelinesNV(device->device, pipelineCache, createInfoCount, pCreateInfos_host, NULL, pPipelines); + result = wine_device_from_handle(device)->funcs.p_vkCreateRayTracingPipelinesNV(wine_device_from_handle(device)->device, pipelineCache, createInfoCount, pCreateInfos_host, NULL, pPipelines);
free_VkRayTracingPipelineCreateInfoNV_array(pCreateInfos_host, createInfoCount); return result; #else - return device->funcs.p_vkCreateRayTracingPipelinesNV(device->device, pipelineCache, createInfoCount, pCreateInfos, NULL, pPipelines); + return wine_device_from_handle(device)->funcs.p_vkCreateRayTracingPipelinesNV(wine_device_from_handle(device)->device, pipelineCache, createInfoCount, pCreateInfos, NULL, pPipelines); #endif }
@@ -7802,56 +7802,56 @@ static NTSTATUS wine_vkCreateRenderPass(void *args) { struct vkCreateRenderPass_params *params = args; TRACE("%p, %p, %p, %p\n", params->device, params->pCreateInfo, params->pAllocator, params->pRenderPass); - return params->device->funcs.p_vkCreateRenderPass(params->device->device, params->pCreateInfo, NULL, params->pRenderPass); + return wine_device_from_handle(params->device)->funcs.p_vkCreateRenderPass(wine_device_from_handle(params->device)->device, params->pCreateInfo, NULL, params->pRenderPass); }
static NTSTATUS wine_vkCreateRenderPass2(void *args) { struct vkCreateRenderPass2_params *params = args; TRACE("%p, %p, %p, %p\n", params->device, params->pCreateInfo, params->pAllocator, params->pRenderPass); - return params->device->funcs.p_vkCreateRenderPass2(params->device->device, params->pCreateInfo, NULL, params->pRenderPass); + return wine_device_from_handle(params->device)->funcs.p_vkCreateRenderPass2(wine_device_from_handle(params->device)->device, params->pCreateInfo, NULL, params->pRenderPass); }
static NTSTATUS wine_vkCreateRenderPass2KHR(void *args) { struct vkCreateRenderPass2KHR_params *params = args; TRACE("%p, %p, %p, %p\n", params->device, params->pCreateInfo, params->pAllocator, params->pRenderPass); - return params->device->funcs.p_vkCreateRenderPass2KHR(params->device->device, params->pCreateInfo, NULL, params->pRenderPass); + return wine_device_from_handle(params->device)->funcs.p_vkCreateRenderPass2KHR(wine_device_from_handle(params->device)->device, params->pCreateInfo, NULL, params->pRenderPass); }
static NTSTATUS wine_vkCreateSampler(void *args) { struct vkCreateSampler_params *params = args; TRACE("%p, %p, %p, %p\n", params->device, params->pCreateInfo, params->pAllocator, params->pSampler); - return params->device->funcs.p_vkCreateSampler(params->device->device, params->pCreateInfo, NULL, params->pSampler); + return wine_device_from_handle(params->device)->funcs.p_vkCreateSampler(wine_device_from_handle(params->device)->device, params->pCreateInfo, NULL, params->pSampler); }
static NTSTATUS wine_vkCreateSamplerYcbcrConversion(void *args) { struct vkCreateSamplerYcbcrConversion_params *params = args; TRACE("%p, %p, %p, %p\n", params->device, params->pCreateInfo, params->pAllocator, params->pYcbcrConversion); - return params->device->funcs.p_vkCreateSamplerYcbcrConversion(params->device->device, params->pCreateInfo, NULL, params->pYcbcrConversion); + return wine_device_from_handle(params->device)->funcs.p_vkCreateSamplerYcbcrConversion(wine_device_from_handle(params->device)->device, params->pCreateInfo, NULL, params->pYcbcrConversion); }
static NTSTATUS wine_vkCreateSamplerYcbcrConversionKHR(void *args) { struct vkCreateSamplerYcbcrConversionKHR_params *params = args; TRACE("%p, %p, %p, %p\n", params->device, params->pCreateInfo, params->pAllocator, params->pYcbcrConversion); - return params->device->funcs.p_vkCreateSamplerYcbcrConversionKHR(params->device->device, params->pCreateInfo, NULL, params->pYcbcrConversion); + return wine_device_from_handle(params->device)->funcs.p_vkCreateSamplerYcbcrConversionKHR(wine_device_from_handle(params->device)->device, params->pCreateInfo, NULL, params->pYcbcrConversion); }
static NTSTATUS wine_vkCreateSemaphore(void *args) { struct vkCreateSemaphore_params *params = args; TRACE("%p, %p, %p, %p\n", params->device, params->pCreateInfo, params->pAllocator, params->pSemaphore); - return params->device->funcs.p_vkCreateSemaphore(params->device->device, params->pCreateInfo, NULL, params->pSemaphore); + return wine_device_from_handle(params->device)->funcs.p_vkCreateSemaphore(wine_device_from_handle(params->device)->device, params->pCreateInfo, NULL, params->pSemaphore); }
static NTSTATUS wine_vkCreateShaderModule(void *args) { struct vkCreateShaderModule_params *params = args; TRACE("%p, %p, %p, %p\n", params->device, params->pCreateInfo, params->pAllocator, params->pShaderModule); - return params->device->funcs.p_vkCreateShaderModule(params->device->device, params->pCreateInfo, NULL, params->pShaderModule); + return wine_device_from_handle(params->device)->funcs.p_vkCreateShaderModule(wine_device_from_handle(params->device)->device, params->pCreateInfo, NULL, params->pShaderModule); }
static NTSTATUS wine_vkCreateSwapchainKHR(void *args) @@ -7863,7 +7863,7 @@ static NTSTATUS wine_vkCreateSwapchainKHR(void *args) TRACE("%p, %p, %p, %p\n", params->device, params->pCreateInfo, params->pAllocator, params->pSwapchain);
convert_VkSwapchainCreateInfoKHR_win_to_host(params->pCreateInfo, &pCreateInfo_host); - result = params->device->funcs.p_vkCreateSwapchainKHR(params->device->device, &pCreateInfo_host, NULL, params->pSwapchain); + result = wine_device_from_handle(params->device)->funcs.p_vkCreateSwapchainKHR(wine_device_from_handle(params->device)->device, &pCreateInfo_host, NULL, params->pSwapchain);
return result; #else @@ -7872,7 +7872,7 @@ static NTSTATUS wine_vkCreateSwapchainKHR(void *args) TRACE("%p, %p, %p, %p\n", params->device, params->pCreateInfo, params->pAllocator, params->pSwapchain);
convert_VkSwapchainCreateInfoKHR_win_to_host(params->pCreateInfo, &pCreateInfo_host); - result = params->device->funcs.p_vkCreateSwapchainKHR(params->device->device, &pCreateInfo_host, NULL, params->pSwapchain); + result = wine_device_from_handle(params->device)->funcs.p_vkCreateSwapchainKHR(wine_device_from_handle(params->device)->device, &pCreateInfo_host, NULL, params->pSwapchain);
return result; #endif @@ -7882,7 +7882,7 @@ static NTSTATUS wine_vkCreateValidationCacheEXT(void *args) { struct vkCreateValidationCacheEXT_params *params = args; TRACE("%p, %p, %p, %p\n", params->device, params->pCreateInfo, params->pAllocator, params->pValidationCache); - return params->device->funcs.p_vkCreateValidationCacheEXT(params->device->device, params->pCreateInfo, NULL, params->pValidationCache); + return wine_device_from_handle(params->device)->funcs.p_vkCreateValidationCacheEXT(wine_device_from_handle(params->device)->device, params->pCreateInfo, NULL, params->pValidationCache); }
static NTSTATUS wine_vkDebugMarkerSetObjectNameEXT(void *args) @@ -7894,7 +7894,7 @@ static NTSTATUS wine_vkDebugMarkerSetObjectNameEXT(void *args) TRACE("%p, %p\n", params->device, params->pNameInfo);
convert_VkDebugMarkerObjectNameInfoEXT_win_to_host(params->pNameInfo, &pNameInfo_host); - result = params->device->funcs.p_vkDebugMarkerSetObjectNameEXT(params->device->device, &pNameInfo_host); + result = wine_device_from_handle(params->device)->funcs.p_vkDebugMarkerSetObjectNameEXT(wine_device_from_handle(params->device)->device, &pNameInfo_host);
return result; #else @@ -7903,7 +7903,7 @@ static NTSTATUS wine_vkDebugMarkerSetObjectNameEXT(void *args) TRACE("%p, %p\n", params->device, params->pNameInfo);
convert_VkDebugMarkerObjectNameInfoEXT_win_to_host(params->pNameInfo, &pNameInfo_host); - result = params->device->funcs.p_vkDebugMarkerSetObjectNameEXT(params->device->device, &pNameInfo_host); + result = wine_device_from_handle(params->device)->funcs.p_vkDebugMarkerSetObjectNameEXT(wine_device_from_handle(params->device)->device, &pNameInfo_host);
return result; #endif @@ -7918,7 +7918,7 @@ static NTSTATUS wine_vkDebugMarkerSetObjectTagEXT(void *args) TRACE("%p, %p\n", params->device, params->pTagInfo);
convert_VkDebugMarkerObjectTagInfoEXT_win_to_host(params->pTagInfo, &pTagInfo_host); - result = params->device->funcs.p_vkDebugMarkerSetObjectTagEXT(params->device->device, &pTagInfo_host); + result = wine_device_from_handle(params->device)->funcs.p_vkDebugMarkerSetObjectTagEXT(wine_device_from_handle(params->device)->device, &pTagInfo_host);
return result; #else @@ -7927,7 +7927,7 @@ static NTSTATUS wine_vkDebugMarkerSetObjectTagEXT(void *args) TRACE("%p, %p\n", params->device, params->pTagInfo);
convert_VkDebugMarkerObjectTagInfoEXT_win_to_host(params->pTagInfo, &pTagInfo_host); - result = params->device->funcs.p_vkDebugMarkerSetObjectTagEXT(params->device->device, &pTagInfo_host); + result = wine_device_from_handle(params->device)->funcs.p_vkDebugMarkerSetObjectTagEXT(wine_device_from_handle(params->device)->device, &pTagInfo_host);
return result; #endif @@ -7945,14 +7945,14 @@ static NTSTATUS wine_vkDeferredOperationJoinKHR(void *args) { struct vkDeferredOperationJoinKHR_params *params = args; TRACE("%p, 0x%s\n", params->device, wine_dbgstr_longlong(params->operation)); - return params->device->funcs.p_vkDeferredOperationJoinKHR(params->device->device, params->operation); + return wine_device_from_handle(params->device)->funcs.p_vkDeferredOperationJoinKHR(wine_device_from_handle(params->device)->device, params->operation); }
static NTSTATUS wine_vkDestroyAccelerationStructureKHR(void *args) { struct vkDestroyAccelerationStructureKHR_params *params = args; TRACE("%p, 0x%s, %p\n", params->device, wine_dbgstr_longlong(params->accelerationStructure), params->pAllocator); - params->device->funcs.p_vkDestroyAccelerationStructureKHR(params->device->device, params->accelerationStructure, NULL); + wine_device_from_handle(params->device)->funcs.p_vkDestroyAccelerationStructureKHR(wine_device_from_handle(params->device)->device, params->accelerationStructure, NULL); return STATUS_SUCCESS; }
@@ -7960,7 +7960,7 @@ static NTSTATUS wine_vkDestroyAccelerationStructureNV(void *args) { struct vkDestroyAccelerationStructureNV_params *params = args; TRACE("%p, 0x%s, %p\n", params->device, wine_dbgstr_longlong(params->accelerationStructure), params->pAllocator); - params->device->funcs.p_vkDestroyAccelerationStructureNV(params->device->device, params->accelerationStructure, NULL); + wine_device_from_handle(params->device)->funcs.p_vkDestroyAccelerationStructureNV(wine_device_from_handle(params->device)->device, params->accelerationStructure, NULL); return STATUS_SUCCESS; }
@@ -7968,7 +7968,7 @@ static NTSTATUS wine_vkDestroyBuffer(void *args) { struct vkDestroyBuffer_params *params = args; TRACE("%p, 0x%s, %p\n", params->device, wine_dbgstr_longlong(params->buffer), params->pAllocator); - params->device->funcs.p_vkDestroyBuffer(params->device->device, params->buffer, NULL); + wine_device_from_handle(params->device)->funcs.p_vkDestroyBuffer(wine_device_from_handle(params->device)->device, params->buffer, NULL); return STATUS_SUCCESS; }
@@ -7976,7 +7976,7 @@ static NTSTATUS wine_vkDestroyBufferView(void *args) { struct vkDestroyBufferView_params *params = args; TRACE("%p, 0x%s, %p\n", params->device, wine_dbgstr_longlong(params->bufferView), params->pAllocator); - params->device->funcs.p_vkDestroyBufferView(params->device->device, params->bufferView, NULL); + wine_device_from_handle(params->device)->funcs.p_vkDestroyBufferView(wine_device_from_handle(params->device)->device, params->bufferView, NULL); return STATUS_SUCCESS; }
@@ -7984,7 +7984,7 @@ static NTSTATUS wine_vkDestroyCuFunctionNVX(void *args) { struct vkDestroyCuFunctionNVX_params *params = args; TRACE("%p, 0x%s, %p\n", params->device, wine_dbgstr_longlong(params->function), params->pAllocator); - params->device->funcs.p_vkDestroyCuFunctionNVX(params->device->device, params->function, NULL); + wine_device_from_handle(params->device)->funcs.p_vkDestroyCuFunctionNVX(wine_device_from_handle(params->device)->device, params->function, NULL); return STATUS_SUCCESS; }
@@ -7992,7 +7992,7 @@ static NTSTATUS wine_vkDestroyCuModuleNVX(void *args) { struct vkDestroyCuModuleNVX_params *params = args; TRACE("%p, 0x%s, %p\n", params->device, wine_dbgstr_longlong(params->module), params->pAllocator); - params->device->funcs.p_vkDestroyCuModuleNVX(params->device->device, params->module, NULL); + wine_device_from_handle(params->device)->funcs.p_vkDestroyCuModuleNVX(wine_device_from_handle(params->device)->device, params->module, NULL); return STATUS_SUCCESS; }
@@ -8000,7 +8000,7 @@ static NTSTATUS wine_vkDestroyDeferredOperationKHR(void *args) { struct vkDestroyDeferredOperationKHR_params *params = args; TRACE("%p, 0x%s, %p\n", params->device, wine_dbgstr_longlong(params->operation), params->pAllocator); - params->device->funcs.p_vkDestroyDeferredOperationKHR(params->device->device, params->operation, NULL); + wine_device_from_handle(params->device)->funcs.p_vkDestroyDeferredOperationKHR(wine_device_from_handle(params->device)->device, params->operation, NULL); return STATUS_SUCCESS; }
@@ -8008,7 +8008,7 @@ static NTSTATUS wine_vkDestroyDescriptorPool(void *args) { struct vkDestroyDescriptorPool_params *params = args; TRACE("%p, 0x%s, %p\n", params->device, wine_dbgstr_longlong(params->descriptorPool), params->pAllocator); - params->device->funcs.p_vkDestroyDescriptorPool(params->device->device, params->descriptorPool, NULL); + wine_device_from_handle(params->device)->funcs.p_vkDestroyDescriptorPool(wine_device_from_handle(params->device)->device, params->descriptorPool, NULL); return STATUS_SUCCESS; }
@@ -8016,7 +8016,7 @@ static NTSTATUS wine_vkDestroyDescriptorSetLayout(void *args) { struct vkDestroyDescriptorSetLayout_params *params = args; TRACE("%p, 0x%s, %p\n", params->device, wine_dbgstr_longlong(params->descriptorSetLayout), params->pAllocator); - params->device->funcs.p_vkDestroyDescriptorSetLayout(params->device->device, params->descriptorSetLayout, NULL); + wine_device_from_handle(params->device)->funcs.p_vkDestroyDescriptorSetLayout(wine_device_from_handle(params->device)->device, params->descriptorSetLayout, NULL); return STATUS_SUCCESS; }
@@ -8024,7 +8024,7 @@ static NTSTATUS wine_vkDestroyDescriptorUpdateTemplate(void *args) { struct vkDestroyDescriptorUpdateTemplate_params *params = args; TRACE("%p, 0x%s, %p\n", params->device, wine_dbgstr_longlong(params->descriptorUpdateTemplate), params->pAllocator); - params->device->funcs.p_vkDestroyDescriptorUpdateTemplate(params->device->device, params->descriptorUpdateTemplate, NULL); + wine_device_from_handle(params->device)->funcs.p_vkDestroyDescriptorUpdateTemplate(wine_device_from_handle(params->device)->device, params->descriptorUpdateTemplate, NULL); return STATUS_SUCCESS; }
@@ -8032,7 +8032,7 @@ static NTSTATUS wine_vkDestroyDescriptorUpdateTemplateKHR(void *args) { struct vkDestroyDescriptorUpdateTemplateKHR_params *params = args; TRACE("%p, 0x%s, %p\n", params->device, wine_dbgstr_longlong(params->descriptorUpdateTemplate), params->pAllocator); - params->device->funcs.p_vkDestroyDescriptorUpdateTemplateKHR(params->device->device, params->descriptorUpdateTemplate, NULL); + wine_device_from_handle(params->device)->funcs.p_vkDestroyDescriptorUpdateTemplateKHR(wine_device_from_handle(params->device)->device, params->descriptorUpdateTemplate, NULL); return STATUS_SUCCESS; }
@@ -8040,7 +8040,7 @@ static NTSTATUS wine_vkDestroyEvent(void *args) { struct vkDestroyEvent_params *params = args; TRACE("%p, 0x%s, %p\n", params->device, wine_dbgstr_longlong(params->event), params->pAllocator); - params->device->funcs.p_vkDestroyEvent(params->device->device, params->event, NULL); + wine_device_from_handle(params->device)->funcs.p_vkDestroyEvent(wine_device_from_handle(params->device)->device, params->event, NULL); return STATUS_SUCCESS; }
@@ -8048,7 +8048,7 @@ static NTSTATUS wine_vkDestroyFence(void *args) { struct vkDestroyFence_params *params = args; TRACE("%p, 0x%s, %p\n", params->device, wine_dbgstr_longlong(params->fence), params->pAllocator); - params->device->funcs.p_vkDestroyFence(params->device->device, params->fence, NULL); + wine_device_from_handle(params->device)->funcs.p_vkDestroyFence(wine_device_from_handle(params->device)->device, params->fence, NULL); return STATUS_SUCCESS; }
@@ -8056,7 +8056,7 @@ static NTSTATUS wine_vkDestroyFramebuffer(void *args) { struct vkDestroyFramebuffer_params *params = args; TRACE("%p, 0x%s, %p\n", params->device, wine_dbgstr_longlong(params->framebuffer), params->pAllocator); - params->device->funcs.p_vkDestroyFramebuffer(params->device->device, params->framebuffer, NULL); + wine_device_from_handle(params->device)->funcs.p_vkDestroyFramebuffer(wine_device_from_handle(params->device)->device, params->framebuffer, NULL); return STATUS_SUCCESS; }
@@ -8064,7 +8064,7 @@ static NTSTATUS wine_vkDestroyImage(void *args) { struct vkDestroyImage_params *params = args; TRACE("%p, 0x%s, %p\n", params->device, wine_dbgstr_longlong(params->image), params->pAllocator); - params->device->funcs.p_vkDestroyImage(params->device->device, params->image, NULL); + wine_device_from_handle(params->device)->funcs.p_vkDestroyImage(wine_device_from_handle(params->device)->device, params->image, NULL); return STATUS_SUCCESS; }
@@ -8072,7 +8072,7 @@ static NTSTATUS wine_vkDestroyImageView(void *args) { struct vkDestroyImageView_params *params = args; TRACE("%p, 0x%s, %p\n", params->device, wine_dbgstr_longlong(params->imageView), params->pAllocator); - params->device->funcs.p_vkDestroyImageView(params->device->device, params->imageView, NULL); + wine_device_from_handle(params->device)->funcs.p_vkDestroyImageView(wine_device_from_handle(params->device)->device, params->imageView, NULL); return STATUS_SUCCESS; }
@@ -8080,7 +8080,7 @@ static NTSTATUS wine_vkDestroyIndirectCommandsLayoutNV(void *args) { struct vkDestroyIndirectCommandsLayoutNV_params *params = args; TRACE("%p, 0x%s, %p\n", params->device, wine_dbgstr_longlong(params->indirectCommandsLayout), params->pAllocator); - params->device->funcs.p_vkDestroyIndirectCommandsLayoutNV(params->device->device, params->indirectCommandsLayout, NULL); + wine_device_from_handle(params->device)->funcs.p_vkDestroyIndirectCommandsLayoutNV(wine_device_from_handle(params->device)->device, params->indirectCommandsLayout, NULL); return STATUS_SUCCESS; }
@@ -8088,7 +8088,7 @@ static NTSTATUS wine_vkDestroyPipeline(void *args) { struct vkDestroyPipeline_params *params = args; TRACE("%p, 0x%s, %p\n", params->device, wine_dbgstr_longlong(params->pipeline), params->pAllocator); - params->device->funcs.p_vkDestroyPipeline(params->device->device, params->pipeline, NULL); + wine_device_from_handle(params->device)->funcs.p_vkDestroyPipeline(wine_device_from_handle(params->device)->device, params->pipeline, NULL); return STATUS_SUCCESS; }
@@ -8096,7 +8096,7 @@ static NTSTATUS wine_vkDestroyPipelineCache(void *args) { struct vkDestroyPipelineCache_params *params = args; TRACE("%p, 0x%s, %p\n", params->device, wine_dbgstr_longlong(params->pipelineCache), params->pAllocator); - params->device->funcs.p_vkDestroyPipelineCache(params->device->device, params->pipelineCache, NULL); + wine_device_from_handle(params->device)->funcs.p_vkDestroyPipelineCache(wine_device_from_handle(params->device)->device, params->pipelineCache, NULL); return STATUS_SUCCESS; }
@@ -8104,7 +8104,7 @@ static NTSTATUS wine_vkDestroyPipelineLayout(void *args) { struct vkDestroyPipelineLayout_params *params = args; TRACE("%p, 0x%s, %p\n", params->device, wine_dbgstr_longlong(params->pipelineLayout), params->pAllocator); - params->device->funcs.p_vkDestroyPipelineLayout(params->device->device, params->pipelineLayout, NULL); + wine_device_from_handle(params->device)->funcs.p_vkDestroyPipelineLayout(wine_device_from_handle(params->device)->device, params->pipelineLayout, NULL); return STATUS_SUCCESS; }
@@ -8112,7 +8112,7 @@ static NTSTATUS wine_vkDestroyPrivateDataSlot(void *args) { struct vkDestroyPrivateDataSlot_params *params = args; TRACE("%p, 0x%s, %p\n", params->device, wine_dbgstr_longlong(params->privateDataSlot), params->pAllocator); - params->device->funcs.p_vkDestroyPrivateDataSlot(params->device->device, params->privateDataSlot, NULL); + wine_device_from_handle(params->device)->funcs.p_vkDestroyPrivateDataSlot(wine_device_from_handle(params->device)->device, params->privateDataSlot, NULL); return STATUS_SUCCESS; }
@@ -8120,7 +8120,7 @@ static NTSTATUS wine_vkDestroyPrivateDataSlotEXT(void *args) { struct vkDestroyPrivateDataSlotEXT_params *params = args; TRACE("%p, 0x%s, %p\n", params->device, wine_dbgstr_longlong(params->privateDataSlot), params->pAllocator); - params->device->funcs.p_vkDestroyPrivateDataSlotEXT(params->device->device, params->privateDataSlot, NULL); + wine_device_from_handle(params->device)->funcs.p_vkDestroyPrivateDataSlotEXT(wine_device_from_handle(params->device)->device, params->privateDataSlot, NULL); return STATUS_SUCCESS; }
@@ -8128,7 +8128,7 @@ static NTSTATUS wine_vkDestroyQueryPool(void *args) { struct vkDestroyQueryPool_params *params = args; TRACE("%p, 0x%s, %p\n", params->device, wine_dbgstr_longlong(params->queryPool), params->pAllocator); - params->device->funcs.p_vkDestroyQueryPool(params->device->device, params->queryPool, NULL); + wine_device_from_handle(params->device)->funcs.p_vkDestroyQueryPool(wine_device_from_handle(params->device)->device, params->queryPool, NULL); return STATUS_SUCCESS; }
@@ -8136,7 +8136,7 @@ static NTSTATUS wine_vkDestroyRenderPass(void *args) { struct vkDestroyRenderPass_params *params = args; TRACE("%p, 0x%s, %p\n", params->device, wine_dbgstr_longlong(params->renderPass), params->pAllocator); - params->device->funcs.p_vkDestroyRenderPass(params->device->device, params->renderPass, NULL); + wine_device_from_handle(params->device)->funcs.p_vkDestroyRenderPass(wine_device_from_handle(params->device)->device, params->renderPass, NULL); return STATUS_SUCCESS; }
@@ -8144,7 +8144,7 @@ static NTSTATUS wine_vkDestroySampler(void *args) { struct vkDestroySampler_params *params = args; TRACE("%p, 0x%s, %p\n", params->device, wine_dbgstr_longlong(params->sampler), params->pAllocator); - params->device->funcs.p_vkDestroySampler(params->device->device, params->sampler, NULL); + wine_device_from_handle(params->device)->funcs.p_vkDestroySampler(wine_device_from_handle(params->device)->device, params->sampler, NULL); return STATUS_SUCCESS; }
@@ -8152,7 +8152,7 @@ static NTSTATUS wine_vkDestroySamplerYcbcrConversion(void *args) { struct vkDestroySamplerYcbcrConversion_params *params = args; TRACE("%p, 0x%s, %p\n", params->device, wine_dbgstr_longlong(params->ycbcrConversion), params->pAllocator); - params->device->funcs.p_vkDestroySamplerYcbcrConversion(params->device->device, params->ycbcrConversion, NULL); + wine_device_from_handle(params->device)->funcs.p_vkDestroySamplerYcbcrConversion(wine_device_from_handle(params->device)->device, params->ycbcrConversion, NULL); return STATUS_SUCCESS; }
@@ -8160,7 +8160,7 @@ static NTSTATUS wine_vkDestroySamplerYcbcrConversionKHR(void *args) { struct vkDestroySamplerYcbcrConversionKHR_params *params = args; TRACE("%p, 0x%s, %p\n", params->device, wine_dbgstr_longlong(params->ycbcrConversion), params->pAllocator); - params->device->funcs.p_vkDestroySamplerYcbcrConversionKHR(params->device->device, params->ycbcrConversion, NULL); + wine_device_from_handle(params->device)->funcs.p_vkDestroySamplerYcbcrConversionKHR(wine_device_from_handle(params->device)->device, params->ycbcrConversion, NULL); return STATUS_SUCCESS; }
@@ -8168,7 +8168,7 @@ static NTSTATUS wine_vkDestroySemaphore(void *args) { struct vkDestroySemaphore_params *params = args; TRACE("%p, 0x%s, %p\n", params->device, wine_dbgstr_longlong(params->semaphore), params->pAllocator); - params->device->funcs.p_vkDestroySemaphore(params->device->device, params->semaphore, NULL); + wine_device_from_handle(params->device)->funcs.p_vkDestroySemaphore(wine_device_from_handle(params->device)->device, params->semaphore, NULL); return STATUS_SUCCESS; }
@@ -8176,7 +8176,7 @@ static NTSTATUS wine_vkDestroyShaderModule(void *args) { struct vkDestroyShaderModule_params *params = args; TRACE("%p, 0x%s, %p\n", params->device, wine_dbgstr_longlong(params->shaderModule), params->pAllocator); - params->device->funcs.p_vkDestroyShaderModule(params->device->device, params->shaderModule, NULL); + wine_device_from_handle(params->device)->funcs.p_vkDestroyShaderModule(wine_device_from_handle(params->device)->device, params->shaderModule, NULL); return STATUS_SUCCESS; }
@@ -8184,7 +8184,7 @@ static NTSTATUS wine_vkDestroySwapchainKHR(void *args) { struct vkDestroySwapchainKHR_params *params = args; TRACE("%p, 0x%s, %p\n", params->device, wine_dbgstr_longlong(params->swapchain), params->pAllocator); - params->device->funcs.p_vkDestroySwapchainKHR(params->device->device, params->swapchain, NULL); + wine_device_from_handle(params->device)->funcs.p_vkDestroySwapchainKHR(wine_device_from_handle(params->device)->device, params->swapchain, NULL); return STATUS_SUCCESS; }
@@ -8192,7 +8192,7 @@ static NTSTATUS wine_vkDestroyValidationCacheEXT(void *args) { struct vkDestroyValidationCacheEXT_params *params = args; TRACE("%p, 0x%s, %p\n", params->device, wine_dbgstr_longlong(params->validationCache), params->pAllocator); - params->device->funcs.p_vkDestroyValidationCacheEXT(params->device->device, params->validationCache, NULL); + wine_device_from_handle(params->device)->funcs.p_vkDestroyValidationCacheEXT(wine_device_from_handle(params->device)->device, params->validationCache, NULL); return STATUS_SUCCESS; }
@@ -8200,7 +8200,7 @@ static NTSTATUS wine_vkDeviceWaitIdle(void *args) { struct vkDeviceWaitIdle_params *params = args; TRACE("%p\n", params->device); - return params->device->funcs.p_vkDeviceWaitIdle(params->device->device); + return wine_device_from_handle(params->device)->funcs.p_vkDeviceWaitIdle(wine_device_from_handle(params->device)->device); }
static NTSTATUS wine_vkEndCommandBuffer(void *args) @@ -8226,13 +8226,13 @@ static NTSTATUS wine_vkFlushMappedMemoryRanges(void *args) TRACE("%p, %u, %p\n", params->device, params->memoryRangeCount, params->pMemoryRanges);
pMemoryRanges_host = convert_VkMappedMemoryRange_array_win_to_host(params->pMemoryRanges, params->memoryRangeCount); - result = params->device->funcs.p_vkFlushMappedMemoryRanges(params->device->device, params->memoryRangeCount, pMemoryRanges_host); + result = wine_device_from_handle(params->device)->funcs.p_vkFlushMappedMemoryRanges(wine_device_from_handle(params->device)->device, params->memoryRangeCount, pMemoryRanges_host);
free_VkMappedMemoryRange_array(pMemoryRanges_host, params->memoryRangeCount); return result; #else TRACE("%p, %u, %p\n", params->device, params->memoryRangeCount, params->pMemoryRanges); - return params->device->funcs.p_vkFlushMappedMemoryRanges(params->device->device, params->memoryRangeCount, params->pMemoryRanges); + return wine_device_from_handle(params->device)->funcs.p_vkFlushMappedMemoryRanges(wine_device_from_handle(params->device)->device, params->memoryRangeCount, params->pMemoryRanges); #endif }
@@ -8240,14 +8240,14 @@ static NTSTATUS wine_vkFreeDescriptorSets(void *args) { struct vkFreeDescriptorSets_params *params = args; TRACE("%p, 0x%s, %u, %p\n", params->device, wine_dbgstr_longlong(params->descriptorPool), params->descriptorSetCount, params->pDescriptorSets); - return params->device->funcs.p_vkFreeDescriptorSets(params->device->device, params->descriptorPool, params->descriptorSetCount, params->pDescriptorSets); + return wine_device_from_handle(params->device)->funcs.p_vkFreeDescriptorSets(wine_device_from_handle(params->device)->device, params->descriptorPool, params->descriptorSetCount, params->pDescriptorSets); }
static NTSTATUS wine_vkFreeMemory(void *args) { struct vkFreeMemory_params *params = args; TRACE("%p, 0x%s, %p\n", params->device, wine_dbgstr_longlong(params->memory), params->pAllocator); - params->device->funcs.p_vkFreeMemory(params->device->device, params->memory, NULL); + wine_device_from_handle(params->device)->funcs.p_vkFreeMemory(wine_device_from_handle(params->device)->device, params->memory, NULL); return STATUS_SUCCESS; }
@@ -8261,12 +8261,12 @@ static NTSTATUS wine_vkGetAccelerationStructureBuildSizesKHR(void *args)
convert_VkAccelerationStructureBuildGeometryInfoKHR_win_to_host(params->pBuildInfo, &pBuildInfo_host); convert_VkAccelerationStructureBuildSizesInfoKHR_win_to_host(params->pSizeInfo, &pSizeInfo_host); - params->device->funcs.p_vkGetAccelerationStructureBuildSizesKHR(params->device->device, params->buildType, &pBuildInfo_host, params->pMaxPrimitiveCounts, &pSizeInfo_host); + wine_device_from_handle(params->device)->funcs.p_vkGetAccelerationStructureBuildSizesKHR(wine_device_from_handle(params->device)->device, params->buildType, &pBuildInfo_host, params->pMaxPrimitiveCounts, &pSizeInfo_host);
return STATUS_SUCCESS; #else TRACE("%p, %#x, %p, %p, %p\n", params->device, params->buildType, params->pBuildInfo, params->pMaxPrimitiveCounts, params->pSizeInfo); - params->device->funcs.p_vkGetAccelerationStructureBuildSizesKHR(params->device->device, params->buildType, params->pBuildInfo, params->pMaxPrimitiveCounts, params->pSizeInfo); + wine_device_from_handle(params->device)->funcs.p_vkGetAccelerationStructureBuildSizesKHR(wine_device_from_handle(params->device)->device, params->buildType, params->pBuildInfo, params->pMaxPrimitiveCounts, params->pSizeInfo); return STATUS_SUCCESS; #endif } @@ -8279,12 +8279,12 @@ static NTSTATUS wine_vkGetAccelerationStructureDeviceAddressKHR(void *args) TRACE("%p, %p\n", params->device, params->pInfo);
convert_VkAccelerationStructureDeviceAddressInfoKHR_win_to_host(params->pInfo, &pInfo_host); - params->result = params->device->funcs.p_vkGetAccelerationStructureDeviceAddressKHR(params->device->device, &pInfo_host); + params->result = wine_device_from_handle(params->device)->funcs.p_vkGetAccelerationStructureDeviceAddressKHR(wine_device_from_handle(params->device)->device, &pInfo_host);
return STATUS_SUCCESS; #else TRACE("%p, %p\n", params->device, params->pInfo); - params->result = params->device->funcs.p_vkGetAccelerationStructureDeviceAddressKHR(params->device->device, params->pInfo); + params->result = wine_device_from_handle(params->device)->funcs.p_vkGetAccelerationStructureDeviceAddressKHR(wine_device_from_handle(params->device)->device, params->pInfo); return STATUS_SUCCESS; #endif } @@ -8293,7 +8293,7 @@ static NTSTATUS wine_vkGetAccelerationStructureHandleNV(void *args) { struct vkGetAccelerationStructureHandleNV_params *params = args; TRACE("%p, 0x%s, 0x%s, %p\n", params->device, wine_dbgstr_longlong(params->accelerationStructure), wine_dbgstr_longlong(params->dataSize), params->pData); - return params->device->funcs.p_vkGetAccelerationStructureHandleNV(params->device->device, params->accelerationStructure, params->dataSize, params->pData); + return wine_device_from_handle(params->device)->funcs.p_vkGetAccelerationStructureHandleNV(wine_device_from_handle(params->device)->device, params->accelerationStructure, params->dataSize, params->pData); }
static NTSTATUS wine_vkGetAccelerationStructureMemoryRequirementsNV(void *args) @@ -8306,13 +8306,13 @@ static NTSTATUS wine_vkGetAccelerationStructureMemoryRequirementsNV(void *args)
convert_VkAccelerationStructureMemoryRequirementsInfoNV_win_to_host(params->pInfo, &pInfo_host); convert_VkMemoryRequirements2KHR_win_to_host(params->pMemoryRequirements, &pMemoryRequirements_host); - params->device->funcs.p_vkGetAccelerationStructureMemoryRequirementsNV(params->device->device, &pInfo_host, &pMemoryRequirements_host); + wine_device_from_handle(params->device)->funcs.p_vkGetAccelerationStructureMemoryRequirementsNV(wine_device_from_handle(params->device)->device, &pInfo_host, &pMemoryRequirements_host);
convert_VkMemoryRequirements2KHR_host_to_win(&pMemoryRequirements_host, params->pMemoryRequirements); return STATUS_SUCCESS; #else TRACE("%p, %p, %p\n", params->device, params->pInfo, params->pMemoryRequirements); - params->device->funcs.p_vkGetAccelerationStructureMemoryRequirementsNV(params->device->device, params->pInfo, params->pMemoryRequirements); + wine_device_from_handle(params->device)->funcs.p_vkGetAccelerationStructureMemoryRequirementsNV(wine_device_from_handle(params->device)->device, params->pInfo, params->pMemoryRequirements); return STATUS_SUCCESS; #endif } @@ -8325,12 +8325,12 @@ static NTSTATUS wine_vkGetBufferDeviceAddress(void *args) TRACE("%p, %p\n", params->device, params->pInfo);
convert_VkBufferDeviceAddressInfo_win_to_host(params->pInfo, &pInfo_host); - params->result = params->device->funcs.p_vkGetBufferDeviceAddress(params->device->device, &pInfo_host); + params->result = wine_device_from_handle(params->device)->funcs.p_vkGetBufferDeviceAddress(wine_device_from_handle(params->device)->device, &pInfo_host);
return STATUS_SUCCESS; #else TRACE("%p, %p\n", params->device, params->pInfo); - params->result = params->device->funcs.p_vkGetBufferDeviceAddress(params->device->device, params->pInfo); + params->result = wine_device_from_handle(params->device)->funcs.p_vkGetBufferDeviceAddress(wine_device_from_handle(params->device)->device, params->pInfo); return STATUS_SUCCESS; #endif } @@ -8343,12 +8343,12 @@ static NTSTATUS wine_vkGetBufferDeviceAddressEXT(void *args) TRACE("%p, %p\n", params->device, params->pInfo);
convert_VkBufferDeviceAddressInfo_win_to_host(params->pInfo, &pInfo_host); - params->result = params->device->funcs.p_vkGetBufferDeviceAddressEXT(params->device->device, &pInfo_host); + params->result = wine_device_from_handle(params->device)->funcs.p_vkGetBufferDeviceAddressEXT(wine_device_from_handle(params->device)->device, &pInfo_host);
return STATUS_SUCCESS; #else TRACE("%p, %p\n", params->device, params->pInfo); - params->result = params->device->funcs.p_vkGetBufferDeviceAddressEXT(params->device->device, params->pInfo); + params->result = wine_device_from_handle(params->device)->funcs.p_vkGetBufferDeviceAddressEXT(wine_device_from_handle(params->device)->device, params->pInfo); return STATUS_SUCCESS; #endif } @@ -8361,12 +8361,12 @@ static NTSTATUS wine_vkGetBufferDeviceAddressKHR(void *args) TRACE("%p, %p\n", params->device, params->pInfo);
convert_VkBufferDeviceAddressInfo_win_to_host(params->pInfo, &pInfo_host); - params->result = params->device->funcs.p_vkGetBufferDeviceAddressKHR(params->device->device, &pInfo_host); + params->result = wine_device_from_handle(params->device)->funcs.p_vkGetBufferDeviceAddressKHR(wine_device_from_handle(params->device)->device, &pInfo_host);
return STATUS_SUCCESS; #else TRACE("%p, %p\n", params->device, params->pInfo); - params->result = params->device->funcs.p_vkGetBufferDeviceAddressKHR(params->device->device, params->pInfo); + params->result = wine_device_from_handle(params->device)->funcs.p_vkGetBufferDeviceAddressKHR(wine_device_from_handle(params->device)->device, params->pInfo); return STATUS_SUCCESS; #endif } @@ -8378,13 +8378,13 @@ static NTSTATUS wine_vkGetBufferMemoryRequirements(void *args) VkMemoryRequirements_host pMemoryRequirements_host; TRACE("%p, 0x%s, %p\n", params->device, wine_dbgstr_longlong(params->buffer), params->pMemoryRequirements);
- params->device->funcs.p_vkGetBufferMemoryRequirements(params->device->device, params->buffer, &pMemoryRequirements_host); + wine_device_from_handle(params->device)->funcs.p_vkGetBufferMemoryRequirements(wine_device_from_handle(params->device)->device, params->buffer, &pMemoryRequirements_host);
convert_VkMemoryRequirements_host_to_win(&pMemoryRequirements_host, params->pMemoryRequirements); return STATUS_SUCCESS; #else TRACE("%p, 0x%s, %p\n", params->device, wine_dbgstr_longlong(params->buffer), params->pMemoryRequirements); - params->device->funcs.p_vkGetBufferMemoryRequirements(params->device->device, params->buffer, params->pMemoryRequirements); + wine_device_from_handle(params->device)->funcs.p_vkGetBufferMemoryRequirements(wine_device_from_handle(params->device)->device, params->buffer, params->pMemoryRequirements); return STATUS_SUCCESS; #endif } @@ -8399,13 +8399,13 @@ static NTSTATUS wine_vkGetBufferMemoryRequirements2(void *args)
convert_VkBufferMemoryRequirementsInfo2_win_to_host(params->pInfo, &pInfo_host); convert_VkMemoryRequirements2_win_to_host(params->pMemoryRequirements, &pMemoryRequirements_host); - params->device->funcs.p_vkGetBufferMemoryRequirements2(params->device->device, &pInfo_host, &pMemoryRequirements_host); + wine_device_from_handle(params->device)->funcs.p_vkGetBufferMemoryRequirements2(wine_device_from_handle(params->device)->device, &pInfo_host, &pMemoryRequirements_host);
convert_VkMemoryRequirements2_host_to_win(&pMemoryRequirements_host, params->pMemoryRequirements); return STATUS_SUCCESS; #else TRACE("%p, %p, %p\n", params->device, params->pInfo, params->pMemoryRequirements); - params->device->funcs.p_vkGetBufferMemoryRequirements2(params->device->device, params->pInfo, params->pMemoryRequirements); + wine_device_from_handle(params->device)->funcs.p_vkGetBufferMemoryRequirements2(wine_device_from_handle(params->device)->device, params->pInfo, params->pMemoryRequirements); return STATUS_SUCCESS; #endif } @@ -8420,13 +8420,13 @@ static NTSTATUS wine_vkGetBufferMemoryRequirements2KHR(void *args)
convert_VkBufferMemoryRequirementsInfo2_win_to_host(params->pInfo, &pInfo_host); convert_VkMemoryRequirements2_win_to_host(params->pMemoryRequirements, &pMemoryRequirements_host); - params->device->funcs.p_vkGetBufferMemoryRequirements2KHR(params->device->device, &pInfo_host, &pMemoryRequirements_host); + wine_device_from_handle(params->device)->funcs.p_vkGetBufferMemoryRequirements2KHR(wine_device_from_handle(params->device)->device, &pInfo_host, &pMemoryRequirements_host);
convert_VkMemoryRequirements2_host_to_win(&pMemoryRequirements_host, params->pMemoryRequirements); return STATUS_SUCCESS; #else TRACE("%p, %p, %p\n", params->device, params->pInfo, params->pMemoryRequirements); - params->device->funcs.p_vkGetBufferMemoryRequirements2KHR(params->device->device, params->pInfo, params->pMemoryRequirements); + wine_device_from_handle(params->device)->funcs.p_vkGetBufferMemoryRequirements2KHR(wine_device_from_handle(params->device)->device, params->pInfo, params->pMemoryRequirements); return STATUS_SUCCESS; #endif } @@ -8439,12 +8439,12 @@ static NTSTATUS wine_vkGetBufferOpaqueCaptureAddress(void *args) TRACE("%p, %p\n", params->device, params->pInfo);
convert_VkBufferDeviceAddressInfo_win_to_host(params->pInfo, &pInfo_host); - params->result = params->device->funcs.p_vkGetBufferOpaqueCaptureAddress(params->device->device, &pInfo_host); + params->result = wine_device_from_handle(params->device)->funcs.p_vkGetBufferOpaqueCaptureAddress(wine_device_from_handle(params->device)->device, &pInfo_host);
return STATUS_SUCCESS; #else TRACE("%p, %p\n", params->device, params->pInfo); - params->result = params->device->funcs.p_vkGetBufferOpaqueCaptureAddress(params->device->device, params->pInfo); + params->result = wine_device_from_handle(params->device)->funcs.p_vkGetBufferOpaqueCaptureAddress(wine_device_from_handle(params->device)->device, params->pInfo); return STATUS_SUCCESS; #endif } @@ -8457,12 +8457,12 @@ static NTSTATUS wine_vkGetBufferOpaqueCaptureAddressKHR(void *args) TRACE("%p, %p\n", params->device, params->pInfo);
convert_VkBufferDeviceAddressInfo_win_to_host(params->pInfo, &pInfo_host); - params->result = params->device->funcs.p_vkGetBufferOpaqueCaptureAddressKHR(params->device->device, &pInfo_host); + params->result = wine_device_from_handle(params->device)->funcs.p_vkGetBufferOpaqueCaptureAddressKHR(wine_device_from_handle(params->device)->device, &pInfo_host);
return STATUS_SUCCESS; #else TRACE("%p, %p\n", params->device, params->pInfo); - params->result = params->device->funcs.p_vkGetBufferOpaqueCaptureAddressKHR(params->device->device, params->pInfo); + params->result = wine_device_from_handle(params->device)->funcs.p_vkGetBufferOpaqueCaptureAddressKHR(wine_device_from_handle(params->device)->device, params->pInfo); return STATUS_SUCCESS; #endif } @@ -8471,21 +8471,21 @@ static NTSTATUS wine_vkGetDeferredOperationMaxConcurrencyKHR(void *args) { struct vkGetDeferredOperationMaxConcurrencyKHR_params *params = args; TRACE("%p, 0x%s\n", params->device, wine_dbgstr_longlong(params->operation)); - return params->device->funcs.p_vkGetDeferredOperationMaxConcurrencyKHR(params->device->device, params->operation); + return wine_device_from_handle(params->device)->funcs.p_vkGetDeferredOperationMaxConcurrencyKHR(wine_device_from_handle(params->device)->device, params->operation); }
static NTSTATUS wine_vkGetDeferredOperationResultKHR(void *args) { struct vkGetDeferredOperationResultKHR_params *params = args; TRACE("%p, 0x%s\n", params->device, wine_dbgstr_longlong(params->operation)); - return params->device->funcs.p_vkGetDeferredOperationResultKHR(params->device->device, params->operation); + return wine_device_from_handle(params->device)->funcs.p_vkGetDeferredOperationResultKHR(wine_device_from_handle(params->device)->device, params->operation); }
static NTSTATUS wine_vkGetDescriptorSetHostMappingVALVE(void *args) { struct vkGetDescriptorSetHostMappingVALVE_params *params = args; TRACE("%p, 0x%s, %p\n", params->device, wine_dbgstr_longlong(params->descriptorSet), params->ppData); - params->device->funcs.p_vkGetDescriptorSetHostMappingVALVE(params->device->device, params->descriptorSet, params->ppData); + wine_device_from_handle(params->device)->funcs.p_vkGetDescriptorSetHostMappingVALVE(wine_device_from_handle(params->device)->device, params->descriptorSet, params->ppData); return STATUS_SUCCESS; }
@@ -8497,12 +8497,12 @@ static NTSTATUS wine_vkGetDescriptorSetLayoutHostMappingInfoVALVE(void *args) TRACE("%p, %p, %p\n", params->device, params->pBindingReference, params->pHostMapping);
convert_VkDescriptorSetBindingReferenceVALVE_win_to_host(params->pBindingReference, &pBindingReference_host); - params->device->funcs.p_vkGetDescriptorSetLayoutHostMappingInfoVALVE(params->device->device, &pBindingReference_host, params->pHostMapping); + wine_device_from_handle(params->device)->funcs.p_vkGetDescriptorSetLayoutHostMappingInfoVALVE(wine_device_from_handle(params->device)->device, &pBindingReference_host, params->pHostMapping);
return STATUS_SUCCESS; #else TRACE("%p, %p, %p\n", params->device, params->pBindingReference, params->pHostMapping); - params->device->funcs.p_vkGetDescriptorSetLayoutHostMappingInfoVALVE(params->device->device, params->pBindingReference, params->pHostMapping); + wine_device_from_handle(params->device)->funcs.p_vkGetDescriptorSetLayoutHostMappingInfoVALVE(wine_device_from_handle(params->device)->device, params->pBindingReference, params->pHostMapping); return STATUS_SUCCESS; #endif } @@ -8511,7 +8511,7 @@ static NTSTATUS wine_vkGetDescriptorSetLayoutSupport(void *args) { struct vkGetDescriptorSetLayoutSupport_params *params = args; TRACE("%p, %p, %p\n", params->device, params->pCreateInfo, params->pSupport); - params->device->funcs.p_vkGetDescriptorSetLayoutSupport(params->device->device, params->pCreateInfo, params->pSupport); + wine_device_from_handle(params->device)->funcs.p_vkGetDescriptorSetLayoutSupport(wine_device_from_handle(params->device)->device, params->pCreateInfo, params->pSupport); return STATUS_SUCCESS; }
@@ -8519,7 +8519,7 @@ static NTSTATUS wine_vkGetDescriptorSetLayoutSupportKHR(void *args) { struct vkGetDescriptorSetLayoutSupportKHR_params *params = args; TRACE("%p, %p, %p\n", params->device, params->pCreateInfo, params->pSupport); - params->device->funcs.p_vkGetDescriptorSetLayoutSupportKHR(params->device->device, params->pCreateInfo, params->pSupport); + wine_device_from_handle(params->device)->funcs.p_vkGetDescriptorSetLayoutSupportKHR(wine_device_from_handle(params->device)->device, params->pCreateInfo, params->pSupport); return STATUS_SUCCESS; }
@@ -8527,7 +8527,7 @@ static NTSTATUS wine_vkGetDeviceAccelerationStructureCompatibilityKHR(void *args { struct vkGetDeviceAccelerationStructureCompatibilityKHR_params *params = args; TRACE("%p, %p, %p\n", params->device, params->pVersionInfo, params->pCompatibility); - params->device->funcs.p_vkGetDeviceAccelerationStructureCompatibilityKHR(params->device->device, params->pVersionInfo, params->pCompatibility); + wine_device_from_handle(params->device)->funcs.p_vkGetDeviceAccelerationStructureCompatibilityKHR(wine_device_from_handle(params->device)->device, params->pVersionInfo, params->pCompatibility); return STATUS_SUCCESS; }
@@ -8541,14 +8541,14 @@ static NTSTATUS wine_vkGetDeviceBufferMemoryRequirements(void *args)
convert_VkDeviceBufferMemoryRequirements_win_to_host(params->pInfo, &pInfo_host); convert_VkMemoryRequirements2_win_to_host(params->pMemoryRequirements, &pMemoryRequirements_host); - params->device->funcs.p_vkGetDeviceBufferMemoryRequirements(params->device->device, &pInfo_host, &pMemoryRequirements_host); + wine_device_from_handle(params->device)->funcs.p_vkGetDeviceBufferMemoryRequirements(wine_device_from_handle(params->device)->device, &pInfo_host, &pMemoryRequirements_host);
convert_VkMemoryRequirements2_host_to_win(&pMemoryRequirements_host, params->pMemoryRequirements); free_VkDeviceBufferMemoryRequirements(&pInfo_host); return STATUS_SUCCESS; #else TRACE("%p, %p, %p\n", params->device, params->pInfo, params->pMemoryRequirements); - params->device->funcs.p_vkGetDeviceBufferMemoryRequirements(params->device->device, params->pInfo, params->pMemoryRequirements); + wine_device_from_handle(params->device)->funcs.p_vkGetDeviceBufferMemoryRequirements(wine_device_from_handle(params->device)->device, params->pInfo, params->pMemoryRequirements); return STATUS_SUCCESS; #endif } @@ -8563,14 +8563,14 @@ static NTSTATUS wine_vkGetDeviceBufferMemoryRequirementsKHR(void *args)
convert_VkDeviceBufferMemoryRequirements_win_to_host(params->pInfo, &pInfo_host); convert_VkMemoryRequirements2_win_to_host(params->pMemoryRequirements, &pMemoryRequirements_host); - params->device->funcs.p_vkGetDeviceBufferMemoryRequirementsKHR(params->device->device, &pInfo_host, &pMemoryRequirements_host); + wine_device_from_handle(params->device)->funcs.p_vkGetDeviceBufferMemoryRequirementsKHR(wine_device_from_handle(params->device)->device, &pInfo_host, &pMemoryRequirements_host);
convert_VkMemoryRequirements2_host_to_win(&pMemoryRequirements_host, params->pMemoryRequirements); free_VkDeviceBufferMemoryRequirements(&pInfo_host); return STATUS_SUCCESS; #else TRACE("%p, %p, %p\n", params->device, params->pInfo, params->pMemoryRequirements); - params->device->funcs.p_vkGetDeviceBufferMemoryRequirementsKHR(params->device->device, params->pInfo, params->pMemoryRequirements); + wine_device_from_handle(params->device)->funcs.p_vkGetDeviceBufferMemoryRequirementsKHR(wine_device_from_handle(params->device)->device, params->pInfo, params->pMemoryRequirements); return STATUS_SUCCESS; #endif } @@ -8579,7 +8579,7 @@ static NTSTATUS wine_vkGetDeviceGroupPeerMemoryFeatures(void *args) { struct vkGetDeviceGroupPeerMemoryFeatures_params *params = args; TRACE("%p, %u, %u, %u, %p\n", params->device, params->heapIndex, params->localDeviceIndex, params->remoteDeviceIndex, params->pPeerMemoryFeatures); - params->device->funcs.p_vkGetDeviceGroupPeerMemoryFeatures(params->device->device, params->heapIndex, params->localDeviceIndex, params->remoteDeviceIndex, params->pPeerMemoryFeatures); + wine_device_from_handle(params->device)->funcs.p_vkGetDeviceGroupPeerMemoryFeatures(wine_device_from_handle(params->device)->device, params->heapIndex, params->localDeviceIndex, params->remoteDeviceIndex, params->pPeerMemoryFeatures); return STATUS_SUCCESS; }
@@ -8587,7 +8587,7 @@ static NTSTATUS wine_vkGetDeviceGroupPeerMemoryFeaturesKHR(void *args) { struct vkGetDeviceGroupPeerMemoryFeaturesKHR_params *params = args; TRACE("%p, %u, %u, %u, %p\n", params->device, params->heapIndex, params->localDeviceIndex, params->remoteDeviceIndex, params->pPeerMemoryFeatures); - params->device->funcs.p_vkGetDeviceGroupPeerMemoryFeaturesKHR(params->device->device, params->heapIndex, params->localDeviceIndex, params->remoteDeviceIndex, params->pPeerMemoryFeatures); + wine_device_from_handle(params->device)->funcs.p_vkGetDeviceGroupPeerMemoryFeaturesKHR(wine_device_from_handle(params->device)->device, params->heapIndex, params->localDeviceIndex, params->remoteDeviceIndex, params->pPeerMemoryFeatures); return STATUS_SUCCESS; }
@@ -8595,14 +8595,14 @@ static NTSTATUS wine_vkGetDeviceGroupPresentCapabilitiesKHR(void *args) { struct vkGetDeviceGroupPresentCapabilitiesKHR_params *params = args; TRACE("%p, %p\n", params->device, params->pDeviceGroupPresentCapabilities); - return params->device->funcs.p_vkGetDeviceGroupPresentCapabilitiesKHR(params->device->device, params->pDeviceGroupPresentCapabilities); + return wine_device_from_handle(params->device)->funcs.p_vkGetDeviceGroupPresentCapabilitiesKHR(wine_device_from_handle(params->device)->device, params->pDeviceGroupPresentCapabilities); }
static NTSTATUS wine_vkGetDeviceGroupSurfacePresentModesKHR(void *args) { struct vkGetDeviceGroupSurfacePresentModesKHR_params *params = args; TRACE("%p, 0x%s, %p\n", params->device, wine_dbgstr_longlong(params->surface), params->pModes); - return params->device->funcs.p_vkGetDeviceGroupSurfacePresentModesKHR(params->device->device, wine_surface_from_handle(params->surface)->driver_surface, params->pModes); + return wine_device_from_handle(params->device)->funcs.p_vkGetDeviceGroupSurfacePresentModesKHR(wine_device_from_handle(params->device)->device, wine_surface_from_handle(params->surface)->driver_surface, params->pModes); }
static NTSTATUS wine_vkGetDeviceImageMemoryRequirements(void *args) @@ -8613,13 +8613,13 @@ static NTSTATUS wine_vkGetDeviceImageMemoryRequirements(void *args) TRACE("%p, %p, %p\n", params->device, params->pInfo, params->pMemoryRequirements);
convert_VkMemoryRequirements2_win_to_host(params->pMemoryRequirements, &pMemoryRequirements_host); - params->device->funcs.p_vkGetDeviceImageMemoryRequirements(params->device->device, params->pInfo, &pMemoryRequirements_host); + wine_device_from_handle(params->device)->funcs.p_vkGetDeviceImageMemoryRequirements(wine_device_from_handle(params->device)->device, params->pInfo, &pMemoryRequirements_host);
convert_VkMemoryRequirements2_host_to_win(&pMemoryRequirements_host, params->pMemoryRequirements); return STATUS_SUCCESS; #else TRACE("%p, %p, %p\n", params->device, params->pInfo, params->pMemoryRequirements); - params->device->funcs.p_vkGetDeviceImageMemoryRequirements(params->device->device, params->pInfo, params->pMemoryRequirements); + wine_device_from_handle(params->device)->funcs.p_vkGetDeviceImageMemoryRequirements(wine_device_from_handle(params->device)->device, params->pInfo, params->pMemoryRequirements); return STATUS_SUCCESS; #endif } @@ -8632,13 +8632,13 @@ static NTSTATUS wine_vkGetDeviceImageMemoryRequirementsKHR(void *args) TRACE("%p, %p, %p\n", params->device, params->pInfo, params->pMemoryRequirements);
convert_VkMemoryRequirements2_win_to_host(params->pMemoryRequirements, &pMemoryRequirements_host); - params->device->funcs.p_vkGetDeviceImageMemoryRequirementsKHR(params->device->device, params->pInfo, &pMemoryRequirements_host); + wine_device_from_handle(params->device)->funcs.p_vkGetDeviceImageMemoryRequirementsKHR(wine_device_from_handle(params->device)->device, params->pInfo, &pMemoryRequirements_host);
convert_VkMemoryRequirements2_host_to_win(&pMemoryRequirements_host, params->pMemoryRequirements); return STATUS_SUCCESS; #else TRACE("%p, %p, %p\n", params->device, params->pInfo, params->pMemoryRequirements); - params->device->funcs.p_vkGetDeviceImageMemoryRequirementsKHR(params->device->device, params->pInfo, params->pMemoryRequirements); + wine_device_from_handle(params->device)->funcs.p_vkGetDeviceImageMemoryRequirementsKHR(wine_device_from_handle(params->device)->device, params->pInfo, params->pMemoryRequirements); return STATUS_SUCCESS; #endif } @@ -8647,7 +8647,7 @@ static NTSTATUS wine_vkGetDeviceImageSparseMemoryRequirements(void *args) { struct vkGetDeviceImageSparseMemoryRequirements_params *params = args; TRACE("%p, %p, %p, %p\n", params->device, params->pInfo, params->pSparseMemoryRequirementCount, params->pSparseMemoryRequirements); - params->device->funcs.p_vkGetDeviceImageSparseMemoryRequirements(params->device->device, params->pInfo, params->pSparseMemoryRequirementCount, params->pSparseMemoryRequirements); + wine_device_from_handle(params->device)->funcs.p_vkGetDeviceImageSparseMemoryRequirements(wine_device_from_handle(params->device)->device, params->pInfo, params->pSparseMemoryRequirementCount, params->pSparseMemoryRequirements); return STATUS_SUCCESS; }
@@ -8655,7 +8655,7 @@ static NTSTATUS wine_vkGetDeviceImageSparseMemoryRequirementsKHR(void *args) { struct vkGetDeviceImageSparseMemoryRequirementsKHR_params *params = args; TRACE("%p, %p, %p, %p\n", params->device, params->pInfo, params->pSparseMemoryRequirementCount, params->pSparseMemoryRequirements); - params->device->funcs.p_vkGetDeviceImageSparseMemoryRequirementsKHR(params->device->device, params->pInfo, params->pSparseMemoryRequirementCount, params->pSparseMemoryRequirements); + wine_device_from_handle(params->device)->funcs.p_vkGetDeviceImageSparseMemoryRequirementsKHR(wine_device_from_handle(params->device)->device, params->pInfo, params->pSparseMemoryRequirementCount, params->pSparseMemoryRequirements); return STATUS_SUCCESS; }
@@ -8663,7 +8663,7 @@ static NTSTATUS wine_vkGetDeviceMemoryCommitment(void *args) { struct vkGetDeviceMemoryCommitment_params *params = args; TRACE("%p, 0x%s, %p\n", params->device, wine_dbgstr_longlong(params->memory), params->pCommittedMemoryInBytes); - params->device->funcs.p_vkGetDeviceMemoryCommitment(params->device->device, params->memory, params->pCommittedMemoryInBytes); + wine_device_from_handle(params->device)->funcs.p_vkGetDeviceMemoryCommitment(wine_device_from_handle(params->device)->device, params->memory, params->pCommittedMemoryInBytes); return STATUS_SUCCESS; }
@@ -8675,12 +8675,12 @@ static NTSTATUS wine_vkGetDeviceMemoryOpaqueCaptureAddress(void *args) TRACE("%p, %p\n", params->device, params->pInfo);
convert_VkDeviceMemoryOpaqueCaptureAddressInfo_win_to_host(params->pInfo, &pInfo_host); - params->result = params->device->funcs.p_vkGetDeviceMemoryOpaqueCaptureAddress(params->device->device, &pInfo_host); + params->result = wine_device_from_handle(params->device)->funcs.p_vkGetDeviceMemoryOpaqueCaptureAddress(wine_device_from_handle(params->device)->device, &pInfo_host);
return STATUS_SUCCESS; #else TRACE("%p, %p\n", params->device, params->pInfo); - params->result = params->device->funcs.p_vkGetDeviceMemoryOpaqueCaptureAddress(params->device->device, params->pInfo); + params->result = wine_device_from_handle(params->device)->funcs.p_vkGetDeviceMemoryOpaqueCaptureAddress(wine_device_from_handle(params->device)->device, params->pInfo); return STATUS_SUCCESS; #endif } @@ -8693,12 +8693,12 @@ static NTSTATUS wine_vkGetDeviceMemoryOpaqueCaptureAddressKHR(void *args) TRACE("%p, %p\n", params->device, params->pInfo);
convert_VkDeviceMemoryOpaqueCaptureAddressInfo_win_to_host(params->pInfo, &pInfo_host); - params->result = params->device->funcs.p_vkGetDeviceMemoryOpaqueCaptureAddressKHR(params->device->device, &pInfo_host); + params->result = wine_device_from_handle(params->device)->funcs.p_vkGetDeviceMemoryOpaqueCaptureAddressKHR(wine_device_from_handle(params->device)->device, &pInfo_host);
return STATUS_SUCCESS; #else TRACE("%p, %p\n", params->device, params->pInfo); - params->result = params->device->funcs.p_vkGetDeviceMemoryOpaqueCaptureAddressKHR(params->device->device, params->pInfo); + params->result = wine_device_from_handle(params->device)->funcs.p_vkGetDeviceMemoryOpaqueCaptureAddressKHR(wine_device_from_handle(params->device)->device, params->pInfo); return STATUS_SUCCESS; #endif } @@ -8707,7 +8707,7 @@ static NTSTATUS wine_vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI(void *args) { struct vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI_params *params = args; TRACE("%p, 0x%s, %p\n", params->device, wine_dbgstr_longlong(params->renderpass), params->pMaxWorkgroupSize); - return params->device->funcs.p_vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI(params->device->device, params->renderpass, params->pMaxWorkgroupSize); + return wine_device_from_handle(params->device)->funcs.p_vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI(wine_device_from_handle(params->device)->device, params->renderpass, params->pMaxWorkgroupSize); }
static NTSTATUS wine_vkGetDynamicRenderingTilePropertiesQCOM(void *args) @@ -8719,13 +8719,13 @@ static NTSTATUS wine_vkGetDynamicRenderingTilePropertiesQCOM(void *args) TRACE("%p, %p, %p\n", params->device, params->pRenderingInfo, params->pProperties);
convert_VkRenderingInfo_win_to_host(params->pRenderingInfo, &pRenderingInfo_host); - result = params->device->funcs.p_vkGetDynamicRenderingTilePropertiesQCOM(params->device->device, &pRenderingInfo_host, params->pProperties); + result = wine_device_from_handle(params->device)->funcs.p_vkGetDynamicRenderingTilePropertiesQCOM(wine_device_from_handle(params->device)->device, &pRenderingInfo_host, params->pProperties);
free_VkRenderingInfo(&pRenderingInfo_host); return result; #else TRACE("%p, %p, %p\n", params->device, params->pRenderingInfo, params->pProperties); - return params->device->funcs.p_vkGetDynamicRenderingTilePropertiesQCOM(params->device->device, params->pRenderingInfo, params->pProperties); + return wine_device_from_handle(params->device)->funcs.p_vkGetDynamicRenderingTilePropertiesQCOM(wine_device_from_handle(params->device)->device, params->pRenderingInfo, params->pProperties); #endif }
@@ -8733,21 +8733,21 @@ static NTSTATUS wine_vkGetEventStatus(void *args) { struct vkGetEventStatus_params *params = args; TRACE("%p, 0x%s\n", params->device, wine_dbgstr_longlong(params->event)); - return params->device->funcs.p_vkGetEventStatus(params->device->device, params->event); + return wine_device_from_handle(params->device)->funcs.p_vkGetEventStatus(wine_device_from_handle(params->device)->device, params->event); }
static NTSTATUS wine_vkGetFenceStatus(void *args) { struct vkGetFenceStatus_params *params = args; TRACE("%p, 0x%s\n", params->device, wine_dbgstr_longlong(params->fence)); - return params->device->funcs.p_vkGetFenceStatus(params->device->device, params->fence); + return wine_device_from_handle(params->device)->funcs.p_vkGetFenceStatus(wine_device_from_handle(params->device)->device, params->fence); }
static NTSTATUS wine_vkGetFramebufferTilePropertiesQCOM(void *args) { struct vkGetFramebufferTilePropertiesQCOM_params *params = args; TRACE("%p, 0x%s, %p, %p\n", params->device, wine_dbgstr_longlong(params->framebuffer), params->pPropertiesCount, params->pProperties); - return params->device->funcs.p_vkGetFramebufferTilePropertiesQCOM(params->device->device, params->framebuffer, params->pPropertiesCount, params->pProperties); + return wine_device_from_handle(params->device)->funcs.p_vkGetFramebufferTilePropertiesQCOM(wine_device_from_handle(params->device)->device, params->framebuffer, params->pPropertiesCount, params->pProperties); }
static NTSTATUS wine_vkGetGeneratedCommandsMemoryRequirementsNV(void *args) @@ -8760,13 +8760,13 @@ static NTSTATUS wine_vkGetGeneratedCommandsMemoryRequirementsNV(void *args)
convert_VkGeneratedCommandsMemoryRequirementsInfoNV_win_to_host(params->pInfo, &pInfo_host); convert_VkMemoryRequirements2_win_to_host(params->pMemoryRequirements, &pMemoryRequirements_host); - params->device->funcs.p_vkGetGeneratedCommandsMemoryRequirementsNV(params->device->device, &pInfo_host, &pMemoryRequirements_host); + wine_device_from_handle(params->device)->funcs.p_vkGetGeneratedCommandsMemoryRequirementsNV(wine_device_from_handle(params->device)->device, &pInfo_host, &pMemoryRequirements_host);
convert_VkMemoryRequirements2_host_to_win(&pMemoryRequirements_host, params->pMemoryRequirements); return STATUS_SUCCESS; #else TRACE("%p, %p, %p\n", params->device, params->pInfo, params->pMemoryRequirements); - params->device->funcs.p_vkGetGeneratedCommandsMemoryRequirementsNV(params->device->device, params->pInfo, params->pMemoryRequirements); + wine_device_from_handle(params->device)->funcs.p_vkGetGeneratedCommandsMemoryRequirementsNV(wine_device_from_handle(params->device)->device, params->pInfo, params->pMemoryRequirements); return STATUS_SUCCESS; #endif } @@ -8778,13 +8778,13 @@ static NTSTATUS wine_vkGetImageMemoryRequirements(void *args) VkMemoryRequirements_host pMemoryRequirements_host; TRACE("%p, 0x%s, %p\n", params->device, wine_dbgstr_longlong(params->image), params->pMemoryRequirements);
- params->device->funcs.p_vkGetImageMemoryRequirements(params->device->device, params->image, &pMemoryRequirements_host); + wine_device_from_handle(params->device)->funcs.p_vkGetImageMemoryRequirements(wine_device_from_handle(params->device)->device, params->image, &pMemoryRequirements_host);
convert_VkMemoryRequirements_host_to_win(&pMemoryRequirements_host, params->pMemoryRequirements); return STATUS_SUCCESS; #else TRACE("%p, 0x%s, %p\n", params->device, wine_dbgstr_longlong(params->image), params->pMemoryRequirements); - params->device->funcs.p_vkGetImageMemoryRequirements(params->device->device, params->image, params->pMemoryRequirements); + wine_device_from_handle(params->device)->funcs.p_vkGetImageMemoryRequirements(wine_device_from_handle(params->device)->device, params->image, params->pMemoryRequirements); return STATUS_SUCCESS; #endif } @@ -8799,13 +8799,13 @@ static NTSTATUS wine_vkGetImageMemoryRequirements2(void *args)
convert_VkImageMemoryRequirementsInfo2_win_to_host(params->pInfo, &pInfo_host); convert_VkMemoryRequirements2_win_to_host(params->pMemoryRequirements, &pMemoryRequirements_host); - params->device->funcs.p_vkGetImageMemoryRequirements2(params->device->device, &pInfo_host, &pMemoryRequirements_host); + wine_device_from_handle(params->device)->funcs.p_vkGetImageMemoryRequirements2(wine_device_from_handle(params->device)->device, &pInfo_host, &pMemoryRequirements_host);
convert_VkMemoryRequirements2_host_to_win(&pMemoryRequirements_host, params->pMemoryRequirements); return STATUS_SUCCESS; #else TRACE("%p, %p, %p\n", params->device, params->pInfo, params->pMemoryRequirements); - params->device->funcs.p_vkGetImageMemoryRequirements2(params->device->device, params->pInfo, params->pMemoryRequirements); + wine_device_from_handle(params->device)->funcs.p_vkGetImageMemoryRequirements2(wine_device_from_handle(params->device)->device, params->pInfo, params->pMemoryRequirements); return STATUS_SUCCESS; #endif } @@ -8820,13 +8820,13 @@ static NTSTATUS wine_vkGetImageMemoryRequirements2KHR(void *args)
convert_VkImageMemoryRequirementsInfo2_win_to_host(params->pInfo, &pInfo_host); convert_VkMemoryRequirements2_win_to_host(params->pMemoryRequirements, &pMemoryRequirements_host); - params->device->funcs.p_vkGetImageMemoryRequirements2KHR(params->device->device, &pInfo_host, &pMemoryRequirements_host); + wine_device_from_handle(params->device)->funcs.p_vkGetImageMemoryRequirements2KHR(wine_device_from_handle(params->device)->device, &pInfo_host, &pMemoryRequirements_host);
convert_VkMemoryRequirements2_host_to_win(&pMemoryRequirements_host, params->pMemoryRequirements); return STATUS_SUCCESS; #else TRACE("%p, %p, %p\n", params->device, params->pInfo, params->pMemoryRequirements); - params->device->funcs.p_vkGetImageMemoryRequirements2KHR(params->device->device, params->pInfo, params->pMemoryRequirements); + wine_device_from_handle(params->device)->funcs.p_vkGetImageMemoryRequirements2KHR(wine_device_from_handle(params->device)->device, params->pInfo, params->pMemoryRequirements); return STATUS_SUCCESS; #endif } @@ -8835,7 +8835,7 @@ static NTSTATUS wine_vkGetImageSparseMemoryRequirements(void *args) { struct vkGetImageSparseMemoryRequirements_params *params = args; TRACE("%p, 0x%s, %p, %p\n", params->device, wine_dbgstr_longlong(params->image), params->pSparseMemoryRequirementCount, params->pSparseMemoryRequirements); - params->device->funcs.p_vkGetImageSparseMemoryRequirements(params->device->device, params->image, params->pSparseMemoryRequirementCount, params->pSparseMemoryRequirements); + wine_device_from_handle(params->device)->funcs.p_vkGetImageSparseMemoryRequirements(wine_device_from_handle(params->device)->device, params->image, params->pSparseMemoryRequirementCount, params->pSparseMemoryRequirements); return STATUS_SUCCESS; }
@@ -8847,12 +8847,12 @@ static NTSTATUS wine_vkGetImageSparseMemoryRequirements2(void *args) TRACE("%p, %p, %p, %p\n", params->device, params->pInfo, params->pSparseMemoryRequirementCount, params->pSparseMemoryRequirements);
convert_VkImageSparseMemoryRequirementsInfo2_win_to_host(params->pInfo, &pInfo_host); - params->device->funcs.p_vkGetImageSparseMemoryRequirements2(params->device->device, &pInfo_host, params->pSparseMemoryRequirementCount, params->pSparseMemoryRequirements); + wine_device_from_handle(params->device)->funcs.p_vkGetImageSparseMemoryRequirements2(wine_device_from_handle(params->device)->device, &pInfo_host, params->pSparseMemoryRequirementCount, params->pSparseMemoryRequirements);
return STATUS_SUCCESS; #else TRACE("%p, %p, %p, %p\n", params->device, params->pInfo, params->pSparseMemoryRequirementCount, params->pSparseMemoryRequirements); - params->device->funcs.p_vkGetImageSparseMemoryRequirements2(params->device->device, params->pInfo, params->pSparseMemoryRequirementCount, params->pSparseMemoryRequirements); + wine_device_from_handle(params->device)->funcs.p_vkGetImageSparseMemoryRequirements2(wine_device_from_handle(params->device)->device, params->pInfo, params->pSparseMemoryRequirementCount, params->pSparseMemoryRequirements); return STATUS_SUCCESS; #endif } @@ -8865,12 +8865,12 @@ static NTSTATUS wine_vkGetImageSparseMemoryRequirements2KHR(void *args) TRACE("%p, %p, %p, %p\n", params->device, params->pInfo, params->pSparseMemoryRequirementCount, params->pSparseMemoryRequirements);
convert_VkImageSparseMemoryRequirementsInfo2_win_to_host(params->pInfo, &pInfo_host); - params->device->funcs.p_vkGetImageSparseMemoryRequirements2KHR(params->device->device, &pInfo_host, params->pSparseMemoryRequirementCount, params->pSparseMemoryRequirements); + wine_device_from_handle(params->device)->funcs.p_vkGetImageSparseMemoryRequirements2KHR(wine_device_from_handle(params->device)->device, &pInfo_host, params->pSparseMemoryRequirementCount, params->pSparseMemoryRequirements);
return STATUS_SUCCESS; #else TRACE("%p, %p, %p, %p\n", params->device, params->pInfo, params->pSparseMemoryRequirementCount, params->pSparseMemoryRequirements); - params->device->funcs.p_vkGetImageSparseMemoryRequirements2KHR(params->device->device, params->pInfo, params->pSparseMemoryRequirementCount, params->pSparseMemoryRequirements); + wine_device_from_handle(params->device)->funcs.p_vkGetImageSparseMemoryRequirements2KHR(wine_device_from_handle(params->device)->device, params->pInfo, params->pSparseMemoryRequirementCount, params->pSparseMemoryRequirements); return STATUS_SUCCESS; #endif } @@ -8882,13 +8882,13 @@ static NTSTATUS wine_vkGetImageSubresourceLayout(void *args) VkSubresourceLayout_host pLayout_host; TRACE("%p, 0x%s, %p, %p\n", params->device, wine_dbgstr_longlong(params->image), params->pSubresource, params->pLayout);
- params->device->funcs.p_vkGetImageSubresourceLayout(params->device->device, params->image, params->pSubresource, &pLayout_host); + wine_device_from_handle(params->device)->funcs.p_vkGetImageSubresourceLayout(wine_device_from_handle(params->device)->device, params->image, params->pSubresource, &pLayout_host);
convert_VkSubresourceLayout_host_to_win(&pLayout_host, params->pLayout); return STATUS_SUCCESS; #else TRACE("%p, 0x%s, %p, %p\n", params->device, wine_dbgstr_longlong(params->image), params->pSubresource, params->pLayout); - params->device->funcs.p_vkGetImageSubresourceLayout(params->device->device, params->image, params->pSubresource, params->pLayout); + wine_device_from_handle(params->device)->funcs.p_vkGetImageSubresourceLayout(wine_device_from_handle(params->device)->device, params->image, params->pSubresource, params->pLayout); return STATUS_SUCCESS; #endif } @@ -8901,13 +8901,13 @@ static NTSTATUS wine_vkGetImageSubresourceLayout2EXT(void *args) TRACE("%p, 0x%s, %p, %p\n", params->device, wine_dbgstr_longlong(params->image), params->pSubresource, params->pLayout);
convert_VkSubresourceLayout2EXT_win_to_host(params->pLayout, &pLayout_host); - params->device->funcs.p_vkGetImageSubresourceLayout2EXT(params->device->device, params->image, params->pSubresource, &pLayout_host); + wine_device_from_handle(params->device)->funcs.p_vkGetImageSubresourceLayout2EXT(wine_device_from_handle(params->device)->device, params->image, params->pSubresource, &pLayout_host);
convert_VkSubresourceLayout2EXT_host_to_win(&pLayout_host, params->pLayout); return STATUS_SUCCESS; #else TRACE("%p, 0x%s, %p, %p\n", params->device, wine_dbgstr_longlong(params->image), params->pSubresource, params->pLayout); - params->device->funcs.p_vkGetImageSubresourceLayout2EXT(params->device->device, params->image, params->pSubresource, params->pLayout); + wine_device_from_handle(params->device)->funcs.p_vkGetImageSubresourceLayout2EXT(wine_device_from_handle(params->device)->device, params->image, params->pSubresource, params->pLayout); return STATUS_SUCCESS; #endif } @@ -8921,13 +8921,13 @@ static NTSTATUS wine_vkGetImageViewAddressNVX(void *args) TRACE("%p, 0x%s, %p\n", params->device, wine_dbgstr_longlong(params->imageView), params->pProperties);
convert_VkImageViewAddressPropertiesNVX_win_to_host(params->pProperties, &pProperties_host); - result = params->device->funcs.p_vkGetImageViewAddressNVX(params->device->device, params->imageView, &pProperties_host); + result = wine_device_from_handle(params->device)->funcs.p_vkGetImageViewAddressNVX(wine_device_from_handle(params->device)->device, params->imageView, &pProperties_host);
convert_VkImageViewAddressPropertiesNVX_host_to_win(&pProperties_host, params->pProperties); return result; #else TRACE("%p, 0x%s, %p\n", params->device, wine_dbgstr_longlong(params->imageView), params->pProperties); - return params->device->funcs.p_vkGetImageViewAddressNVX(params->device->device, params->imageView, params->pProperties); + return wine_device_from_handle(params->device)->funcs.p_vkGetImageViewAddressNVX(wine_device_from_handle(params->device)->device, params->imageView, params->pProperties); #endif }
@@ -8940,12 +8940,12 @@ static NTSTATUS wine_vkGetImageViewHandleNVX(void *args) TRACE("%p, %p\n", params->device, params->pInfo);
convert_VkImageViewHandleInfoNVX_win_to_host(params->pInfo, &pInfo_host); - result = params->device->funcs.p_vkGetImageViewHandleNVX(params->device->device, &pInfo_host); + result = wine_device_from_handle(params->device)->funcs.p_vkGetImageViewHandleNVX(wine_device_from_handle(params->device)->device, &pInfo_host);
return result; #else TRACE("%p, %p\n", params->device, params->pInfo); - return params->device->funcs.p_vkGetImageViewHandleNVX(params->device->device, params->pInfo); + return wine_device_from_handle(params->device)->funcs.p_vkGetImageViewHandleNVX(wine_device_from_handle(params->device)->device, params->pInfo); #endif }
@@ -8953,14 +8953,14 @@ static NTSTATUS wine_vkGetMemoryHostPointerPropertiesEXT(void *args) { struct vkGetMemoryHostPointerPropertiesEXT_params *params = args; TRACE("%p, %#x, %p, %p\n", params->device, params->handleType, params->pHostPointer, params->pMemoryHostPointerProperties); - return params->device->funcs.p_vkGetMemoryHostPointerPropertiesEXT(params->device->device, params->handleType, params->pHostPointer, params->pMemoryHostPointerProperties); + return wine_device_from_handle(params->device)->funcs.p_vkGetMemoryHostPointerPropertiesEXT(wine_device_from_handle(params->device)->device, params->handleType, params->pHostPointer, params->pMemoryHostPointerProperties); }
static NTSTATUS wine_vkGetPerformanceParameterINTEL(void *args) { struct vkGetPerformanceParameterINTEL_params *params = args; TRACE("%p, %#x, %p\n", params->device, params->parameter, params->pValue); - return params->device->funcs.p_vkGetPerformanceParameterINTEL(params->device->device, params->parameter, params->pValue); + return wine_device_from_handle(params->device)->funcs.p_vkGetPerformanceParameterINTEL(wine_device_from_handle(params->device)->device, params->parameter, params->pValue); }
static NTSTATUS wine_vkGetPhysicalDeviceCooperativeMatrixPropertiesNV(void *args) @@ -9357,7 +9357,7 @@ static NTSTATUS wine_vkGetPipelineCacheData(void *args) { struct vkGetPipelineCacheData_params *params = args; TRACE("%p, 0x%s, %p, %p\n", params->device, wine_dbgstr_longlong(params->pipelineCache), params->pDataSize, params->pData); - return params->device->funcs.p_vkGetPipelineCacheData(params->device->device, params->pipelineCache, params->pDataSize, params->pData); + return wine_device_from_handle(params->device)->funcs.p_vkGetPipelineCacheData(wine_device_from_handle(params->device)->device, params->pipelineCache, params->pDataSize, params->pData); }
static NTSTATUS wine_vkGetPipelineExecutableInternalRepresentationsKHR(void *args) @@ -9369,12 +9369,12 @@ static NTSTATUS wine_vkGetPipelineExecutableInternalRepresentationsKHR(void *arg TRACE("%p, %p, %p, %p\n", params->device, params->pExecutableInfo, params->pInternalRepresentationCount, params->pInternalRepresentations);
convert_VkPipelineExecutableInfoKHR_win_to_host(params->pExecutableInfo, &pExecutableInfo_host); - result = params->device->funcs.p_vkGetPipelineExecutableInternalRepresentationsKHR(params->device->device, &pExecutableInfo_host, params->pInternalRepresentationCount, params->pInternalRepresentations); + result = wine_device_from_handle(params->device)->funcs.p_vkGetPipelineExecutableInternalRepresentationsKHR(wine_device_from_handle(params->device)->device, &pExecutableInfo_host, params->pInternalRepresentationCount, params->pInternalRepresentations);
return result; #else TRACE("%p, %p, %p, %p\n", params->device, params->pExecutableInfo, params->pInternalRepresentationCount, params->pInternalRepresentations); - return params->device->funcs.p_vkGetPipelineExecutableInternalRepresentationsKHR(params->device->device, params->pExecutableInfo, params->pInternalRepresentationCount, params->pInternalRepresentations); + return wine_device_from_handle(params->device)->funcs.p_vkGetPipelineExecutableInternalRepresentationsKHR(wine_device_from_handle(params->device)->device, params->pExecutableInfo, params->pInternalRepresentationCount, params->pInternalRepresentations); #endif }
@@ -9387,12 +9387,12 @@ static NTSTATUS wine_vkGetPipelineExecutablePropertiesKHR(void *args) TRACE("%p, %p, %p, %p\n", params->device, params->pPipelineInfo, params->pExecutableCount, params->pProperties);
convert_VkPipelineInfoKHR_win_to_host(params->pPipelineInfo, &pPipelineInfo_host); - result = params->device->funcs.p_vkGetPipelineExecutablePropertiesKHR(params->device->device, &pPipelineInfo_host, params->pExecutableCount, params->pProperties); + result = wine_device_from_handle(params->device)->funcs.p_vkGetPipelineExecutablePropertiesKHR(wine_device_from_handle(params->device)->device, &pPipelineInfo_host, params->pExecutableCount, params->pProperties);
return result; #else TRACE("%p, %p, %p, %p\n", params->device, params->pPipelineInfo, params->pExecutableCount, params->pProperties); - return params->device->funcs.p_vkGetPipelineExecutablePropertiesKHR(params->device->device, params->pPipelineInfo, params->pExecutableCount, params->pProperties); + return wine_device_from_handle(params->device)->funcs.p_vkGetPipelineExecutablePropertiesKHR(wine_device_from_handle(params->device)->device, params->pPipelineInfo, params->pExecutableCount, params->pProperties); #endif }
@@ -9405,12 +9405,12 @@ static NTSTATUS wine_vkGetPipelineExecutableStatisticsKHR(void *args) TRACE("%p, %p, %p, %p\n", params->device, params->pExecutableInfo, params->pStatisticCount, params->pStatistics);
convert_VkPipelineExecutableInfoKHR_win_to_host(params->pExecutableInfo, &pExecutableInfo_host); - result = params->device->funcs.p_vkGetPipelineExecutableStatisticsKHR(params->device->device, &pExecutableInfo_host, params->pStatisticCount, params->pStatistics); + result = wine_device_from_handle(params->device)->funcs.p_vkGetPipelineExecutableStatisticsKHR(wine_device_from_handle(params->device)->device, &pExecutableInfo_host, params->pStatisticCount, params->pStatistics);
return result; #else TRACE("%p, %p, %p, %p\n", params->device, params->pExecutableInfo, params->pStatisticCount, params->pStatistics); - return params->device->funcs.p_vkGetPipelineExecutableStatisticsKHR(params->device->device, params->pExecutableInfo, params->pStatisticCount, params->pStatistics); + return wine_device_from_handle(params->device)->funcs.p_vkGetPipelineExecutableStatisticsKHR(wine_device_from_handle(params->device)->device, params->pExecutableInfo, params->pStatisticCount, params->pStatistics); #endif }
@@ -9423,12 +9423,12 @@ static NTSTATUS wine_vkGetPipelinePropertiesEXT(void *args) TRACE("%p, %p, %p\n", params->device, params->pPipelineInfo, params->pPipelineProperties);
convert_VkPipelineInfoEXT_win_to_host(params->pPipelineInfo, &pPipelineInfo_host); - result = params->device->funcs.p_vkGetPipelinePropertiesEXT(params->device->device, &pPipelineInfo_host, params->pPipelineProperties); + result = wine_device_from_handle(params->device)->funcs.p_vkGetPipelinePropertiesEXT(wine_device_from_handle(params->device)->device, &pPipelineInfo_host, params->pPipelineProperties);
return result; #else TRACE("%p, %p, %p\n", params->device, params->pPipelineInfo, params->pPipelineProperties); - return params->device->funcs.p_vkGetPipelinePropertiesEXT(params->device->device, params->pPipelineInfo, params->pPipelineProperties); + return wine_device_from_handle(params->device)->funcs.p_vkGetPipelinePropertiesEXT(wine_device_from_handle(params->device)->device, params->pPipelineInfo, params->pPipelineProperties); #endif }
@@ -9436,7 +9436,7 @@ static NTSTATUS wine_vkGetPrivateData(void *args) { struct vkGetPrivateData_params *params = args; TRACE("%p, %#x, 0x%s, 0x%s, %p\n", params->device, params->objectType, wine_dbgstr_longlong(params->objectHandle), wine_dbgstr_longlong(params->privateDataSlot), params->pData); - params->device->funcs.p_vkGetPrivateData(params->device->device, params->objectType, wine_vk_unwrap_handle(params->objectType, params->objectHandle), params->privateDataSlot, params->pData); + wine_device_from_handle(params->device)->funcs.p_vkGetPrivateData(wine_device_from_handle(params->device)->device, params->objectType, wine_vk_unwrap_handle(params->objectType, params->objectHandle), params->privateDataSlot, params->pData); return STATUS_SUCCESS; }
@@ -9444,7 +9444,7 @@ static NTSTATUS wine_vkGetPrivateDataEXT(void *args) { struct vkGetPrivateDataEXT_params *params = args; TRACE("%p, %#x, 0x%s, 0x%s, %p\n", params->device, params->objectType, wine_dbgstr_longlong(params->objectHandle), wine_dbgstr_longlong(params->privateDataSlot), params->pData); - params->device->funcs.p_vkGetPrivateDataEXT(params->device->device, params->objectType, wine_vk_unwrap_handle(params->objectType, params->objectHandle), params->privateDataSlot, params->pData); + wine_device_from_handle(params->device)->funcs.p_vkGetPrivateDataEXT(wine_device_from_handle(params->device)->device, params->objectType, wine_vk_unwrap_handle(params->objectType, params->objectHandle), params->privateDataSlot, params->pData); return STATUS_SUCCESS; }
@@ -9452,7 +9452,7 @@ static NTSTATUS wine_vkGetQueryPoolResults(void *args) { struct vkGetQueryPoolResults_params *params = args; TRACE("%p, 0x%s, %u, %u, 0x%s, %p, 0x%s, %#x\n", params->device, wine_dbgstr_longlong(params->queryPool), params->firstQuery, params->queryCount, wine_dbgstr_longlong(params->dataSize), params->pData, wine_dbgstr_longlong(params->stride), params->flags); - return params->device->funcs.p_vkGetQueryPoolResults(params->device->device, params->queryPool, params->firstQuery, params->queryCount, params->dataSize, params->pData, params->stride, params->flags); + return wine_device_from_handle(params->device)->funcs.p_vkGetQueryPoolResults(wine_device_from_handle(params->device)->device, params->queryPool, params->firstQuery, params->queryCount, params->dataSize, params->pData, params->stride, params->flags); }
static NTSTATUS wine_vkGetQueueCheckpointData2NV(void *args) @@ -9475,35 +9475,35 @@ static NTSTATUS wine_vkGetRayTracingCaptureReplayShaderGroupHandlesKHR(void *arg { struct vkGetRayTracingCaptureReplayShaderGroupHandlesKHR_params *params = args; TRACE("%p, 0x%s, %u, %u, 0x%s, %p\n", params->device, wine_dbgstr_longlong(params->pipeline), params->firstGroup, params->groupCount, wine_dbgstr_longlong(params->dataSize), params->pData); - return params->device->funcs.p_vkGetRayTracingCaptureReplayShaderGroupHandlesKHR(params->device->device, params->pipeline, params->firstGroup, params->groupCount, params->dataSize, params->pData); + return wine_device_from_handle(params->device)->funcs.p_vkGetRayTracingCaptureReplayShaderGroupHandlesKHR(wine_device_from_handle(params->device)->device, params->pipeline, params->firstGroup, params->groupCount, params->dataSize, params->pData); }
static NTSTATUS wine_vkGetRayTracingShaderGroupHandlesKHR(void *args) { struct vkGetRayTracingShaderGroupHandlesKHR_params *params = args; TRACE("%p, 0x%s, %u, %u, 0x%s, %p\n", params->device, wine_dbgstr_longlong(params->pipeline), params->firstGroup, params->groupCount, wine_dbgstr_longlong(params->dataSize), params->pData); - return params->device->funcs.p_vkGetRayTracingShaderGroupHandlesKHR(params->device->device, params->pipeline, params->firstGroup, params->groupCount, params->dataSize, params->pData); + return wine_device_from_handle(params->device)->funcs.p_vkGetRayTracingShaderGroupHandlesKHR(wine_device_from_handle(params->device)->device, params->pipeline, params->firstGroup, params->groupCount, params->dataSize, params->pData); }
static NTSTATUS wine_vkGetRayTracingShaderGroupHandlesNV(void *args) { struct vkGetRayTracingShaderGroupHandlesNV_params *params = args; TRACE("%p, 0x%s, %u, %u, 0x%s, %p\n", params->device, wine_dbgstr_longlong(params->pipeline), params->firstGroup, params->groupCount, wine_dbgstr_longlong(params->dataSize), params->pData); - return params->device->funcs.p_vkGetRayTracingShaderGroupHandlesNV(params->device->device, params->pipeline, params->firstGroup, params->groupCount, params->dataSize, params->pData); + return wine_device_from_handle(params->device)->funcs.p_vkGetRayTracingShaderGroupHandlesNV(wine_device_from_handle(params->device)->device, params->pipeline, params->firstGroup, params->groupCount, params->dataSize, params->pData); }
static NTSTATUS wine_vkGetRayTracingShaderGroupStackSizeKHR(void *args) { struct vkGetRayTracingShaderGroupStackSizeKHR_params *params = args; TRACE("%p, 0x%s, %u, %#x\n", params->device, wine_dbgstr_longlong(params->pipeline), params->group, params->groupShader); - return params->device->funcs.p_vkGetRayTracingShaderGroupStackSizeKHR(params->device->device, params->pipeline, params->group, params->groupShader); + return wine_device_from_handle(params->device)->funcs.p_vkGetRayTracingShaderGroupStackSizeKHR(wine_device_from_handle(params->device)->device, params->pipeline, params->group, params->groupShader); }
static NTSTATUS wine_vkGetRenderAreaGranularity(void *args) { struct vkGetRenderAreaGranularity_params *params = args; TRACE("%p, 0x%s, %p\n", params->device, wine_dbgstr_longlong(params->renderPass), params->pGranularity); - params->device->funcs.p_vkGetRenderAreaGranularity(params->device->device, params->renderPass, params->pGranularity); + wine_device_from_handle(params->device)->funcs.p_vkGetRenderAreaGranularity(wine_device_from_handle(params->device)->device, params->renderPass, params->pGranularity); return STATUS_SUCCESS; }
@@ -9511,28 +9511,28 @@ static NTSTATUS wine_vkGetSemaphoreCounterValue(void *args) { struct vkGetSemaphoreCounterValue_params *params = args; TRACE("%p, 0x%s, %p\n", params->device, wine_dbgstr_longlong(params->semaphore), params->pValue); - return params->device->funcs.p_vkGetSemaphoreCounterValue(params->device->device, params->semaphore, params->pValue); + return wine_device_from_handle(params->device)->funcs.p_vkGetSemaphoreCounterValue(wine_device_from_handle(params->device)->device, params->semaphore, params->pValue); }
static NTSTATUS wine_vkGetSemaphoreCounterValueKHR(void *args) { struct vkGetSemaphoreCounterValueKHR_params *params = args; TRACE("%p, 0x%s, %p\n", params->device, wine_dbgstr_longlong(params->semaphore), params->pValue); - return params->device->funcs.p_vkGetSemaphoreCounterValueKHR(params->device->device, params->semaphore, params->pValue); + return wine_device_from_handle(params->device)->funcs.p_vkGetSemaphoreCounterValueKHR(wine_device_from_handle(params->device)->device, params->semaphore, params->pValue); }
static NTSTATUS wine_vkGetShaderInfoAMD(void *args) { struct vkGetShaderInfoAMD_params *params = args; TRACE("%p, 0x%s, %#x, %#x, %p, %p\n", params->device, wine_dbgstr_longlong(params->pipeline), params->shaderStage, params->infoType, params->pInfoSize, params->pInfo); - return params->device->funcs.p_vkGetShaderInfoAMD(params->device->device, params->pipeline, params->shaderStage, params->infoType, params->pInfoSize, params->pInfo); + return wine_device_from_handle(params->device)->funcs.p_vkGetShaderInfoAMD(wine_device_from_handle(params->device)->device, params->pipeline, params->shaderStage, params->infoType, params->pInfoSize, params->pInfo); }
static NTSTATUS wine_vkGetShaderModuleCreateInfoIdentifierEXT(void *args) { struct vkGetShaderModuleCreateInfoIdentifierEXT_params *params = args; TRACE("%p, %p, %p\n", params->device, params->pCreateInfo, params->pIdentifier); - params->device->funcs.p_vkGetShaderModuleCreateInfoIdentifierEXT(params->device->device, params->pCreateInfo, params->pIdentifier); + wine_device_from_handle(params->device)->funcs.p_vkGetShaderModuleCreateInfoIdentifierEXT(wine_device_from_handle(params->device)->device, params->pCreateInfo, params->pIdentifier); return STATUS_SUCCESS; }
@@ -9540,7 +9540,7 @@ static NTSTATUS wine_vkGetShaderModuleIdentifierEXT(void *args) { struct vkGetShaderModuleIdentifierEXT_params *params = args; TRACE("%p, 0x%s, %p\n", params->device, wine_dbgstr_longlong(params->shaderModule), params->pIdentifier); - params->device->funcs.p_vkGetShaderModuleIdentifierEXT(params->device->device, params->shaderModule, params->pIdentifier); + wine_device_from_handle(params->device)->funcs.p_vkGetShaderModuleIdentifierEXT(wine_device_from_handle(params->device)->device, params->shaderModule, params->pIdentifier); return STATUS_SUCCESS; }
@@ -9548,21 +9548,21 @@ static NTSTATUS wine_vkGetSwapchainImagesKHR(void *args) { struct vkGetSwapchainImagesKHR_params *params = args; TRACE("%p, 0x%s, %p, %p\n", params->device, wine_dbgstr_longlong(params->swapchain), params->pSwapchainImageCount, params->pSwapchainImages); - return params->device->funcs.p_vkGetSwapchainImagesKHR(params->device->device, params->swapchain, params->pSwapchainImageCount, params->pSwapchainImages); + return wine_device_from_handle(params->device)->funcs.p_vkGetSwapchainImagesKHR(wine_device_from_handle(params->device)->device, params->swapchain, params->pSwapchainImageCount, params->pSwapchainImages); }
static NTSTATUS wine_vkGetValidationCacheDataEXT(void *args) { struct vkGetValidationCacheDataEXT_params *params = args; TRACE("%p, 0x%s, %p, %p\n", params->device, wine_dbgstr_longlong(params->validationCache), params->pDataSize, params->pData); - return params->device->funcs.p_vkGetValidationCacheDataEXT(params->device->device, params->validationCache, params->pDataSize, params->pData); + return wine_device_from_handle(params->device)->funcs.p_vkGetValidationCacheDataEXT(wine_device_from_handle(params->device)->device, params->validationCache, params->pDataSize, params->pData); }
static NTSTATUS wine_vkInitializePerformanceApiINTEL(void *args) { struct vkInitializePerformanceApiINTEL_params *params = args; TRACE("%p, %p\n", params->device, params->pInitializeInfo); - return params->device->funcs.p_vkInitializePerformanceApiINTEL(params->device->device, params->pInitializeInfo); + return wine_device_from_handle(params->device)->funcs.p_vkInitializePerformanceApiINTEL(wine_device_from_handle(params->device)->device, params->pInitializeInfo); }
static NTSTATUS wine_vkInvalidateMappedMemoryRanges(void *args) @@ -9574,13 +9574,13 @@ static NTSTATUS wine_vkInvalidateMappedMemoryRanges(void *args) TRACE("%p, %u, %p\n", params->device, params->memoryRangeCount, params->pMemoryRanges);
pMemoryRanges_host = convert_VkMappedMemoryRange_array_win_to_host(params->pMemoryRanges, params->memoryRangeCount); - result = params->device->funcs.p_vkInvalidateMappedMemoryRanges(params->device->device, params->memoryRangeCount, pMemoryRanges_host); + result = wine_device_from_handle(params->device)->funcs.p_vkInvalidateMappedMemoryRanges(wine_device_from_handle(params->device)->device, params->memoryRangeCount, pMemoryRanges_host);
free_VkMappedMemoryRange_array(pMemoryRanges_host, params->memoryRangeCount); return result; #else TRACE("%p, %u, %p\n", params->device, params->memoryRangeCount, params->pMemoryRanges); - return params->device->funcs.p_vkInvalidateMappedMemoryRanges(params->device->device, params->memoryRangeCount, params->pMemoryRanges); + return wine_device_from_handle(params->device)->funcs.p_vkInvalidateMappedMemoryRanges(wine_device_from_handle(params->device)->device, params->memoryRangeCount, params->pMemoryRanges); #endif }
@@ -9588,21 +9588,21 @@ static NTSTATUS wine_vkMapMemory(void *args) { struct vkMapMemory_params *params = args; TRACE("%p, 0x%s, 0x%s, 0x%s, %#x, %p\n", params->device, wine_dbgstr_longlong(params->memory), wine_dbgstr_longlong(params->offset), wine_dbgstr_longlong(params->size), params->flags, params->ppData); - return params->device->funcs.p_vkMapMemory(params->device->device, params->memory, params->offset, params->size, params->flags, params->ppData); + return wine_device_from_handle(params->device)->funcs.p_vkMapMemory(wine_device_from_handle(params->device)->device, params->memory, params->offset, params->size, params->flags, params->ppData); }
static NTSTATUS wine_vkMergePipelineCaches(void *args) { struct vkMergePipelineCaches_params *params = args; TRACE("%p, 0x%s, %u, %p\n", params->device, wine_dbgstr_longlong(params->dstCache), params->srcCacheCount, params->pSrcCaches); - return params->device->funcs.p_vkMergePipelineCaches(params->device->device, params->dstCache, params->srcCacheCount, params->pSrcCaches); + return wine_device_from_handle(params->device)->funcs.p_vkMergePipelineCaches(wine_device_from_handle(params->device)->device, params->dstCache, params->srcCacheCount, params->pSrcCaches); }
static NTSTATUS wine_vkMergeValidationCachesEXT(void *args) { struct vkMergeValidationCachesEXT_params *params = args; TRACE("%p, 0x%s, %u, %p\n", params->device, wine_dbgstr_longlong(params->dstCache), params->srcCacheCount, params->pSrcCaches); - return params->device->funcs.p_vkMergeValidationCachesEXT(params->device->device, params->dstCache, params->srcCacheCount, params->pSrcCaches); + return wine_device_from_handle(params->device)->funcs.p_vkMergeValidationCachesEXT(wine_device_from_handle(params->device)->device, params->dstCache, params->srcCacheCount, params->pSrcCaches); }
static NTSTATUS wine_vkQueueBeginDebugUtilsLabelEXT(void *args) @@ -9739,14 +9739,14 @@ static NTSTATUS wine_vkReleasePerformanceConfigurationINTEL(void *args) { struct vkReleasePerformanceConfigurationINTEL_params *params = args; TRACE("%p, 0x%s\n", params->device, wine_dbgstr_longlong(params->configuration)); - return params->device->funcs.p_vkReleasePerformanceConfigurationINTEL(params->device->device, params->configuration); + return wine_device_from_handle(params->device)->funcs.p_vkReleasePerformanceConfigurationINTEL(wine_device_from_handle(params->device)->device, params->configuration); }
static NTSTATUS wine_vkReleaseProfilingLockKHR(void *args) { struct vkReleaseProfilingLockKHR_params *params = args; TRACE("%p\n", params->device); - params->device->funcs.p_vkReleaseProfilingLockKHR(params->device->device); + wine_device_from_handle(params->device)->funcs.p_vkReleaseProfilingLockKHR(wine_device_from_handle(params->device)->device); return STATUS_SUCCESS; }
@@ -9761,35 +9761,35 @@ static NTSTATUS wine_vkResetCommandPool(void *args) { struct vkResetCommandPool_params *params = args; TRACE("%p, 0x%s, %#x\n", params->device, wine_dbgstr_longlong(params->commandPool), params->flags); - return params->device->funcs.p_vkResetCommandPool(params->device->device, wine_cmd_pool_from_handle(params->commandPool)->command_pool, params->flags); + return wine_device_from_handle(params->device)->funcs.p_vkResetCommandPool(wine_device_from_handle(params->device)->device, wine_cmd_pool_from_handle(params->commandPool)->command_pool, params->flags); }
static NTSTATUS wine_vkResetDescriptorPool(void *args) { struct vkResetDescriptorPool_params *params = args; TRACE("%p, 0x%s, %#x\n", params->device, wine_dbgstr_longlong(params->descriptorPool), params->flags); - return params->device->funcs.p_vkResetDescriptorPool(params->device->device, params->descriptorPool, params->flags); + return wine_device_from_handle(params->device)->funcs.p_vkResetDescriptorPool(wine_device_from_handle(params->device)->device, params->descriptorPool, params->flags); }
static NTSTATUS wine_vkResetEvent(void *args) { struct vkResetEvent_params *params = args; TRACE("%p, 0x%s\n", params->device, wine_dbgstr_longlong(params->event)); - return params->device->funcs.p_vkResetEvent(params->device->device, params->event); + return wine_device_from_handle(params->device)->funcs.p_vkResetEvent(wine_device_from_handle(params->device)->device, params->event); }
static NTSTATUS wine_vkResetFences(void *args) { struct vkResetFences_params *params = args; TRACE("%p, %u, %p\n", params->device, params->fenceCount, params->pFences); - return params->device->funcs.p_vkResetFences(params->device->device, params->fenceCount, params->pFences); + return wine_device_from_handle(params->device)->funcs.p_vkResetFences(wine_device_from_handle(params->device)->device, params->fenceCount, params->pFences); }
static NTSTATUS wine_vkResetQueryPool(void *args) { struct vkResetQueryPool_params *params = args; TRACE("%p, 0x%s, %u, %u\n", params->device, wine_dbgstr_longlong(params->queryPool), params->firstQuery, params->queryCount); - params->device->funcs.p_vkResetQueryPool(params->device->device, params->queryPool, params->firstQuery, params->queryCount); + wine_device_from_handle(params->device)->funcs.p_vkResetQueryPool(wine_device_from_handle(params->device)->device, params->queryPool, params->firstQuery, params->queryCount); return STATUS_SUCCESS; }
@@ -9797,7 +9797,7 @@ static NTSTATUS wine_vkResetQueryPoolEXT(void *args) { struct vkResetQueryPoolEXT_params *params = args; TRACE("%p, 0x%s, %u, %u\n", params->device, wine_dbgstr_longlong(params->queryPool), params->firstQuery, params->queryCount); - params->device->funcs.p_vkResetQueryPoolEXT(params->device->device, params->queryPool, params->firstQuery, params->queryCount); + wine_device_from_handle(params->device)->funcs.p_vkResetQueryPoolEXT(wine_device_from_handle(params->device)->device, params->queryPool, params->firstQuery, params->queryCount); return STATUS_SUCCESS; }
@@ -9810,7 +9810,7 @@ static NTSTATUS wine_vkSetDebugUtilsObjectNameEXT(void *args) TRACE("%p, %p\n", params->device, params->pNameInfo);
convert_VkDebugUtilsObjectNameInfoEXT_win_to_host(params->pNameInfo, &pNameInfo_host); - result = params->device->funcs.p_vkSetDebugUtilsObjectNameEXT(params->device->device, &pNameInfo_host); + result = wine_device_from_handle(params->device)->funcs.p_vkSetDebugUtilsObjectNameEXT(wine_device_from_handle(params->device)->device, &pNameInfo_host);
return result; #else @@ -9819,7 +9819,7 @@ static NTSTATUS wine_vkSetDebugUtilsObjectNameEXT(void *args) TRACE("%p, %p\n", params->device, params->pNameInfo);
convert_VkDebugUtilsObjectNameInfoEXT_win_to_host(params->pNameInfo, &pNameInfo_host); - result = params->device->funcs.p_vkSetDebugUtilsObjectNameEXT(params->device->device, &pNameInfo_host); + result = wine_device_from_handle(params->device)->funcs.p_vkSetDebugUtilsObjectNameEXT(wine_device_from_handle(params->device)->device, &pNameInfo_host);
return result; #endif @@ -9834,7 +9834,7 @@ static NTSTATUS wine_vkSetDebugUtilsObjectTagEXT(void *args) TRACE("%p, %p\n", params->device, params->pTagInfo);
convert_VkDebugUtilsObjectTagInfoEXT_win_to_host(params->pTagInfo, &pTagInfo_host); - result = params->device->funcs.p_vkSetDebugUtilsObjectTagEXT(params->device->device, &pTagInfo_host); + result = wine_device_from_handle(params->device)->funcs.p_vkSetDebugUtilsObjectTagEXT(wine_device_from_handle(params->device)->device, &pTagInfo_host);
return result; #else @@ -9843,7 +9843,7 @@ static NTSTATUS wine_vkSetDebugUtilsObjectTagEXT(void *args) TRACE("%p, %p\n", params->device, params->pTagInfo);
convert_VkDebugUtilsObjectTagInfoEXT_win_to_host(params->pTagInfo, &pTagInfo_host); - result = params->device->funcs.p_vkSetDebugUtilsObjectTagEXT(params->device->device, &pTagInfo_host); + result = wine_device_from_handle(params->device)->funcs.p_vkSetDebugUtilsObjectTagEXT(wine_device_from_handle(params->device)->device, &pTagInfo_host);
return result; #endif @@ -9853,7 +9853,7 @@ static NTSTATUS wine_vkSetDeviceMemoryPriorityEXT(void *args) { struct vkSetDeviceMemoryPriorityEXT_params *params = args; TRACE("%p, 0x%s, %f\n", params->device, wine_dbgstr_longlong(params->memory), params->priority); - params->device->funcs.p_vkSetDeviceMemoryPriorityEXT(params->device->device, params->memory, params->priority); + wine_device_from_handle(params->device)->funcs.p_vkSetDeviceMemoryPriorityEXT(wine_device_from_handle(params->device)->device, params->memory, params->priority); return STATUS_SUCCESS; }
@@ -9861,21 +9861,21 @@ static NTSTATUS wine_vkSetEvent(void *args) { struct vkSetEvent_params *params = args; TRACE("%p, 0x%s\n", params->device, wine_dbgstr_longlong(params->event)); - return params->device->funcs.p_vkSetEvent(params->device->device, params->event); + return wine_device_from_handle(params->device)->funcs.p_vkSetEvent(wine_device_from_handle(params->device)->device, params->event); }
static NTSTATUS wine_vkSetPrivateData(void *args) { struct vkSetPrivateData_params *params = args; TRACE("%p, %#x, 0x%s, 0x%s, 0x%s\n", params->device, params->objectType, wine_dbgstr_longlong(params->objectHandle), wine_dbgstr_longlong(params->privateDataSlot), wine_dbgstr_longlong(params->data)); - return params->device->funcs.p_vkSetPrivateData(params->device->device, params->objectType, wine_vk_unwrap_handle(params->objectType, params->objectHandle), params->privateDataSlot, params->data); + return wine_device_from_handle(params->device)->funcs.p_vkSetPrivateData(wine_device_from_handle(params->device)->device, params->objectType, wine_vk_unwrap_handle(params->objectType, params->objectHandle), params->privateDataSlot, params->data); }
static NTSTATUS wine_vkSetPrivateDataEXT(void *args) { struct vkSetPrivateDataEXT_params *params = args; TRACE("%p, %#x, 0x%s, 0x%s, 0x%s\n", params->device, params->objectType, wine_dbgstr_longlong(params->objectHandle), wine_dbgstr_longlong(params->privateDataSlot), wine_dbgstr_longlong(params->data)); - return params->device->funcs.p_vkSetPrivateDataEXT(params->device->device, params->objectType, wine_vk_unwrap_handle(params->objectType, params->objectHandle), params->privateDataSlot, params->data); + return wine_device_from_handle(params->device)->funcs.p_vkSetPrivateDataEXT(wine_device_from_handle(params->device)->device, params->objectType, wine_vk_unwrap_handle(params->objectType, params->objectHandle), params->privateDataSlot, params->data); }
static NTSTATUS wine_vkSignalSemaphore(void *args) @@ -9887,12 +9887,12 @@ static NTSTATUS wine_vkSignalSemaphore(void *args) TRACE("%p, %p\n", params->device, params->pSignalInfo);
convert_VkSemaphoreSignalInfo_win_to_host(params->pSignalInfo, &pSignalInfo_host); - result = params->device->funcs.p_vkSignalSemaphore(params->device->device, &pSignalInfo_host); + result = wine_device_from_handle(params->device)->funcs.p_vkSignalSemaphore(wine_device_from_handle(params->device)->device, &pSignalInfo_host);
return result; #else TRACE("%p, %p\n", params->device, params->pSignalInfo); - return params->device->funcs.p_vkSignalSemaphore(params->device->device, params->pSignalInfo); + return wine_device_from_handle(params->device)->funcs.p_vkSignalSemaphore(wine_device_from_handle(params->device)->device, params->pSignalInfo); #endif }
@@ -9905,12 +9905,12 @@ static NTSTATUS wine_vkSignalSemaphoreKHR(void *args) TRACE("%p, %p\n", params->device, params->pSignalInfo);
convert_VkSemaphoreSignalInfo_win_to_host(params->pSignalInfo, &pSignalInfo_host); - result = params->device->funcs.p_vkSignalSemaphoreKHR(params->device->device, &pSignalInfo_host); + result = wine_device_from_handle(params->device)->funcs.p_vkSignalSemaphoreKHR(wine_device_from_handle(params->device)->device, &pSignalInfo_host);
return result; #else TRACE("%p, %p\n", params->device, params->pSignalInfo); - return params->device->funcs.p_vkSignalSemaphoreKHR(params->device->device, params->pSignalInfo); + return wine_device_from_handle(params->device)->funcs.p_vkSignalSemaphoreKHR(wine_device_from_handle(params->device)->device, params->pSignalInfo); #endif }
@@ -9942,7 +9942,7 @@ static NTSTATUS wine_vkTrimCommandPool(void *args) { struct vkTrimCommandPool_params *params = args; TRACE("%p, 0x%s, %#x\n", params->device, wine_dbgstr_longlong(params->commandPool), params->flags); - params->device->funcs.p_vkTrimCommandPool(params->device->device, wine_cmd_pool_from_handle(params->commandPool)->command_pool, params->flags); + wine_device_from_handle(params->device)->funcs.p_vkTrimCommandPool(wine_device_from_handle(params->device)->device, wine_cmd_pool_from_handle(params->commandPool)->command_pool, params->flags); return STATUS_SUCCESS; }
@@ -9950,7 +9950,7 @@ static NTSTATUS wine_vkTrimCommandPoolKHR(void *args) { struct vkTrimCommandPoolKHR_params *params = args; TRACE("%p, 0x%s, %#x\n", params->device, wine_dbgstr_longlong(params->commandPool), params->flags); - params->device->funcs.p_vkTrimCommandPoolKHR(params->device->device, wine_cmd_pool_from_handle(params->commandPool)->command_pool, params->flags); + wine_device_from_handle(params->device)->funcs.p_vkTrimCommandPoolKHR(wine_device_from_handle(params->device)->device, wine_cmd_pool_from_handle(params->commandPool)->command_pool, params->flags); return STATUS_SUCCESS; }
@@ -9958,7 +9958,7 @@ static NTSTATUS wine_vkUninitializePerformanceApiINTEL(void *args) { struct vkUninitializePerformanceApiINTEL_params *params = args; TRACE("%p\n", params->device); - params->device->funcs.p_vkUninitializePerformanceApiINTEL(params->device->device); + wine_device_from_handle(params->device)->funcs.p_vkUninitializePerformanceApiINTEL(wine_device_from_handle(params->device)->device); return STATUS_SUCCESS; }
@@ -9966,7 +9966,7 @@ static NTSTATUS wine_vkUnmapMemory(void *args) { struct vkUnmapMemory_params *params = args; TRACE("%p, 0x%s\n", params->device, wine_dbgstr_longlong(params->memory)); - params->device->funcs.p_vkUnmapMemory(params->device->device, params->memory); + wine_device_from_handle(params->device)->funcs.p_vkUnmapMemory(wine_device_from_handle(params->device)->device, params->memory); return STATUS_SUCCESS; }
@@ -9974,7 +9974,7 @@ static NTSTATUS wine_vkUpdateDescriptorSetWithTemplate(void *args) { struct vkUpdateDescriptorSetWithTemplate_params *params = args; TRACE("%p, 0x%s, 0x%s, %p\n", params->device, wine_dbgstr_longlong(params->descriptorSet), wine_dbgstr_longlong(params->descriptorUpdateTemplate), params->pData); - params->device->funcs.p_vkUpdateDescriptorSetWithTemplate(params->device->device, params->descriptorSet, params->descriptorUpdateTemplate, params->pData); + wine_device_from_handle(params->device)->funcs.p_vkUpdateDescriptorSetWithTemplate(wine_device_from_handle(params->device)->device, params->descriptorSet, params->descriptorUpdateTemplate, params->pData); return STATUS_SUCCESS; }
@@ -9982,7 +9982,7 @@ static NTSTATUS wine_vkUpdateDescriptorSetWithTemplateKHR(void *args) { struct vkUpdateDescriptorSetWithTemplateKHR_params *params = args; TRACE("%p, 0x%s, 0x%s, %p\n", params->device, wine_dbgstr_longlong(params->descriptorSet), wine_dbgstr_longlong(params->descriptorUpdateTemplate), params->pData); - params->device->funcs.p_vkUpdateDescriptorSetWithTemplateKHR(params->device->device, params->descriptorSet, params->descriptorUpdateTemplate, params->pData); + wine_device_from_handle(params->device)->funcs.p_vkUpdateDescriptorSetWithTemplateKHR(wine_device_from_handle(params->device)->device, params->descriptorSet, params->descriptorUpdateTemplate, params->pData); return STATUS_SUCCESS; }
@@ -9996,14 +9996,14 @@ static NTSTATUS wine_vkUpdateDescriptorSets(void *args)
pDescriptorWrites_host = convert_VkWriteDescriptorSet_array_win_to_host(params->pDescriptorWrites, params->descriptorWriteCount); pDescriptorCopies_host = convert_VkCopyDescriptorSet_array_win_to_host(params->pDescriptorCopies, params->descriptorCopyCount); - params->device->funcs.p_vkUpdateDescriptorSets(params->device->device, params->descriptorWriteCount, pDescriptorWrites_host, params->descriptorCopyCount, pDescriptorCopies_host); + wine_device_from_handle(params->device)->funcs.p_vkUpdateDescriptorSets(wine_device_from_handle(params->device)->device, params->descriptorWriteCount, pDescriptorWrites_host, params->descriptorCopyCount, pDescriptorCopies_host);
free_VkWriteDescriptorSet_array(pDescriptorWrites_host, params->descriptorWriteCount); free_VkCopyDescriptorSet_array(pDescriptorCopies_host, params->descriptorCopyCount); return STATUS_SUCCESS; #else TRACE("%p, %u, %p, %u, %p\n", params->device, params->descriptorWriteCount, params->pDescriptorWrites, params->descriptorCopyCount, params->pDescriptorCopies); - params->device->funcs.p_vkUpdateDescriptorSets(params->device->device, params->descriptorWriteCount, params->pDescriptorWrites, params->descriptorCopyCount, params->pDescriptorCopies); + wine_device_from_handle(params->device)->funcs.p_vkUpdateDescriptorSets(wine_device_from_handle(params->device)->device, params->descriptorWriteCount, params->pDescriptorWrites, params->descriptorCopyCount, params->pDescriptorCopies); return STATUS_SUCCESS; #endif } @@ -10012,35 +10012,35 @@ static NTSTATUS wine_vkWaitForFences(void *args) { struct vkWaitForFences_params *params = args; TRACE("%p, %u, %p, %u, 0x%s\n", params->device, params->fenceCount, params->pFences, params->waitAll, wine_dbgstr_longlong(params->timeout)); - return params->device->funcs.p_vkWaitForFences(params->device->device, params->fenceCount, params->pFences, params->waitAll, params->timeout); + return wine_device_from_handle(params->device)->funcs.p_vkWaitForFences(wine_device_from_handle(params->device)->device, params->fenceCount, params->pFences, params->waitAll, params->timeout); }
static NTSTATUS wine_vkWaitForPresentKHR(void *args) { struct vkWaitForPresentKHR_params *params = args; TRACE("%p, 0x%s, 0x%s, 0x%s\n", params->device, wine_dbgstr_longlong(params->swapchain), wine_dbgstr_longlong(params->presentId), wine_dbgstr_longlong(params->timeout)); - return params->device->funcs.p_vkWaitForPresentKHR(params->device->device, params->swapchain, params->presentId, params->timeout); + return wine_device_from_handle(params->device)->funcs.p_vkWaitForPresentKHR(wine_device_from_handle(params->device)->device, params->swapchain, params->presentId, params->timeout); }
static NTSTATUS wine_vkWaitSemaphores(void *args) { struct vkWaitSemaphores_params *params = args; TRACE("%p, %p, 0x%s\n", params->device, params->pWaitInfo, wine_dbgstr_longlong(params->timeout)); - return params->device->funcs.p_vkWaitSemaphores(params->device->device, params->pWaitInfo, params->timeout); + return wine_device_from_handle(params->device)->funcs.p_vkWaitSemaphores(wine_device_from_handle(params->device)->device, params->pWaitInfo, params->timeout); }
static NTSTATUS wine_vkWaitSemaphoresKHR(void *args) { struct vkWaitSemaphoresKHR_params *params = args; TRACE("%p, %p, 0x%s\n", params->device, params->pWaitInfo, wine_dbgstr_longlong(params->timeout)); - return params->device->funcs.p_vkWaitSemaphoresKHR(params->device->device, params->pWaitInfo, params->timeout); + return wine_device_from_handle(params->device)->funcs.p_vkWaitSemaphoresKHR(wine_device_from_handle(params->device)->device, params->pWaitInfo, params->timeout); }
static NTSTATUS wine_vkWriteAccelerationStructuresPropertiesKHR(void *args) { struct vkWriteAccelerationStructuresPropertiesKHR_params *params = args; TRACE("%p, %u, %p, %#x, 0x%s, %p, 0x%s\n", params->device, params->accelerationStructureCount, params->pAccelerationStructures, params->queryType, wine_dbgstr_longlong(params->dataSize), params->pData, wine_dbgstr_longlong(params->stride)); - return params->device->funcs.p_vkWriteAccelerationStructuresPropertiesKHR(params->device->device, params->accelerationStructureCount, params->pAccelerationStructures, params->queryType, params->dataSize, params->pData, params->stride); + return wine_device_from_handle(params->device)->funcs.p_vkWriteAccelerationStructuresPropertiesKHR(wine_device_from_handle(params->device)->device, params->accelerationStructureCount, params->pAccelerationStructures, params->queryType, params->dataSize, params->pData, params->stride); }
static const char * const vk_device_extensions[] = @@ -10335,7 +10335,7 @@ uint64_t wine_vk_unwrap_handle(VkObjectType type, uint64_t handle) case VK_OBJECT_TYPE_DEBUG_UTILS_MESSENGER_EXT: return (uint64_t) wine_debug_utils_messenger_from_handle(handle)->debug_messenger; case VK_OBJECT_TYPE_DEVICE: - return (uint64_t) (uintptr_t) ((VkDevice) (uintptr_t) handle)->device; + return (uint64_t) (uintptr_t) wine_device_from_handle(((VkDevice) (uintptr_t) handle))->device; case VK_OBJECT_TYPE_INSTANCE: return (uint64_t) (uintptr_t) ((VkInstance) (uintptr_t) handle)->instance; case VK_OBJECT_TYPE_PHYSICAL_DEVICE:
From: Jacek Caban jacek@codeweavers.com
--- dlls/winevulkan/loader.c | 7 ++++++- dlls/winevulkan/make_vulkan | 6 ++++-- dlls/winevulkan/vulkan.c | 21 ++++++++++++--------- dlls/winevulkan/vulkan_loader.h | 6 ++++++ dlls/winevulkan/vulkan_private.h | 12 +++++++++--- dlls/winevulkan/vulkan_thunks.c | 32 ++++++++++++++++---------------- 6 files changed, 53 insertions(+), 31 deletions(-)
diff --git a/dlls/winevulkan/loader.c b/dlls/winevulkan/loader.c index 9fdd0c3f1d0..3e92ba0396f 100644 --- a/dlls/winevulkan/loader.c +++ b/dlls/winevulkan/loader.c @@ -428,11 +428,16 @@ VkResult WINAPI vkCreateDevice(VkPhysicalDevice phys_dev, const VkDeviceCreateIn const VkAllocationCallbacks *allocator, VkDevice *ret) { struct vkCreateDevice_params params; + uint32_t queue_count = 0, i; VkDevice device; VkResult result;
- if (!(device = alloc_vk_object(sizeof(*device)))) + for (i = 0; i < create_info->queueCreateInfoCount; i++) + queue_count += create_info->pQueueCreateInfos[i].queueCount; + if (!(device = alloc_vk_object(FIELD_OFFSET(struct VkDevice_T, queues[queue_count])))) return VK_ERROR_OUT_OF_HOST_MEMORY; + for (i = 0; i < queue_count; i++) + device->queues[i].base.loader_magic = VULKAN_ICD_MAGIC_VALUE;
params.physicalDevice = phys_dev; params.pCreateInfo = create_info; diff --git a/dlls/winevulkan/make_vulkan b/dlls/winevulkan/make_vulkan index 2b56fcd0da9..cd03fb548bb 100755 --- a/dlls/winevulkan/make_vulkan +++ b/dlls/winevulkan/make_vulkan @@ -1063,6 +1063,8 @@ class VkHandle(object): return "{0}->funcs".format(param) elif self.name == "VkDevice": return "wine_device_from_handle({0})->funcs".format(param) + elif self.name == "VkQueue": + return "wine_queue_from_handle({0})->device->funcs".format(param) elif self.parent in ["VkInstance", "VkPhysicalDevice"]: return "{0}->instance->funcs".format(param) elif self.parent in ["VkDevice", "VkCommandPool"]: @@ -1102,6 +1104,8 @@ class VkHandle(object): return "wine_debug_report_callback_from_handle({0})->debug_callback".format(name) if self.name == "VkDevice": return "wine_device_from_handle({0})->device".format(name) + if self.name == "VkQueue": + return "wine_queue_from_handle({0})->queue".format(name) if self.name == "VkSurfaceKHR": return "wine_surface_from_handle({0})->surface".format(name)
@@ -1113,8 +1117,6 @@ class VkHandle(object): native_handle_name = "instance" if self.name == "VkPhysicalDevice": native_handle_name = "phys_dev" - if self.name == "VkQueue": - native_handle_name = "queue"
if native_handle_name: return "{0}->{1}".format(name, native_handle_name) diff --git a/dlls/winevulkan/vulkan.c b/dlls/winevulkan/vulkan.c index ce26cdcc69f..7b814217bcd 100644 --- a/dlls/winevulkan/vulkan.c +++ b/dlls/winevulkan/vulkan.c @@ -324,17 +324,17 @@ static void wine_vk_free_command_buffers(struct wine_device *device,
static void wine_vk_device_get_queues(struct wine_device *device, uint32_t family_index, uint32_t queue_count, VkDeviceQueueCreateFlags flags, - struct VkQueue_T* queues) + struct wine_queue *queues, VkQueue *handles) { VkDeviceQueueInfo2 queue_info; unsigned int i;
for (i = 0; i < queue_count; i++) { - struct VkQueue_T *queue = &queues[i]; + struct wine_queue *queue = &queues[i];
- queue->base.loader_magic = VULKAN_ICD_MAGIC_VALUE; queue->device = device; + queue->handle = (*handles)++; queue->family_index = family_index; queue->queue_index = i; queue->flags = flags; @@ -358,7 +358,8 @@ static void wine_vk_device_get_queues(struct wine_device *device, device->funcs.p_vkGetDeviceQueue(device->device, family_index, i, &queue->queue); }
- WINE_VK_ADD_DISPATCHABLE_MAPPING(device->phys_dev->instance, queue, queue->queue, queue); + queue->handle->base.unix_handle = (uintptr_t)queue; + WINE_VK_ADD_DISPATCHABLE_MAPPING(device->phys_dev->instance, queue->handle, queue->queue, queue); } }
@@ -406,7 +407,7 @@ static VkResult wine_vk_device_convert_create_info(const VkDeviceCreateInfo *src */ static void wine_vk_device_free(struct wine_device *device) { - struct VkQueue_T *queue; + struct wine_queue *queue;
if (!device) return; @@ -702,7 +703,8 @@ NTSTATUS wine_vkCreateDevice(void *args) VkDevice *ret_device = params->pDevice; VkDevice device_handle = params->client_ptr; VkDeviceCreateInfo create_info_host; - struct VkQueue_T *next_queue; + struct VkQueue_T *queue_handles; + struct wine_queue *next_queue; struct wine_device *object; unsigned int i; VkResult res; @@ -768,6 +770,7 @@ NTSTATUS wine_vkCreateDevice(void *args) }
next_queue = object->queues; + queue_handles = device_handle->queues; for (i = 0; i < create_info_host.queueCreateInfoCount; i++) { uint32_t flags = create_info_host.pQueueCreateInfos[i].flags; @@ -776,7 +779,7 @@ NTSTATUS wine_vkCreateDevice(void *args)
TRACE("Queue family index %u, queue count %u.\n", family_index, queue_count);
- wine_vk_device_get_queues(object, family_index, queue_count, flags, next_queue); + wine_vk_device_get_queues(object, family_index, queue_count, flags, next_queue, &queue_handles); next_queue += queue_count; }
@@ -1072,7 +1075,7 @@ NTSTATUS wine_vkFreeCommandBuffers(void *args) static VkQueue wine_vk_device_find_queue(VkDevice handle, const VkDeviceQueueInfo2 *info) { struct wine_device *device = wine_device_from_handle(handle); - struct VkQueue_T* queue; + struct wine_queue *queue; uint32_t i;
for (i = 0; i < device->queue_count; i++) @@ -1082,7 +1085,7 @@ static VkQueue wine_vk_device_find_queue(VkDevice handle, const VkDeviceQueueInf && queue->queue_index == info->queueIndex && queue->flags == info->flags) { - return queue; + return queue->handle; } }
diff --git a/dlls/winevulkan/vulkan_loader.h b/dlls/winevulkan/vulkan_loader.h index 5baecf2cd30..f47cc59e032 100644 --- a/dlls/winevulkan/vulkan_loader.h +++ b/dlls/winevulkan/vulkan_loader.h @@ -54,10 +54,16 @@ struct wine_vk_base UINT64 unix_handle; };
+struct VkQueue_T +{ + struct wine_vk_base base; +}; + struct VkDevice_T { struct wine_vk_base base; unsigned int quirks; + struct VkQueue_T queues[1]; };
struct vulkan_func diff --git a/dlls/winevulkan/vulkan_private.h b/dlls/winevulkan/vulkan_private.h index c57cd2693bd..31f7980cb20 100644 --- a/dlls/winevulkan/vulkan_private.h +++ b/dlls/winevulkan/vulkan_private.h @@ -61,7 +61,7 @@ struct wine_device VkDevice handle; /* client device */ VkDevice device; /* native device */
- struct VkQueue_T* queues; + struct wine_queue *queues; uint32_t queue_count;
struct wine_vk_mapping mapping; @@ -124,10 +124,11 @@ struct VkPhysicalDevice_T struct wine_vk_mapping mapping; };
-struct VkQueue_T +struct wine_queue { - struct wine_vk_base base; struct wine_device *device; /* parent */ + + VkQueue handle; /* client queue */ VkQueue queue; /* native queue */
uint32_t family_index; @@ -137,6 +138,11 @@ struct VkQueue_T struct wine_vk_mapping mapping; };
+static inline struct wine_queue *wine_queue_from_handle(VkQueue handle) +{ + return (struct wine_queue *)(uintptr_t)handle->base.unix_handle; +} + struct wine_cmd_pool { VkCommandPool command_pool; diff --git a/dlls/winevulkan/vulkan_thunks.c b/dlls/winevulkan/vulkan_thunks.c index 638db4f7289..8395724fd8e 100644 --- a/dlls/winevulkan/vulkan_thunks.c +++ b/dlls/winevulkan/vulkan_thunks.c @@ -9459,7 +9459,7 @@ static NTSTATUS wine_vkGetQueueCheckpointData2NV(void *args) { struct vkGetQueueCheckpointData2NV_params *params = args; TRACE("%p, %p, %p\n", params->queue, params->pCheckpointDataCount, params->pCheckpointData); - params->queue->device->funcs.p_vkGetQueueCheckpointData2NV(params->queue->queue, params->pCheckpointDataCount, params->pCheckpointData); + wine_queue_from_handle(params->queue)->device->funcs.p_vkGetQueueCheckpointData2NV(wine_queue_from_handle(params->queue)->queue, params->pCheckpointDataCount, params->pCheckpointData); return STATUS_SUCCESS; }
@@ -9467,7 +9467,7 @@ static NTSTATUS wine_vkGetQueueCheckpointDataNV(void *args) { struct vkGetQueueCheckpointDataNV_params *params = args; TRACE("%p, %p, %p\n", params->queue, params->pCheckpointDataCount, params->pCheckpointData); - params->queue->device->funcs.p_vkGetQueueCheckpointDataNV(params->queue->queue, params->pCheckpointDataCount, params->pCheckpointData); + wine_queue_from_handle(params->queue)->device->funcs.p_vkGetQueueCheckpointDataNV(wine_queue_from_handle(params->queue)->queue, params->pCheckpointDataCount, params->pCheckpointData); return STATUS_SUCCESS; }
@@ -9609,7 +9609,7 @@ static NTSTATUS wine_vkQueueBeginDebugUtilsLabelEXT(void *args) { struct vkQueueBeginDebugUtilsLabelEXT_params *params = args; TRACE("%p, %p\n", params->queue, params->pLabelInfo); - params->queue->device->funcs.p_vkQueueBeginDebugUtilsLabelEXT(params->queue->queue, params->pLabelInfo); + wine_queue_from_handle(params->queue)->device->funcs.p_vkQueueBeginDebugUtilsLabelEXT(wine_queue_from_handle(params->queue)->queue, params->pLabelInfo); return STATUS_SUCCESS; }
@@ -9622,13 +9622,13 @@ static NTSTATUS wine_vkQueueBindSparse(void *args) TRACE("%p, %u, %p, 0x%s\n", params->queue, params->bindInfoCount, params->pBindInfo, wine_dbgstr_longlong(params->fence));
pBindInfo_host = convert_VkBindSparseInfo_array_win_to_host(params->pBindInfo, params->bindInfoCount); - result = params->queue->device->funcs.p_vkQueueBindSparse(params->queue->queue, params->bindInfoCount, pBindInfo_host, params->fence); + result = wine_queue_from_handle(params->queue)->device->funcs.p_vkQueueBindSparse(wine_queue_from_handle(params->queue)->queue, params->bindInfoCount, pBindInfo_host, params->fence);
free_VkBindSparseInfo_array(pBindInfo_host, params->bindInfoCount); return result; #else TRACE("%p, %u, %p, 0x%s\n", params->queue, params->bindInfoCount, params->pBindInfo, wine_dbgstr_longlong(params->fence)); - return params->queue->device->funcs.p_vkQueueBindSparse(params->queue->queue, params->bindInfoCount, params->pBindInfo, params->fence); + return wine_queue_from_handle(params->queue)->device->funcs.p_vkQueueBindSparse(wine_queue_from_handle(params->queue)->queue, params->bindInfoCount, params->pBindInfo, params->fence); #endif }
@@ -9636,7 +9636,7 @@ static NTSTATUS wine_vkQueueEndDebugUtilsLabelEXT(void *args) { struct vkQueueEndDebugUtilsLabelEXT_params *params = args; TRACE("%p\n", params->queue); - params->queue->device->funcs.p_vkQueueEndDebugUtilsLabelEXT(params->queue->queue); + wine_queue_from_handle(params->queue)->device->funcs.p_vkQueueEndDebugUtilsLabelEXT(wine_queue_from_handle(params->queue)->queue); return STATUS_SUCCESS; }
@@ -9644,7 +9644,7 @@ static NTSTATUS wine_vkQueueInsertDebugUtilsLabelEXT(void *args) { struct vkQueueInsertDebugUtilsLabelEXT_params *params = args; TRACE("%p, %p\n", params->queue, params->pLabelInfo); - params->queue->device->funcs.p_vkQueueInsertDebugUtilsLabelEXT(params->queue->queue, params->pLabelInfo); + wine_queue_from_handle(params->queue)->device->funcs.p_vkQueueInsertDebugUtilsLabelEXT(wine_queue_from_handle(params->queue)->queue, params->pLabelInfo); return STATUS_SUCCESS; }
@@ -9652,14 +9652,14 @@ static NTSTATUS wine_vkQueuePresentKHR(void *args) { struct vkQueuePresentKHR_params *params = args; TRACE("%p, %p\n", params->queue, params->pPresentInfo); - return params->queue->device->funcs.p_vkQueuePresentKHR(params->queue->queue, params->pPresentInfo); + return wine_queue_from_handle(params->queue)->device->funcs.p_vkQueuePresentKHR(wine_queue_from_handle(params->queue)->queue, params->pPresentInfo); }
static NTSTATUS wine_vkQueueSetPerformanceConfigurationINTEL(void *args) { struct vkQueueSetPerformanceConfigurationINTEL_params *params = args; TRACE("%p, 0x%s\n", params->queue, wine_dbgstr_longlong(params->configuration)); - return params->queue->device->funcs.p_vkQueueSetPerformanceConfigurationINTEL(params->queue->queue, params->configuration); + return wine_queue_from_handle(params->queue)->device->funcs.p_vkQueueSetPerformanceConfigurationINTEL(wine_queue_from_handle(params->queue)->queue, params->configuration); }
static NTSTATUS wine_vkQueueSubmit(void *args) @@ -9670,7 +9670,7 @@ static NTSTATUS wine_vkQueueSubmit(void *args) TRACE("%p, %u, %p, 0x%s\n", params->queue, params->submitCount, params->pSubmits, wine_dbgstr_longlong(params->fence));
pSubmits_host = convert_VkSubmitInfo_array_win_to_host(params->pSubmits, params->submitCount); - result = params->queue->device->funcs.p_vkQueueSubmit(params->queue->queue, params->submitCount, pSubmits_host, params->fence); + result = wine_queue_from_handle(params->queue)->device->funcs.p_vkQueueSubmit(wine_queue_from_handle(params->queue)->queue, params->submitCount, pSubmits_host, params->fence);
free_VkSubmitInfo_array(pSubmits_host, params->submitCount); return result; @@ -9685,7 +9685,7 @@ static NTSTATUS wine_vkQueueSubmit2(void *args) TRACE("%p, %u, %p, 0x%s\n", params->queue, params->submitCount, params->pSubmits, wine_dbgstr_longlong(params->fence));
pSubmits_host = convert_VkSubmitInfo2_array_win_to_host(params->pSubmits, params->submitCount); - result = params->queue->device->funcs.p_vkQueueSubmit2(params->queue->queue, params->submitCount, pSubmits_host, params->fence); + result = wine_queue_from_handle(params->queue)->device->funcs.p_vkQueueSubmit2(wine_queue_from_handle(params->queue)->queue, params->submitCount, pSubmits_host, params->fence);
free_VkSubmitInfo2_array(pSubmits_host, params->submitCount); return result; @@ -9695,7 +9695,7 @@ static NTSTATUS wine_vkQueueSubmit2(void *args) TRACE("%p, %u, %p, 0x%s\n", params->queue, params->submitCount, params->pSubmits, wine_dbgstr_longlong(params->fence));
pSubmits_host = convert_VkSubmitInfo2_array_win_to_host(params->pSubmits, params->submitCount); - result = params->queue->device->funcs.p_vkQueueSubmit2(params->queue->queue, params->submitCount, pSubmits_host, params->fence); + result = wine_queue_from_handle(params->queue)->device->funcs.p_vkQueueSubmit2(wine_queue_from_handle(params->queue)->queue, params->submitCount, pSubmits_host, params->fence);
free_VkSubmitInfo2_array(pSubmits_host, params->submitCount); return result; @@ -9711,7 +9711,7 @@ static NTSTATUS wine_vkQueueSubmit2KHR(void *args) TRACE("%p, %u, %p, 0x%s\n", params->queue, params->submitCount, params->pSubmits, wine_dbgstr_longlong(params->fence));
pSubmits_host = convert_VkSubmitInfo2_array_win_to_host(params->pSubmits, params->submitCount); - result = params->queue->device->funcs.p_vkQueueSubmit2KHR(params->queue->queue, params->submitCount, pSubmits_host, params->fence); + result = wine_queue_from_handle(params->queue)->device->funcs.p_vkQueueSubmit2KHR(wine_queue_from_handle(params->queue)->queue, params->submitCount, pSubmits_host, params->fence);
free_VkSubmitInfo2_array(pSubmits_host, params->submitCount); return result; @@ -9721,7 +9721,7 @@ static NTSTATUS wine_vkQueueSubmit2KHR(void *args) TRACE("%p, %u, %p, 0x%s\n", params->queue, params->submitCount, params->pSubmits, wine_dbgstr_longlong(params->fence));
pSubmits_host = convert_VkSubmitInfo2_array_win_to_host(params->pSubmits, params->submitCount); - result = params->queue->device->funcs.p_vkQueueSubmit2KHR(params->queue->queue, params->submitCount, pSubmits_host, params->fence); + result = wine_queue_from_handle(params->queue)->device->funcs.p_vkQueueSubmit2KHR(wine_queue_from_handle(params->queue)->queue, params->submitCount, pSubmits_host, params->fence);
free_VkSubmitInfo2_array(pSubmits_host, params->submitCount); return result; @@ -9732,7 +9732,7 @@ static NTSTATUS wine_vkQueueWaitIdle(void *args) { struct vkQueueWaitIdle_params *params = args; TRACE("%p\n", params->queue); - return params->queue->device->funcs.p_vkQueueWaitIdle(params->queue->queue); + return wine_queue_from_handle(params->queue)->device->funcs.p_vkQueueWaitIdle(wine_queue_from_handle(params->queue)->queue); }
static NTSTATUS wine_vkReleasePerformanceConfigurationINTEL(void *args) @@ -10341,7 +10341,7 @@ uint64_t wine_vk_unwrap_handle(VkObjectType type, uint64_t handle) case VK_OBJECT_TYPE_PHYSICAL_DEVICE: return (uint64_t) (uintptr_t) ((VkPhysicalDevice) (uintptr_t) handle)->phys_dev; case VK_OBJECT_TYPE_QUEUE: - return (uint64_t) (uintptr_t) ((VkQueue) (uintptr_t) handle)->queue; + return (uint64_t) (uintptr_t) wine_queue_from_handle(((VkQueue) (uintptr_t) handle))->queue; case VK_OBJECT_TYPE_SURFACE_KHR: return (uint64_t) wine_surface_from_handle(handle)->surface; default:
From: Jacek Caban jacek@codeweavers.com
--- dlls/winevulkan/loader.c | 29 ++++++++++++++---- dlls/winevulkan/loader_thunks.c | 8 ----- dlls/winevulkan/loader_thunks.h | 1 + dlls/winevulkan/make_vulkan | 10 +++---- dlls/winevulkan/vulkan.c | 51 +++++++++++++++++--------------- dlls/winevulkan/vulkan_loader.h | 5 ++++ dlls/winevulkan/vulkan_private.h | 16 ++++++---- dlls/winevulkan/vulkan_thunks.c | 8 ++--- 8 files changed, 77 insertions(+), 51 deletions(-)
diff --git a/dlls/winevulkan/loader.c b/dlls/winevulkan/loader.c index 3e92ba0396f..72a692dd513 100644 --- a/dlls/winevulkan/loader.c +++ b/dlls/winevulkan/loader.c @@ -17,6 +17,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */
+#include <stdlib.h> #include "vulkan_loader.h" #include "winreg.h" #include "ntuser.h" @@ -251,19 +252,37 @@ static BOOL wine_vk_init_once(void) }
VkResult WINAPI vkCreateInstance(const VkInstanceCreateInfo *create_info, - const VkAllocationCallbacks *allocator, VkInstance *instance) + const VkAllocationCallbacks *allocator, VkInstance *ret) { struct vkCreateInstance_params params; + struct VkInstance_T *instance; + VkResult result;
- TRACE("create_info %p, allocator %p, instance %p\n", create_info, allocator, instance); + TRACE("create_info %p, allocator %p, instance %p\n", create_info, allocator, ret);
- if(!wine_vk_init_once()) + if (!wine_vk_init_once()) return VK_ERROR_INITIALIZATION_FAILED;
+ if (!(instance = alloc_vk_object(sizeof(*instance)))) + return VK_ERROR_OUT_OF_HOST_MEMORY; + params.pCreateInfo = create_info; params.pAllocator = allocator; - params.pInstance = instance; - return vk_unix_call(unix_vkCreateInstance, ¶ms); + params.pInstance = ret; + params.client_ptr = instance; + result = vk_unix_call(unix_vkCreateInstance, ¶ms); + if (!instance->base.unix_handle) + free(instance); + return result; +} + +void WINAPI vkDestroyInstance(VkInstance instance, const VkAllocationCallbacks *pAllocator) +{ + struct vkDestroyInstance_params params; + params.instance = instance; + params.pAllocator = pAllocator; + vk_unix_call(unix_vkDestroyInstance, ¶ms); + free(instance); }
VkResult WINAPI vkEnumerateInstanceExtensionProperties(const char *layer_name, diff --git a/dlls/winevulkan/loader_thunks.c b/dlls/winevulkan/loader_thunks.c index db4d39bc7fd..cb4ea68a8b4 100644 --- a/dlls/winevulkan/loader_thunks.c +++ b/dlls/winevulkan/loader_thunks.c @@ -2585,14 +2585,6 @@ void WINAPI vkDestroyIndirectCommandsLayoutNV(VkDevice device, VkIndirectCommand vk_unix_call(unix_vkDestroyIndirectCommandsLayoutNV, ¶ms); }
-void WINAPI vkDestroyInstance(VkInstance instance, const VkAllocationCallbacks *pAllocator) -{ - struct vkDestroyInstance_params params; - params.instance = instance; - params.pAllocator = pAllocator; - vk_unix_call(unix_vkDestroyInstance, ¶ms); -} - void WINAPI vkDestroyPipeline(VkDevice device, VkPipeline pipeline, const VkAllocationCallbacks *pAllocator) { struct vkDestroyPipeline_params params; diff --git a/dlls/winevulkan/loader_thunks.h b/dlls/winevulkan/loader_thunks.h index 814f5781fbe..b42496e3655 100644 --- a/dlls/winevulkan/loader_thunks.h +++ b/dlls/winevulkan/loader_thunks.h @@ -2221,6 +2221,7 @@ struct vkCreateInstance_params const VkInstanceCreateInfo *pCreateInfo; const VkAllocationCallbacks *pAllocator; VkInstance *pInstance; + void *client_ptr; };
struct vkCreatePipelineCache_params diff --git a/dlls/winevulkan/make_vulkan b/dlls/winevulkan/make_vulkan index cd03fb548bb..5fb1b317d5a 100755 --- a/dlls/winevulkan/make_vulkan +++ b/dlls/winevulkan/make_vulkan @@ -179,7 +179,7 @@ class ThunkType(Enum): # - loader_thunk sets whether to create a thunk for unix funcs. FUNCTION_OVERRIDES = { # Global functions - "vkCreateInstance" : {"dispatch" : False, "driver" : True, "thunk" : ThunkType.NONE, "loader_thunk" : ThunkType.PRIVATE}, + "vkCreateInstance" : {"dispatch" : False, "driver" : True, "thunk" : ThunkType.NONE, "loader_thunk" : ThunkType.PRIVATE, "extra_param" : "client_ptr"}, "vkEnumerateInstanceExtensionProperties" : {"dispatch" : False, "driver" : True, "thunk" : ThunkType.NONE, "loader_thunk" : ThunkType.PRIVATE}, "vkEnumerateInstanceLayerProperties" : {"dispatch" : False, "driver" : False, "thunk" : ThunkType.NONE, "loader_thunk" : ThunkType.NONE}, "vkEnumerateInstanceVersion": {"dispatch" : False, "driver" : False, "thunk" : ThunkType.NONE, "loader_thunk" : ThunkType.PRIVATE}, @@ -187,7 +187,7 @@ FUNCTION_OVERRIDES = {
# Instance functions "vkCreateDevice" : {"dispatch" : True, "driver" : False, "thunk" : ThunkType.NONE, "loader_thunk" : ThunkType.PRIVATE, "extra_param" : "client_ptr"}, - "vkDestroyInstance" : {"dispatch" : False, "driver" : True, "thunk" : ThunkType.NONE }, + "vkDestroyInstance" : {"dispatch" : False, "driver" : True, "thunk" : ThunkType.NONE, "loader_thunk" : ThunkType.PRIVATE}, "vkEnumerateDeviceExtensionProperties" : {"dispatch" : True, "driver" : False, "thunk" : ThunkType.NONE}, "vkEnumerateDeviceLayerProperties": {"dispatch": True, "driver": False, "thunk": ThunkType.NONE}, "vkEnumeratePhysicalDeviceGroups" : {"dispatch" : True, "driver" : False, "thunk" : ThunkType.NONE}, @@ -1060,7 +1060,7 @@ class VkHandle(object):
if self.parent is None: # Should only happen for VkInstance - return "{0}->funcs".format(param) + return "wine_instance_from_handle({0})->funcs".format(param) elif self.name == "VkDevice": return "wine_device_from_handle({0})->funcs".format(param) elif self.name == "VkQueue": @@ -1104,6 +1104,8 @@ class VkHandle(object): return "wine_debug_report_callback_from_handle({0})->debug_callback".format(name) if self.name == "VkDevice": return "wine_device_from_handle({0})->device".format(name) + if self.name == "VkInstance": + return "wine_instance_from_handle({0})->instance".format(name) if self.name == "VkQueue": return "wine_queue_from_handle({0})->queue".format(name) if self.name == "VkSurfaceKHR": @@ -1113,8 +1115,6 @@ class VkHandle(object):
if self.name == "VkCommandBuffer": native_handle_name = "command_buffer" - if self.name == "VkInstance": - native_handle_name = "instance" if self.name == "VkPhysicalDevice": native_handle_name = "phys_dev"
diff --git a/dlls/winevulkan/vulkan.c b/dlls/winevulkan/vulkan.c index 7b814217bcd..f829aac3efb 100644 --- a/dlls/winevulkan/vulkan.c +++ b/dlls/winevulkan/vulkan.c @@ -65,7 +65,7 @@ static const struct vulkan_funcs *vk_funcs; wine_vk_add_handle_mapping((instance), (uintptr_t)(client_handle), (uintptr_t)(native_handle), &(object)->mapping) #define WINE_VK_ADD_NON_DISPATCHABLE_MAPPING(instance, object, native_handle) \ wine_vk_add_handle_mapping((instance), (uint64_t) (uintptr_t) (object), (uint64_t) (native_handle), &(object)->mapping) -static void wine_vk_add_handle_mapping(struct VkInstance_T *instance, uint64_t wrapped_handle, +static void wine_vk_add_handle_mapping(struct wine_instance *instance, uint64_t wrapped_handle, uint64_t native_handle, struct wine_vk_mapping *mapping) { if (instance->enable_wrapper_list) @@ -80,7 +80,7 @@ static void wine_vk_add_handle_mapping(struct VkInstance_T *instance, uint64_t
#define WINE_VK_REMOVE_HANDLE_MAPPING(instance, object) \ wine_vk_remove_handle_mapping((instance), &(object)->mapping) -static void wine_vk_remove_handle_mapping(struct VkInstance_T *instance, struct wine_vk_mapping *mapping) +static void wine_vk_remove_handle_mapping(struct wine_instance *instance, struct wine_vk_mapping *mapping) { if (instance->enable_wrapper_list) { @@ -90,7 +90,7 @@ static void wine_vk_remove_handle_mapping(struct VkInstance_T *instance, struct } }
-static uint64_t wine_vk_get_wrapper(struct VkInstance_T *instance, uint64_t native_handle) +static uint64_t wine_vk_get_wrapper(struct wine_instance *instance, uint64_t native_handle) { struct wine_vk_mapping *mapping; uint64_t result = 0; @@ -221,7 +221,7 @@ static void wine_vk_physical_device_free(struct VkPhysicalDevice_T *phys_dev) free(phys_dev); }
-static struct VkPhysicalDevice_T *wine_vk_physical_device_alloc(struct VkInstance_T *instance, +static struct VkPhysicalDevice_T *wine_vk_physical_device_alloc(struct wine_instance *instance, VkPhysicalDevice phys_dev) { struct VkPhysicalDevice_T *object; @@ -453,7 +453,7 @@ NTSTATUS init_vulkan(void *args) * driver is responsible for handling e.g. surface extensions. */ static VkResult wine_vk_instance_convert_create_info(const VkInstanceCreateInfo *src, - VkInstanceCreateInfo *dst, struct VkInstance_T *object) + VkInstanceCreateInfo *dst, struct wine_instance *object) { VkDebugUtilsMessengerCreateInfoEXT *debug_utils_messenger; VkDebugReportCallbackCreateInfoEXT *debug_report_callback; @@ -534,7 +534,7 @@ static VkResult wine_vk_instance_convert_create_info(const VkInstanceCreateInfo }
/* Helper function which stores wrapped physical devices in the instance object. */ -static VkResult wine_vk_instance_load_physical_devices(struct VkInstance_T *instance) +static VkResult wine_vk_instance_load_physical_devices(struct wine_instance *instance) { VkPhysicalDevice *tmp_phys_devs; uint32_t phys_dev_count; @@ -587,7 +587,7 @@ static VkResult wine_vk_instance_load_physical_devices(struct VkInstance_T *inst return VK_SUCCESS; }
-static struct VkPhysicalDevice_T *wine_vk_instance_wrap_physical_device(struct VkInstance_T *instance, +static struct VkPhysicalDevice_T *wine_vk_instance_wrap_physical_device(struct wine_instance *instance, VkPhysicalDevice physical_device) { unsigned int i; @@ -606,7 +606,7 @@ static struct VkPhysicalDevice_T *wine_vk_instance_wrap_physical_device(struct V /* Helper function used for freeing an instance structure. This function supports full * and partial object cleanups and can thus be used for vkCreateInstance failures. */ -static void wine_vk_instance_free(struct VkInstance_T *instance) +static void wine_vk_instance_free(struct wine_instance *instance) { if (!instance) return; @@ -800,9 +800,10 @@ NTSTATUS wine_vkCreateInstance(void *args) const VkInstanceCreateInfo *create_info = params->pCreateInfo; const VkAllocationCallbacks *allocator = params->pAllocator; VkInstance *instance = params->pInstance; + VkInstance client_instance = params->client_ptr; VkInstanceCreateInfo create_info_host; const VkApplicationInfo *app_info; - struct VkInstance_T *object; + struct wine_instance *object; VkResult res;
if (allocator) @@ -813,7 +814,6 @@ NTSTATUS wine_vkCreateInstance(void *args) ERR("Failed to allocate memory for instance\n"); return VK_ERROR_OUT_OF_HOST_MEMORY; } - object->base.loader_magic = VULKAN_ICD_MAGIC_VALUE; list_init(&object->wrappers); pthread_rwlock_init(&object->wrapper_lock, NULL);
@@ -833,7 +833,8 @@ NTSTATUS wine_vkCreateInstance(void *args) return res; }
- WINE_VK_ADD_DISPATCHABLE_MAPPING(object, object, object->instance, object); + object->handle = client_instance; + WINE_VK_ADD_DISPATCHABLE_MAPPING(object, object->handle, object->instance, object);
/* Load all instance functions we are aware of. Note the loader takes care * of any filtering for extensions which were not requested, but which the @@ -871,7 +872,8 @@ NTSTATUS wine_vkCreateInstance(void *args)
object->quirks |= WINEVULKAN_QUIRK_ADJUST_MAX_IMAGE_COUNT;
- *instance = object; + client_instance->base.unix_handle = (uintptr_t)object; + *instance = client_instance; TRACE("Created instance %p (native instance %p).\n", object, object->instance); return VK_SUCCESS; } @@ -894,7 +896,7 @@ NTSTATUS wine_vkDestroyDevice(void *args) NTSTATUS wine_vkDestroyInstance(void *args) { struct vkDestroyInstance_params *params = args; - VkInstance instance = params->instance; + struct wine_instance *instance = wine_instance_from_handle(params->instance); const VkAllocationCallbacks *allocator = params->pAllocator;
TRACE("%p, %p\n", instance, allocator); @@ -1035,7 +1037,7 @@ NTSTATUS wine_vkEnumerateInstanceVersion(void *args) NTSTATUS wine_vkEnumeratePhysicalDevices(void *args) { struct vkEnumeratePhysicalDevices_params *params = args; - VkInstance instance = params->instance; + struct wine_instance *instance = wine_instance_from_handle(params->instance); uint32_t *count = params->pPhysicalDeviceCount; VkPhysicalDevice *devices = params->pPhysicalDevices; unsigned int i; @@ -1199,7 +1201,7 @@ NTSTATUS wine_vkDestroyCommandPool(void *args) return STATUS_SUCCESS; }
-static VkResult wine_vk_enumerate_physical_device_groups(struct VkInstance_T *instance, +static VkResult wine_vk_enumerate_physical_device_groups(struct wine_instance *instance, VkResult (*p_vkEnumeratePhysicalDeviceGroups)(VkInstance, uint32_t *, VkPhysicalDeviceGroupProperties *), uint32_t *count, VkPhysicalDeviceGroupProperties *properties) { @@ -1227,7 +1229,7 @@ static VkResult wine_vk_enumerate_physical_device_groups(struct VkInstance_T *in NTSTATUS wine_vkEnumeratePhysicalDeviceGroups(void *args) { struct vkEnumeratePhysicalDeviceGroups_params *params = args; - VkInstance instance = params->instance; + struct wine_instance *instance = wine_instance_from_handle(params->instance); uint32_t *count = params->pPhysicalDeviceGroupCount; VkPhysicalDeviceGroupProperties *properties = params->pPhysicalDeviceGroupProperties;
@@ -1239,7 +1241,7 @@ NTSTATUS wine_vkEnumeratePhysicalDeviceGroups(void *args) NTSTATUS wine_vkEnumeratePhysicalDeviceGroupsKHR(void *args) { struct vkEnumeratePhysicalDeviceGroupsKHR_params *params = args; - VkInstance instance = params->instance; + struct wine_instance *instance = wine_instance_from_handle(params->instance); uint32_t *count = params->pPhysicalDeviceGroupCount; VkPhysicalDeviceGroupProperties *properties = params->pPhysicalDeviceGroupProperties;
@@ -1535,7 +1537,7 @@ NTSTATUS wine_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR(void *args) NTSTATUS wine_vkCreateWin32SurfaceKHR(void *args) { struct vkCreateWin32SurfaceKHR_params *params = args; - VkInstance instance = params->instance; + struct wine_instance *instance = wine_instance_from_handle(params->instance); const VkWin32SurfaceCreateInfoKHR *createInfo = params->pCreateInfo; const VkAllocationCallbacks *allocator = params->pAllocator; VkSurfaceKHR *surface = params->pSurface; @@ -1572,7 +1574,7 @@ NTSTATUS wine_vkCreateWin32SurfaceKHR(void *args) NTSTATUS wine_vkDestroySurfaceKHR(void *args) { struct vkDestroySurfaceKHR_params *params = args; - VkInstance instance = params->instance; + struct wine_instance *instance = wine_instance_from_handle(params->instance); VkSurfaceKHR surface = params->surface; const VkAllocationCallbacks *allocator = params->pAllocator; struct wine_surface *object = wine_surface_from_handle(surface); @@ -1643,7 +1645,7 @@ NTSTATUS wine_vkGetPhysicalDeviceSurfaceCapabilities2KHR(void *args) NTSTATUS wine_vkCreateDebugUtilsMessengerEXT(void *args) { struct vkCreateDebugUtilsMessengerEXT_params *params = args; - VkInstance instance = params->instance; + struct wine_instance *instance = wine_instance_from_handle(params->instance); const VkDebugUtilsMessengerCreateInfoEXT *create_info = params->pCreateInfo; const VkAllocationCallbacks *allocator = params->pAllocator; VkDebugUtilsMessengerEXT *messenger = params->pMessenger; @@ -1685,7 +1687,7 @@ NTSTATUS wine_vkCreateDebugUtilsMessengerEXT(void *args) NTSTATUS wine_vkDestroyDebugUtilsMessengerEXT(void *args) { struct vkDestroyDebugUtilsMessengerEXT_params *params = args; - VkInstance instance = params->instance; + struct wine_instance *instance = wine_instance_from_handle(params->instance); VkDebugUtilsMessengerEXT messenger = params->messenger; const VkAllocationCallbacks *allocator = params->pAllocator; struct wine_debug_utils_messenger *object; @@ -1707,7 +1709,7 @@ NTSTATUS wine_vkDestroyDebugUtilsMessengerEXT(void *args) NTSTATUS wine_vkCreateDebugReportCallbackEXT(void *args) { struct vkCreateDebugReportCallbackEXT_params *params = args; - VkInstance instance = params->instance; + struct wine_instance *instance = wine_instance_from_handle(params->instance); const VkDebugReportCallbackCreateInfoEXT *create_info = params->pCreateInfo; const VkAllocationCallbacks *allocator = params->pAllocator; VkDebugReportCallbackEXT *callback = params->pCallback; @@ -1749,7 +1751,7 @@ NTSTATUS wine_vkCreateDebugReportCallbackEXT(void *args) NTSTATUS wine_vkDestroyDebugReportCallbackEXT(void *args) { struct vkDestroyDebugReportCallbackEXT_params *params = args; - VkInstance instance = params->instance; + struct wine_instance *instance = wine_instance_from_handle(params->instance); VkDebugReportCallbackEXT callback = params->callback; const VkAllocationCallbacks *allocator = params->pAllocator; struct wine_debug_report_callback *object; @@ -1879,7 +1881,8 @@ NTSTATUS wine_vkCreateRayTracingPipelinesNV(void *args) NTSTATUS vk_is_available_instance_function(void *arg) { struct is_available_instance_function_params *params = arg; - return !!vk_funcs->p_vkGetInstanceProcAddr(params->instance->instance, params->name); + struct wine_instance *instance = wine_instance_from_handle(params->instance); + return !!vk_funcs->p_vkGetInstanceProcAddr(instance->instance, params->name); }
NTSTATUS vk_is_available_device_function(void *arg) diff --git a/dlls/winevulkan/vulkan_loader.h b/dlls/winevulkan/vulkan_loader.h index f47cc59e032..e01f0de3197 100644 --- a/dlls/winevulkan/vulkan_loader.h +++ b/dlls/winevulkan/vulkan_loader.h @@ -54,6 +54,11 @@ struct wine_vk_base UINT64 unix_handle; };
+struct VkInstance_T +{ + struct wine_vk_base base; +}; + struct VkQueue_T { struct wine_vk_base base; diff --git a/dlls/winevulkan/vulkan_private.h b/dlls/winevulkan/vulkan_private.h index 31f7980cb20..61f19964b79 100644 --- a/dlls/winevulkan/vulkan_private.h +++ b/dlls/winevulkan/vulkan_private.h @@ -76,7 +76,7 @@ struct wine_debug_utils_messenger;
struct wine_debug_report_callback { - struct VkInstance_T *instance; /* parent */ + struct wine_instance *instance; /* parent */ VkDebugReportCallbackEXT debug_callback; /* native callback object */
/* application callback + data */ @@ -86,10 +86,11 @@ struct wine_debug_report_callback struct wine_vk_mapping mapping; };
-struct VkInstance_T +struct wine_instance { - struct wine_vk_base base; struct vulkan_instance_funcs funcs; + + VkInstance handle; /* client instance */ VkInstance instance; /* native instance */
/* We cache devices as we need to wrap them as they are @@ -112,10 +113,15 @@ struct VkInstance_T struct wine_vk_mapping mapping; };
+static inline struct wine_instance *wine_instance_from_handle(VkInstance handle) +{ + return (struct wine_instance *)(uintptr_t)handle->base.unix_handle; +} + struct VkPhysicalDevice_T { struct wine_vk_base base; - struct VkInstance_T *instance; /* parent */ + struct wine_instance *instance; /* parent */ VkPhysicalDevice phys_dev; /* native physical device */
VkExtensionProperties *extensions; @@ -164,7 +170,7 @@ static inline VkCommandPool wine_cmd_pool_to_handle(struct wine_cmd_pool *cmd_po
struct wine_debug_utils_messenger { - struct VkInstance_T *instance; /* parent */ + struct wine_instance *instance; /* parent */ VkDebugUtilsMessengerEXT debug_messenger; /* native messenger */
/* application callback + data */ diff --git a/dlls/winevulkan/vulkan_thunks.c b/dlls/winevulkan/vulkan_thunks.c index 8395724fd8e..19e6697edb6 100644 --- a/dlls/winevulkan/vulkan_thunks.c +++ b/dlls/winevulkan/vulkan_thunks.c @@ -7937,7 +7937,7 @@ static NTSTATUS wine_vkDebugReportMessageEXT(void *args) { struct vkDebugReportMessageEXT_params *params = args; TRACE("%p, %#x, %#x, 0x%s, 0x%s, %d, %p, %p\n", params->instance, params->flags, params->objectType, wine_dbgstr_longlong(params->object), wine_dbgstr_longlong(params->location), params->messageCode, params->pLayerPrefix, params->pMessage); - params->instance->funcs.p_vkDebugReportMessageEXT(params->instance->instance, params->flags, params->objectType, wine_vk_unwrap_handle(params->objectType, params->object), params->location, params->messageCode, params->pLayerPrefix, params->pMessage); + wine_instance_from_handle(params->instance)->funcs.p_vkDebugReportMessageEXT(wine_instance_from_handle(params->instance)->instance, params->flags, params->objectType, wine_vk_unwrap_handle(params->objectType, params->object), params->location, params->messageCode, params->pLayerPrefix, params->pMessage); return STATUS_SUCCESS; }
@@ -9922,7 +9922,7 @@ static NTSTATUS wine_vkSubmitDebugUtilsMessageEXT(void *args) TRACE("%p, %#x, %#x, %p\n", params->instance, params->messageSeverity, params->messageTypes, params->pCallbackData);
convert_VkDebugUtilsMessengerCallbackDataEXT_win_to_host(params->pCallbackData, &pCallbackData_host); - params->instance->funcs.p_vkSubmitDebugUtilsMessageEXT(params->instance->instance, params->messageSeverity, params->messageTypes, &pCallbackData_host); + wine_instance_from_handle(params->instance)->funcs.p_vkSubmitDebugUtilsMessageEXT(wine_instance_from_handle(params->instance)->instance, params->messageSeverity, params->messageTypes, &pCallbackData_host);
free_VkDebugUtilsMessengerCallbackDataEXT(&pCallbackData_host); return STATUS_SUCCESS; @@ -9931,7 +9931,7 @@ static NTSTATUS wine_vkSubmitDebugUtilsMessageEXT(void *args) TRACE("%p, %#x, %#x, %p\n", params->instance, params->messageSeverity, params->messageTypes, params->pCallbackData);
convert_VkDebugUtilsMessengerCallbackDataEXT_win_to_host(params->pCallbackData, &pCallbackData_host); - params->instance->funcs.p_vkSubmitDebugUtilsMessageEXT(params->instance->instance, params->messageSeverity, params->messageTypes, &pCallbackData_host); + wine_instance_from_handle(params->instance)->funcs.p_vkSubmitDebugUtilsMessageEXT(wine_instance_from_handle(params->instance)->instance, params->messageSeverity, params->messageTypes, &pCallbackData_host);
free_VkDebugUtilsMessengerCallbackDataEXT(&pCallbackData_host); return STATUS_SUCCESS; @@ -10337,7 +10337,7 @@ uint64_t wine_vk_unwrap_handle(VkObjectType type, uint64_t handle) case VK_OBJECT_TYPE_DEVICE: return (uint64_t) (uintptr_t) wine_device_from_handle(((VkDevice) (uintptr_t) handle))->device; case VK_OBJECT_TYPE_INSTANCE: - return (uint64_t) (uintptr_t) ((VkInstance) (uintptr_t) handle)->instance; + return (uint64_t) (uintptr_t) wine_instance_from_handle(((VkInstance) (uintptr_t) handle))->instance; case VK_OBJECT_TYPE_PHYSICAL_DEVICE: return (uint64_t) (uintptr_t) ((VkPhysicalDevice) (uintptr_t) handle)->phys_dev; case VK_OBJECT_TYPE_QUEUE:
From: Jacek Caban jacek@codeweavers.com
--- dlls/winevulkan/loader.c | 26 +++++--- dlls/winevulkan/make_vulkan | 6 +- dlls/winevulkan/vulkan.c | 49 +++++++++------ dlls/winevulkan/vulkan_loader.h | 7 +++ dlls/winevulkan/vulkan_private.h | 14 +++-- dlls/winevulkan/vulkan_thunks.c | 100 +++++++++++++++---------------- 6 files changed, 120 insertions(+), 82 deletions(-)
diff --git a/dlls/winevulkan/loader.c b/dlls/winevulkan/loader.c index 72a692dd513..221a62a5680 100644 --- a/dlls/winevulkan/loader.c +++ b/dlls/winevulkan/loader.c @@ -256,6 +256,7 @@ VkResult WINAPI vkCreateInstance(const VkInstanceCreateInfo *create_info, { struct vkCreateInstance_params params; struct VkInstance_T *instance; + uint32_t phys_dev_count = 8, i; VkResult result;
TRACE("create_info %p, allocator %p, instance %p\n", create_info, allocator, ret); @@ -263,14 +264,25 @@ VkResult WINAPI vkCreateInstance(const VkInstanceCreateInfo *create_info, if (!wine_vk_init_once()) return VK_ERROR_INITIALIZATION_FAILED;
- if (!(instance = alloc_vk_object(sizeof(*instance)))) - return VK_ERROR_OUT_OF_HOST_MEMORY; + for (;;) + { + if (!(instance = alloc_vk_object(FIELD_OFFSET(struct VkInstance_T, phys_devs[phys_dev_count])))) + return VK_ERROR_OUT_OF_HOST_MEMORY; + instance->phys_dev_count = phys_dev_count; + for (i = 0; i < phys_dev_count; i++) + instance->phys_devs[i].base.loader_magic = VULKAN_ICD_MAGIC_VALUE; + + params.pCreateInfo = create_info; + params.pAllocator = allocator; + params.pInstance = ret; + params.client_ptr = instance; + result = vk_unix_call(unix_vkCreateInstance, ¶ms); + if (instance->phys_dev_count <= phys_dev_count) + break; + phys_dev_count = instance->phys_dev_count; + free(instance); + }
- params.pCreateInfo = create_info; - params.pAllocator = allocator; - params.pInstance = ret; - params.client_ptr = instance; - result = vk_unix_call(unix_vkCreateInstance, ¶ms); if (!instance->base.unix_handle) free(instance); return result; diff --git a/dlls/winevulkan/make_vulkan b/dlls/winevulkan/make_vulkan index 5fb1b317d5a..a1cb6452f25 100755 --- a/dlls/winevulkan/make_vulkan +++ b/dlls/winevulkan/make_vulkan @@ -1063,6 +1063,8 @@ class VkHandle(object): return "wine_instance_from_handle({0})->funcs".format(param) elif self.name == "VkDevice": return "wine_device_from_handle({0})->funcs".format(param) + elif self.name == "VkPhysicalDevice": + return "wine_phys_dev_from_handle({0})->instance->funcs".format(param) elif self.name == "VkQueue": return "wine_queue_from_handle({0})->device->funcs".format(param) elif self.parent in ["VkInstance", "VkPhysicalDevice"]: @@ -1106,6 +1108,8 @@ class VkHandle(object): return "wine_device_from_handle({0})->device".format(name) if self.name == "VkInstance": return "wine_instance_from_handle({0})->instance".format(name) + if self.name == "VkPhysicalDevice": + return "wine_phys_dev_from_handle({0})->phys_dev".format(name) if self.name == "VkQueue": return "wine_queue_from_handle({0})->queue".format(name) if self.name == "VkSurfaceKHR": @@ -1115,8 +1119,6 @@ class VkHandle(object):
if self.name == "VkCommandBuffer": native_handle_name = "command_buffer" - if self.name == "VkPhysicalDevice": - native_handle_name = "phys_dev"
if native_handle_name: return "{0}->{1}".format(name, native_handle_name) diff --git a/dlls/winevulkan/vulkan.c b/dlls/winevulkan/vulkan.c index f829aac3efb..558b09c310a 100644 --- a/dlls/winevulkan/vulkan.c +++ b/dlls/winevulkan/vulkan.c @@ -211,7 +211,7 @@ static VkBool32 debug_report_callback_conversion(VkDebugReportFlagsEXT flags, Vk &ret_ptr, &ret_len ); }
-static void wine_vk_physical_device_free(struct VkPhysicalDevice_T *phys_dev) +static void wine_vk_physical_device_free(struct wine_phys_dev *phys_dev) { if (!phys_dev) return; @@ -221,10 +221,10 @@ static void wine_vk_physical_device_free(struct VkPhysicalDevice_T *phys_dev) free(phys_dev); }
-static struct VkPhysicalDevice_T *wine_vk_physical_device_alloc(struct wine_instance *instance, - VkPhysicalDevice phys_dev) +static struct wine_phys_dev *wine_vk_physical_device_alloc(struct wine_instance *instance, + VkPhysicalDevice phys_dev, VkPhysicalDevice handle) { - struct VkPhysicalDevice_T *object; + struct wine_phys_dev *object; uint32_t num_host_properties, num_properties = 0; VkExtensionProperties *host_properties = NULL; VkResult res; @@ -233,11 +233,12 @@ static struct VkPhysicalDevice_T *wine_vk_physical_device_alloc(struct wine_inst if (!(object = calloc(1, sizeof(*object)))) return NULL;
- object->base.loader_magic = VULKAN_ICD_MAGIC_VALUE; object->instance = instance; + object->handle = handle; object->phys_dev = phys_dev;
- WINE_VK_ADD_DISPATCHABLE_MAPPING(instance, object, phys_dev, object); + handle->base.unix_handle = (uintptr_t)object; + WINE_VK_ADD_DISPATCHABLE_MAPPING(instance, handle, phys_dev, object);
res = instance->funcs.p_vkEnumerateDeviceExtensionProperties(phys_dev, NULL, &num_host_properties, NULL); @@ -550,6 +551,13 @@ static VkResult wine_vk_instance_load_physical_devices(struct wine_instance *ins if (!phys_dev_count) return res;
+ if (phys_dev_count > instance->handle->phys_dev_count) + { + instance->handle->phys_dev_count = phys_dev_count; + return VK_ERROR_OUT_OF_POOL_MEMORY; + } + instance->handle->phys_dev_count = phys_dev_count; + if (!(tmp_phys_devs = calloc(phys_dev_count, sizeof(*tmp_phys_devs)))) return VK_ERROR_OUT_OF_HOST_MEMORY;
@@ -570,7 +578,8 @@ static VkResult wine_vk_instance_load_physical_devices(struct wine_instance *ins /* Wrap each native physical device handle into a dispatchable object for the ICD loader. */ for (i = 0; i < phys_dev_count; i++) { - struct VkPhysicalDevice_T *phys_dev = wine_vk_physical_device_alloc(instance, tmp_phys_devs[i]); + struct wine_phys_dev *phys_dev = wine_vk_physical_device_alloc(instance, tmp_phys_devs[i], + &instance->handle->phys_devs[i]); if (!phys_dev) { ERR("Unable to allocate memory for physical device!\n"); @@ -587,14 +596,14 @@ static VkResult wine_vk_instance_load_physical_devices(struct wine_instance *ins return VK_SUCCESS; }
-static struct VkPhysicalDevice_T *wine_vk_instance_wrap_physical_device(struct wine_instance *instance, +static struct wine_phys_dev *wine_vk_instance_wrap_physical_device(struct wine_instance *instance, VkPhysicalDevice physical_device) { unsigned int i;
for (i = 0; i < instance->phys_dev_count; ++i) { - struct VkPhysicalDevice_T *current = instance->phys_devs[i]; + struct wine_phys_dev *current = instance->phys_devs[i]; if (current->phys_dev == physical_device) return current; } @@ -697,7 +706,7 @@ NTSTATUS wine_vkAllocateCommandBuffers(void *args) NTSTATUS wine_vkCreateDevice(void *args) { struct vkCreateDevice_params *params = args; - VkPhysicalDevice phys_dev = params->physicalDevice; + struct wine_phys_dev *phys_dev = wine_phys_dev_from_handle(params->physicalDevice); const VkDeviceCreateInfo *create_info = params->pCreateInfo; const VkAllocationCallbacks *allocator = params->pAllocator; VkDevice *ret_device = params->pDevice; @@ -911,7 +920,7 @@ NTSTATUS wine_vkDestroyInstance(void *args) NTSTATUS wine_vkEnumerateDeviceExtensionProperties(void *args) { struct vkEnumerateDeviceExtensionProperties_params *params = args; - VkPhysicalDevice phys_dev = params->physicalDevice; + struct wine_phys_dev *phys_dev = wine_phys_dev_from_handle(params->physicalDevice); const char *layer_name = params->pLayerName; uint32_t *count = params->pPropertyCount; VkExtensionProperties *properties = params->pProperties; @@ -1053,7 +1062,7 @@ NTSTATUS wine_vkEnumeratePhysicalDevices(void *args) *count = min(*count, instance->phys_dev_count); for (i = 0; i < *count; i++) { - devices[i] = instance->phys_devs[i]; + devices[i] = instance->phys_devs[i]->handle; }
TRACE("Returning %u devices.\n", *count); @@ -1218,8 +1227,10 @@ static VkResult wine_vk_enumerate_physical_device_groups(struct wine_instance *i for (j = 0; j < current->physicalDeviceCount; ++j) { VkPhysicalDevice dev = current->physicalDevices[j]; - if (!(current->physicalDevices[j] = wine_vk_instance_wrap_physical_device(instance, dev))) + struct wine_phys_dev *phys_dev = wine_vk_instance_wrap_physical_device(instance, dev); + if (!phys_dev) return VK_ERROR_INITIALIZATION_FAILED; + current->physicalDevices[j] = phys_dev->handle; } }
@@ -1434,7 +1445,7 @@ NTSTATUS wine_vkGetCalibratedTimestampsEXT(void *args) NTSTATUS wine_vkGetPhysicalDeviceCalibrateableTimeDomainsEXT(void *args) { struct vkGetPhysicalDeviceCalibrateableTimeDomainsEXT_params *params = args; - VkPhysicalDevice phys_dev = params->physicalDevice; + struct wine_phys_dev *phys_dev = wine_phys_dev_from_handle(params->physicalDevice); uint32_t *time_domain_count = params->pTimeDomainCount; VkTimeDomainEXT *time_domains = params->pTimeDomains; BOOL supports_device = FALSE, supports_monotonic = FALSE, supports_monotonic_raw = FALSE; @@ -1591,7 +1602,7 @@ NTSTATUS wine_vkDestroySurfaceKHR(void *args) return STATUS_SUCCESS; }
-static inline void adjust_max_image_count(VkPhysicalDevice phys_dev, VkSurfaceCapabilitiesKHR* capabilities) +static inline void adjust_max_image_count(struct wine_phys_dev *phys_dev, VkSurfaceCapabilitiesKHR* capabilities) { /* Many Windows games, for example Strange Brigade, No Man's Sky, Path of Exile * and World War Z, do not expect that maxImageCount can be set to 0. @@ -1609,14 +1620,14 @@ static inline void adjust_max_image_count(VkPhysicalDevice phys_dev, VkSurfaceCa NTSTATUS wine_vkGetPhysicalDeviceSurfaceCapabilitiesKHR(void *args) { struct vkGetPhysicalDeviceSurfaceCapabilitiesKHR_params *params = args; - VkPhysicalDevice phys_dev = params->physicalDevice; + struct wine_phys_dev *phys_dev = wine_phys_dev_from_handle(params->physicalDevice); VkSurfaceKHR surface = params->surface; VkSurfaceCapabilitiesKHR *capabilities = params->pSurfaceCapabilities; VkResult res;
TRACE("%p, 0x%s, %p\n", phys_dev, wine_dbgstr_longlong(surface), capabilities);
- res = thunk_vkGetPhysicalDeviceSurfaceCapabilitiesKHR(phys_dev, surface, capabilities); + res = thunk_vkGetPhysicalDeviceSurfaceCapabilitiesKHR(phys_dev->handle, surface, capabilities);
if (res == VK_SUCCESS) adjust_max_image_count(phys_dev, capabilities); @@ -1627,14 +1638,14 @@ NTSTATUS wine_vkGetPhysicalDeviceSurfaceCapabilitiesKHR(void *args) NTSTATUS wine_vkGetPhysicalDeviceSurfaceCapabilities2KHR(void *args) { struct vkGetPhysicalDeviceSurfaceCapabilities2KHR_params *params = args; - VkPhysicalDevice phys_dev = params->physicalDevice; + struct wine_phys_dev *phys_dev = wine_phys_dev_from_handle(params->physicalDevice); const VkPhysicalDeviceSurfaceInfo2KHR *surface_info = params->pSurfaceInfo; VkSurfaceCapabilities2KHR *capabilities = params->pSurfaceCapabilities; VkResult res;
TRACE("%p, %p, %p\n", phys_dev, surface_info, capabilities);
- res = thunk_vkGetPhysicalDeviceSurfaceCapabilities2KHR(phys_dev, surface_info, capabilities); + res = thunk_vkGetPhysicalDeviceSurfaceCapabilities2KHR(phys_dev->handle, surface_info, capabilities);
if (res == VK_SUCCESS) adjust_max_image_count(phys_dev, &capabilities->surfaceCapabilities); diff --git a/dlls/winevulkan/vulkan_loader.h b/dlls/winevulkan/vulkan_loader.h index e01f0de3197..bf99cf57694 100644 --- a/dlls/winevulkan/vulkan_loader.h +++ b/dlls/winevulkan/vulkan_loader.h @@ -54,9 +54,16 @@ struct wine_vk_base UINT64 unix_handle; };
+struct VkPhysicalDevice_T +{ + struct wine_vk_base base; +}; + struct VkInstance_T { struct wine_vk_base base; + uint32_t phys_dev_count; + struct VkPhysicalDevice_T phys_devs[1]; };
struct VkQueue_T diff --git a/dlls/winevulkan/vulkan_private.h b/dlls/winevulkan/vulkan_private.h index 61f19964b79..99907252e2d 100644 --- a/dlls/winevulkan/vulkan_private.h +++ b/dlls/winevulkan/vulkan_private.h @@ -56,7 +56,7 @@ struct VkCommandBuffer_T struct wine_device { struct vulkan_device_funcs funcs; - struct VkPhysicalDevice_T *phys_dev; /* parent */ + struct wine_phys_dev *phys_dev; /* parent */
VkDevice handle; /* client device */ VkDevice device; /* native device */ @@ -96,7 +96,7 @@ struct wine_instance /* We cache devices as we need to wrap them as they are * dispatchable objects. */ - struct VkPhysicalDevice_T **phys_devs; + struct wine_phys_dev **phys_devs; uint32_t phys_dev_count;
VkBool32 enable_wrapper_list; @@ -118,10 +118,11 @@ static inline struct wine_instance *wine_instance_from_handle(VkInstance handle) return (struct wine_instance *)(uintptr_t)handle->base.unix_handle; }
-struct VkPhysicalDevice_T +struct wine_phys_dev { - struct wine_vk_base base; struct wine_instance *instance; /* parent */ + + VkPhysicalDevice handle; /* client physical device */ VkPhysicalDevice phys_dev; /* native physical device */
VkExtensionProperties *extensions; @@ -130,6 +131,11 @@ struct VkPhysicalDevice_T struct wine_vk_mapping mapping; };
+static inline struct wine_phys_dev *wine_phys_dev_from_handle(VkPhysicalDevice handle) +{ + return (struct wine_phys_dev *)(uintptr_t)handle->base.unix_handle; +} + struct wine_queue { struct wine_device *device; /* parent */ diff --git a/dlls/winevulkan/vulkan_thunks.c b/dlls/winevulkan/vulkan_thunks.c index 19e6697edb6..5e5fab759a7 100644 --- a/dlls/winevulkan/vulkan_thunks.c +++ b/dlls/winevulkan/vulkan_thunks.c @@ -2810,7 +2810,7 @@ static inline VkPhysicalDevice *convert_VkPhysicalDevice_array_win_to_host(const out = malloc(count * sizeof(*out)); for (i = 0; i < count; i++) { - out[i] = in[i]->phys_dev; + out[i] = wine_phys_dev_from_handle(in[i])->phys_dev; }
return out; @@ -8214,7 +8214,7 @@ static NTSTATUS wine_vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCounter { struct vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR_params *params = args; TRACE("%p, %u, %p, %p, %p\n", params->physicalDevice, params->queueFamilyIndex, params->pCounterCount, params->pCounters, params->pCounterDescriptions); - return params->physicalDevice->instance->funcs.p_vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR(params->physicalDevice->phys_dev, params->queueFamilyIndex, params->pCounterCount, params->pCounters, params->pCounterDescriptions); + return wine_phys_dev_from_handle(params->physicalDevice)->instance->funcs.p_vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR(wine_phys_dev_from_handle(params->physicalDevice)->phys_dev, params->queueFamilyIndex, params->pCounterCount, params->pCounters, params->pCounterDescriptions); }
static NTSTATUS wine_vkFlushMappedMemoryRanges(void *args) @@ -8967,14 +8967,14 @@ static NTSTATUS wine_vkGetPhysicalDeviceCooperativeMatrixPropertiesNV(void *args { struct vkGetPhysicalDeviceCooperativeMatrixPropertiesNV_params *params = args; TRACE("%p, %p, %p\n", params->physicalDevice, params->pPropertyCount, params->pProperties); - return params->physicalDevice->instance->funcs.p_vkGetPhysicalDeviceCooperativeMatrixPropertiesNV(params->physicalDevice->phys_dev, params->pPropertyCount, params->pProperties); + return wine_phys_dev_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceCooperativeMatrixPropertiesNV(wine_phys_dev_from_handle(params->physicalDevice)->phys_dev, params->pPropertyCount, params->pProperties); }
static NTSTATUS wine_vkGetPhysicalDeviceFeatures(void *args) { struct vkGetPhysicalDeviceFeatures_params *params = args; TRACE("%p, %p\n", params->physicalDevice, params->pFeatures); - params->physicalDevice->instance->funcs.p_vkGetPhysicalDeviceFeatures(params->physicalDevice->phys_dev, params->pFeatures); + wine_phys_dev_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceFeatures(wine_phys_dev_from_handle(params->physicalDevice)->phys_dev, params->pFeatures); return STATUS_SUCCESS; }
@@ -8982,7 +8982,7 @@ static NTSTATUS wine_vkGetPhysicalDeviceFeatures2(void *args) { struct vkGetPhysicalDeviceFeatures2_params *params = args; TRACE("%p, %p\n", params->physicalDevice, params->pFeatures); - params->physicalDevice->instance->funcs.p_vkGetPhysicalDeviceFeatures2(params->physicalDevice->phys_dev, params->pFeatures); + wine_phys_dev_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceFeatures2(wine_phys_dev_from_handle(params->physicalDevice)->phys_dev, params->pFeatures); return STATUS_SUCCESS; }
@@ -8990,7 +8990,7 @@ static NTSTATUS wine_vkGetPhysicalDeviceFeatures2KHR(void *args) { struct vkGetPhysicalDeviceFeatures2KHR_params *params = args; TRACE("%p, %p\n", params->physicalDevice, params->pFeatures); - params->physicalDevice->instance->funcs.p_vkGetPhysicalDeviceFeatures2KHR(params->physicalDevice->phys_dev, params->pFeatures); + wine_phys_dev_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceFeatures2KHR(wine_phys_dev_from_handle(params->physicalDevice)->phys_dev, params->pFeatures); return STATUS_SUCCESS; }
@@ -8998,7 +8998,7 @@ static NTSTATUS wine_vkGetPhysicalDeviceFormatProperties(void *args) { struct vkGetPhysicalDeviceFormatProperties_params *params = args; TRACE("%p, %#x, %p\n", params->physicalDevice, params->format, params->pFormatProperties); - params->physicalDevice->instance->funcs.p_vkGetPhysicalDeviceFormatProperties(params->physicalDevice->phys_dev, params->format, params->pFormatProperties); + wine_phys_dev_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceFormatProperties(wine_phys_dev_from_handle(params->physicalDevice)->phys_dev, params->format, params->pFormatProperties); return STATUS_SUCCESS; }
@@ -9006,7 +9006,7 @@ static NTSTATUS wine_vkGetPhysicalDeviceFormatProperties2(void *args) { struct vkGetPhysicalDeviceFormatProperties2_params *params = args; TRACE("%p, %#x, %p\n", params->physicalDevice, params->format, params->pFormatProperties); - params->physicalDevice->instance->funcs.p_vkGetPhysicalDeviceFormatProperties2(params->physicalDevice->phys_dev, params->format, params->pFormatProperties); + wine_phys_dev_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceFormatProperties2(wine_phys_dev_from_handle(params->physicalDevice)->phys_dev, params->format, params->pFormatProperties); return STATUS_SUCCESS; }
@@ -9014,7 +9014,7 @@ static NTSTATUS wine_vkGetPhysicalDeviceFormatProperties2KHR(void *args) { struct vkGetPhysicalDeviceFormatProperties2KHR_params *params = args; TRACE("%p, %#x, %p\n", params->physicalDevice, params->format, params->pFormatProperties); - params->physicalDevice->instance->funcs.p_vkGetPhysicalDeviceFormatProperties2KHR(params->physicalDevice->phys_dev, params->format, params->pFormatProperties); + wine_phys_dev_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceFormatProperties2KHR(wine_phys_dev_from_handle(params->physicalDevice)->phys_dev, params->format, params->pFormatProperties); return STATUS_SUCCESS; }
@@ -9022,7 +9022,7 @@ static NTSTATUS wine_vkGetPhysicalDeviceFragmentShadingRatesKHR(void *args) { struct vkGetPhysicalDeviceFragmentShadingRatesKHR_params *params = args; TRACE("%p, %p, %p\n", params->physicalDevice, params->pFragmentShadingRateCount, params->pFragmentShadingRates); - return params->physicalDevice->instance->funcs.p_vkGetPhysicalDeviceFragmentShadingRatesKHR(params->physicalDevice->phys_dev, params->pFragmentShadingRateCount, params->pFragmentShadingRates); + return wine_phys_dev_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceFragmentShadingRatesKHR(wine_phys_dev_from_handle(params->physicalDevice)->phys_dev, params->pFragmentShadingRateCount, params->pFragmentShadingRates); }
static NTSTATUS wine_vkGetPhysicalDeviceImageFormatProperties(void *args) @@ -9033,13 +9033,13 @@ static NTSTATUS wine_vkGetPhysicalDeviceImageFormatProperties(void *args) VkImageFormatProperties_host pImageFormatProperties_host; TRACE("%p, %#x, %#x, %#x, %#x, %#x, %p\n", params->physicalDevice, params->format, params->type, params->tiling, params->usage, params->flags, params->pImageFormatProperties);
- result = params->physicalDevice->instance->funcs.p_vkGetPhysicalDeviceImageFormatProperties(params->physicalDevice->phys_dev, params->format, params->type, params->tiling, params->usage, params->flags, &pImageFormatProperties_host); + result = wine_phys_dev_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceImageFormatProperties(wine_phys_dev_from_handle(params->physicalDevice)->phys_dev, params->format, params->type, params->tiling, params->usage, params->flags, &pImageFormatProperties_host);
convert_VkImageFormatProperties_host_to_win(&pImageFormatProperties_host, params->pImageFormatProperties); return result; #else TRACE("%p, %#x, %#x, %#x, %#x, %#x, %p\n", params->physicalDevice, params->format, params->type, params->tiling, params->usage, params->flags, params->pImageFormatProperties); - return params->physicalDevice->instance->funcs.p_vkGetPhysicalDeviceImageFormatProperties(params->physicalDevice->phys_dev, params->format, params->type, params->tiling, params->usage, params->flags, params->pImageFormatProperties); + return wine_phys_dev_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceImageFormatProperties(wine_phys_dev_from_handle(params->physicalDevice)->phys_dev, params->format, params->type, params->tiling, params->usage, params->flags, params->pImageFormatProperties); #endif }
@@ -9049,12 +9049,12 @@ VkResult thunk_vkGetPhysicalDeviceImageFormatProperties2(VkPhysicalDevice physic VkResult result; VkImageFormatProperties2_host pImageFormatProperties_host; convert_VkImageFormatProperties2_win_to_host(pImageFormatProperties, &pImageFormatProperties_host); - result = physicalDevice->instance->funcs.p_vkGetPhysicalDeviceImageFormatProperties2(physicalDevice->phys_dev, pImageFormatInfo, &pImageFormatProperties_host); + result = wine_phys_dev_from_handle(physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceImageFormatProperties2(wine_phys_dev_from_handle(physicalDevice)->phys_dev, pImageFormatInfo, &pImageFormatProperties_host);
convert_VkImageFormatProperties2_host_to_win(&pImageFormatProperties_host, pImageFormatProperties); return result; #else - return physicalDevice->instance->funcs.p_vkGetPhysicalDeviceImageFormatProperties2(physicalDevice->phys_dev, pImageFormatInfo, pImageFormatProperties); + return wine_phys_dev_from_handle(physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceImageFormatProperties2(wine_phys_dev_from_handle(physicalDevice)->phys_dev, pImageFormatInfo, pImageFormatProperties); #endif }
@@ -9064,12 +9064,12 @@ VkResult thunk_vkGetPhysicalDeviceImageFormatProperties2KHR(VkPhysicalDevice phy VkResult result; VkImageFormatProperties2_host pImageFormatProperties_host; convert_VkImageFormatProperties2_win_to_host(pImageFormatProperties, &pImageFormatProperties_host); - result = physicalDevice->instance->funcs.p_vkGetPhysicalDeviceImageFormatProperties2KHR(physicalDevice->phys_dev, pImageFormatInfo, &pImageFormatProperties_host); + result = wine_phys_dev_from_handle(physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceImageFormatProperties2KHR(wine_phys_dev_from_handle(physicalDevice)->phys_dev, pImageFormatInfo, &pImageFormatProperties_host);
convert_VkImageFormatProperties2_host_to_win(&pImageFormatProperties_host, pImageFormatProperties); return result; #else - return physicalDevice->instance->funcs.p_vkGetPhysicalDeviceImageFormatProperties2KHR(physicalDevice->phys_dev, pImageFormatInfo, pImageFormatProperties); + return wine_phys_dev_from_handle(physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceImageFormatProperties2KHR(wine_phys_dev_from_handle(physicalDevice)->phys_dev, pImageFormatInfo, pImageFormatProperties); #endif }
@@ -9080,13 +9080,13 @@ static NTSTATUS wine_vkGetPhysicalDeviceMemoryProperties(void *args) VkPhysicalDeviceMemoryProperties_host pMemoryProperties_host; TRACE("%p, %p\n", params->physicalDevice, params->pMemoryProperties);
- params->physicalDevice->instance->funcs.p_vkGetPhysicalDeviceMemoryProperties(params->physicalDevice->phys_dev, &pMemoryProperties_host); + wine_phys_dev_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceMemoryProperties(wine_phys_dev_from_handle(params->physicalDevice)->phys_dev, &pMemoryProperties_host);
convert_VkPhysicalDeviceMemoryProperties_host_to_win(&pMemoryProperties_host, params->pMemoryProperties); return STATUS_SUCCESS; #else TRACE("%p, %p\n", params->physicalDevice, params->pMemoryProperties); - params->physicalDevice->instance->funcs.p_vkGetPhysicalDeviceMemoryProperties(params->physicalDevice->phys_dev, params->pMemoryProperties); + wine_phys_dev_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceMemoryProperties(wine_phys_dev_from_handle(params->physicalDevice)->phys_dev, params->pMemoryProperties); return STATUS_SUCCESS; #endif } @@ -9099,13 +9099,13 @@ static NTSTATUS wine_vkGetPhysicalDeviceMemoryProperties2(void *args) TRACE("%p, %p\n", params->physicalDevice, params->pMemoryProperties);
convert_VkPhysicalDeviceMemoryProperties2_win_to_host(params->pMemoryProperties, &pMemoryProperties_host); - params->physicalDevice->instance->funcs.p_vkGetPhysicalDeviceMemoryProperties2(params->physicalDevice->phys_dev, &pMemoryProperties_host); + wine_phys_dev_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceMemoryProperties2(wine_phys_dev_from_handle(params->physicalDevice)->phys_dev, &pMemoryProperties_host);
convert_VkPhysicalDeviceMemoryProperties2_host_to_win(&pMemoryProperties_host, params->pMemoryProperties); return STATUS_SUCCESS; #else TRACE("%p, %p\n", params->physicalDevice, params->pMemoryProperties); - params->physicalDevice->instance->funcs.p_vkGetPhysicalDeviceMemoryProperties2(params->physicalDevice->phys_dev, params->pMemoryProperties); + wine_phys_dev_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceMemoryProperties2(wine_phys_dev_from_handle(params->physicalDevice)->phys_dev, params->pMemoryProperties); return STATUS_SUCCESS; #endif } @@ -9118,13 +9118,13 @@ static NTSTATUS wine_vkGetPhysicalDeviceMemoryProperties2KHR(void *args) TRACE("%p, %p\n", params->physicalDevice, params->pMemoryProperties);
convert_VkPhysicalDeviceMemoryProperties2_win_to_host(params->pMemoryProperties, &pMemoryProperties_host); - params->physicalDevice->instance->funcs.p_vkGetPhysicalDeviceMemoryProperties2KHR(params->physicalDevice->phys_dev, &pMemoryProperties_host); + wine_phys_dev_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceMemoryProperties2KHR(wine_phys_dev_from_handle(params->physicalDevice)->phys_dev, &pMemoryProperties_host);
convert_VkPhysicalDeviceMemoryProperties2_host_to_win(&pMemoryProperties_host, params->pMemoryProperties); return STATUS_SUCCESS; #else TRACE("%p, %p\n", params->physicalDevice, params->pMemoryProperties); - params->physicalDevice->instance->funcs.p_vkGetPhysicalDeviceMemoryProperties2KHR(params->physicalDevice->phys_dev, params->pMemoryProperties); + wine_phys_dev_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceMemoryProperties2KHR(wine_phys_dev_from_handle(params->physicalDevice)->phys_dev, params->pMemoryProperties); return STATUS_SUCCESS; #endif } @@ -9133,7 +9133,7 @@ static NTSTATUS wine_vkGetPhysicalDeviceMultisamplePropertiesEXT(void *args) { struct vkGetPhysicalDeviceMultisamplePropertiesEXT_params *params = args; TRACE("%p, %#x, %p\n", params->physicalDevice, params->samples, params->pMultisampleProperties); - params->physicalDevice->instance->funcs.p_vkGetPhysicalDeviceMultisamplePropertiesEXT(params->physicalDevice->phys_dev, params->samples, params->pMultisampleProperties); + wine_phys_dev_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceMultisamplePropertiesEXT(wine_phys_dev_from_handle(params->physicalDevice)->phys_dev, params->samples, params->pMultisampleProperties); return STATUS_SUCCESS; }
@@ -9141,7 +9141,7 @@ static NTSTATUS wine_vkGetPhysicalDevicePresentRectanglesKHR(void *args) { struct vkGetPhysicalDevicePresentRectanglesKHR_params *params = args; TRACE("%p, 0x%s, %p, %p\n", params->physicalDevice, wine_dbgstr_longlong(params->surface), params->pRectCount, params->pRects); - return params->physicalDevice->instance->funcs.p_vkGetPhysicalDevicePresentRectanglesKHR(params->physicalDevice->phys_dev, wine_surface_from_handle(params->surface)->driver_surface, params->pRectCount, params->pRects); + return wine_phys_dev_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDevicePresentRectanglesKHR(wine_phys_dev_from_handle(params->physicalDevice)->phys_dev, wine_surface_from_handle(params->surface)->driver_surface, params->pRectCount, params->pRects); }
static NTSTATUS wine_vkGetPhysicalDeviceProperties(void *args) @@ -9151,13 +9151,13 @@ static NTSTATUS wine_vkGetPhysicalDeviceProperties(void *args) VkPhysicalDeviceProperties_host pProperties_host; TRACE("%p, %p\n", params->physicalDevice, params->pProperties);
- params->physicalDevice->instance->funcs.p_vkGetPhysicalDeviceProperties(params->physicalDevice->phys_dev, &pProperties_host); + wine_phys_dev_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceProperties(wine_phys_dev_from_handle(params->physicalDevice)->phys_dev, &pProperties_host);
convert_VkPhysicalDeviceProperties_host_to_win(&pProperties_host, params->pProperties); return STATUS_SUCCESS; #else TRACE("%p, %p\n", params->physicalDevice, params->pProperties); - params->physicalDevice->instance->funcs.p_vkGetPhysicalDeviceProperties(params->physicalDevice->phys_dev, params->pProperties); + wine_phys_dev_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceProperties(wine_phys_dev_from_handle(params->physicalDevice)->phys_dev, params->pProperties); return STATUS_SUCCESS; #endif } @@ -9170,13 +9170,13 @@ static NTSTATUS wine_vkGetPhysicalDeviceProperties2(void *args) TRACE("%p, %p\n", params->physicalDevice, params->pProperties);
convert_VkPhysicalDeviceProperties2_win_to_host(params->pProperties, &pProperties_host); - params->physicalDevice->instance->funcs.p_vkGetPhysicalDeviceProperties2(params->physicalDevice->phys_dev, &pProperties_host); + wine_phys_dev_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceProperties2(wine_phys_dev_from_handle(params->physicalDevice)->phys_dev, &pProperties_host);
convert_VkPhysicalDeviceProperties2_host_to_win(&pProperties_host, params->pProperties); return STATUS_SUCCESS; #else TRACE("%p, %p\n", params->physicalDevice, params->pProperties); - params->physicalDevice->instance->funcs.p_vkGetPhysicalDeviceProperties2(params->physicalDevice->phys_dev, params->pProperties); + wine_phys_dev_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceProperties2(wine_phys_dev_from_handle(params->physicalDevice)->phys_dev, params->pProperties); return STATUS_SUCCESS; #endif } @@ -9189,13 +9189,13 @@ static NTSTATUS wine_vkGetPhysicalDeviceProperties2KHR(void *args) TRACE("%p, %p\n", params->physicalDevice, params->pProperties);
convert_VkPhysicalDeviceProperties2_win_to_host(params->pProperties, &pProperties_host); - params->physicalDevice->instance->funcs.p_vkGetPhysicalDeviceProperties2KHR(params->physicalDevice->phys_dev, &pProperties_host); + wine_phys_dev_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceProperties2KHR(wine_phys_dev_from_handle(params->physicalDevice)->phys_dev, &pProperties_host);
convert_VkPhysicalDeviceProperties2_host_to_win(&pProperties_host, params->pProperties); return STATUS_SUCCESS; #else TRACE("%p, %p\n", params->physicalDevice, params->pProperties); - params->physicalDevice->instance->funcs.p_vkGetPhysicalDeviceProperties2KHR(params->physicalDevice->phys_dev, params->pProperties); + wine_phys_dev_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceProperties2KHR(wine_phys_dev_from_handle(params->physicalDevice)->phys_dev, params->pProperties); return STATUS_SUCCESS; #endif } @@ -9204,7 +9204,7 @@ static NTSTATUS wine_vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR(voi { struct vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR_params *params = args; TRACE("%p, %p, %p\n", params->physicalDevice, params->pPerformanceQueryCreateInfo, params->pNumPasses); - params->physicalDevice->instance->funcs.p_vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR(params->physicalDevice->phys_dev, params->pPerformanceQueryCreateInfo, params->pNumPasses); + wine_phys_dev_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR(wine_phys_dev_from_handle(params->physicalDevice)->phys_dev, params->pPerformanceQueryCreateInfo, params->pNumPasses); return STATUS_SUCCESS; }
@@ -9212,7 +9212,7 @@ static NTSTATUS wine_vkGetPhysicalDeviceQueueFamilyProperties(void *args) { struct vkGetPhysicalDeviceQueueFamilyProperties_params *params = args; TRACE("%p, %p, %p\n", params->physicalDevice, params->pQueueFamilyPropertyCount, params->pQueueFamilyProperties); - params->physicalDevice->instance->funcs.p_vkGetPhysicalDeviceQueueFamilyProperties(params->physicalDevice->phys_dev, params->pQueueFamilyPropertyCount, params->pQueueFamilyProperties); + wine_phys_dev_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceQueueFamilyProperties(wine_phys_dev_from_handle(params->physicalDevice)->phys_dev, params->pQueueFamilyPropertyCount, params->pQueueFamilyProperties); return STATUS_SUCCESS; }
@@ -9220,7 +9220,7 @@ static NTSTATUS wine_vkGetPhysicalDeviceQueueFamilyProperties2(void *args) { struct vkGetPhysicalDeviceQueueFamilyProperties2_params *params = args; TRACE("%p, %p, %p\n", params->physicalDevice, params->pQueueFamilyPropertyCount, params->pQueueFamilyProperties); - params->physicalDevice->instance->funcs.p_vkGetPhysicalDeviceQueueFamilyProperties2(params->physicalDevice->phys_dev, params->pQueueFamilyPropertyCount, params->pQueueFamilyProperties); + wine_phys_dev_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceQueueFamilyProperties2(wine_phys_dev_from_handle(params->physicalDevice)->phys_dev, params->pQueueFamilyPropertyCount, params->pQueueFamilyProperties); return STATUS_SUCCESS; }
@@ -9228,7 +9228,7 @@ static NTSTATUS wine_vkGetPhysicalDeviceQueueFamilyProperties2KHR(void *args) { struct vkGetPhysicalDeviceQueueFamilyProperties2KHR_params *params = args; TRACE("%p, %p, %p\n", params->physicalDevice, params->pQueueFamilyPropertyCount, params->pQueueFamilyProperties); - params->physicalDevice->instance->funcs.p_vkGetPhysicalDeviceQueueFamilyProperties2KHR(params->physicalDevice->phys_dev, params->pQueueFamilyPropertyCount, params->pQueueFamilyProperties); + wine_phys_dev_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceQueueFamilyProperties2KHR(wine_phys_dev_from_handle(params->physicalDevice)->phys_dev, params->pQueueFamilyPropertyCount, params->pQueueFamilyProperties); return STATUS_SUCCESS; }
@@ -9236,7 +9236,7 @@ static NTSTATUS wine_vkGetPhysicalDeviceSparseImageFormatProperties(void *args) { struct vkGetPhysicalDeviceSparseImageFormatProperties_params *params = args; TRACE("%p, %#x, %#x, %#x, %#x, %#x, %p, %p\n", params->physicalDevice, params->format, params->type, params->samples, params->usage, params->tiling, params->pPropertyCount, params->pProperties); - params->physicalDevice->instance->funcs.p_vkGetPhysicalDeviceSparseImageFormatProperties(params->physicalDevice->phys_dev, params->format, params->type, params->samples, params->usage, params->tiling, params->pPropertyCount, params->pProperties); + wine_phys_dev_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceSparseImageFormatProperties(wine_phys_dev_from_handle(params->physicalDevice)->phys_dev, params->format, params->type, params->samples, params->usage, params->tiling, params->pPropertyCount, params->pProperties); return STATUS_SUCCESS; }
@@ -9244,7 +9244,7 @@ static NTSTATUS wine_vkGetPhysicalDeviceSparseImageFormatProperties2(void *args) { struct vkGetPhysicalDeviceSparseImageFormatProperties2_params *params = args; TRACE("%p, %p, %p, %p\n", params->physicalDevice, params->pFormatInfo, params->pPropertyCount, params->pProperties); - params->physicalDevice->instance->funcs.p_vkGetPhysicalDeviceSparseImageFormatProperties2(params->physicalDevice->phys_dev, params->pFormatInfo, params->pPropertyCount, params->pProperties); + wine_phys_dev_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceSparseImageFormatProperties2(wine_phys_dev_from_handle(params->physicalDevice)->phys_dev, params->pFormatInfo, params->pPropertyCount, params->pProperties); return STATUS_SUCCESS; }
@@ -9252,7 +9252,7 @@ static NTSTATUS wine_vkGetPhysicalDeviceSparseImageFormatProperties2KHR(void *ar { struct vkGetPhysicalDeviceSparseImageFormatProperties2KHR_params *params = args; TRACE("%p, %p, %p, %p\n", params->physicalDevice, params->pFormatInfo, params->pPropertyCount, params->pProperties); - params->physicalDevice->instance->funcs.p_vkGetPhysicalDeviceSparseImageFormatProperties2KHR(params->physicalDevice->phys_dev, params->pFormatInfo, params->pPropertyCount, params->pProperties); + wine_phys_dev_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceSparseImageFormatProperties2KHR(wine_phys_dev_from_handle(params->physicalDevice)->phys_dev, params->pFormatInfo, params->pPropertyCount, params->pProperties); return STATUS_SUCCESS; }
@@ -9260,7 +9260,7 @@ static NTSTATUS wine_vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinat { struct vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV_params *params = args; TRACE("%p, %p, %p\n", params->physicalDevice, params->pCombinationCount, params->pCombinations); - return params->physicalDevice->instance->funcs.p_vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV(params->physicalDevice->phys_dev, params->pCombinationCount, params->pCombinations); + return wine_phys_dev_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV(wine_phys_dev_from_handle(params->physicalDevice)->phys_dev, params->pCombinationCount, params->pCombinations); }
VkResult thunk_vkGetPhysicalDeviceSurfaceCapabilities2KHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSurfaceInfo2KHR *pSurfaceInfo, VkSurfaceCapabilities2KHR *pSurfaceCapabilities) @@ -9269,14 +9269,14 @@ VkResult thunk_vkGetPhysicalDeviceSurfaceCapabilities2KHR(VkPhysicalDevice physi VkResult result; VkPhysicalDeviceSurfaceInfo2KHR_host pSurfaceInfo_host; convert_VkPhysicalDeviceSurfaceInfo2KHR_win_to_host(pSurfaceInfo, &pSurfaceInfo_host); - result = physicalDevice->instance->funcs.p_vkGetPhysicalDeviceSurfaceCapabilities2KHR(physicalDevice->phys_dev, &pSurfaceInfo_host, pSurfaceCapabilities); + result = wine_phys_dev_from_handle(physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceSurfaceCapabilities2KHR(wine_phys_dev_from_handle(physicalDevice)->phys_dev, &pSurfaceInfo_host, pSurfaceCapabilities);
return result; #else VkResult result; VkPhysicalDeviceSurfaceInfo2KHR pSurfaceInfo_host; convert_VkPhysicalDeviceSurfaceInfo2KHR_win_to_host(pSurfaceInfo, &pSurfaceInfo_host); - result = physicalDevice->instance->funcs.p_vkGetPhysicalDeviceSurfaceCapabilities2KHR(physicalDevice->phys_dev, &pSurfaceInfo_host, pSurfaceCapabilities); + result = wine_phys_dev_from_handle(physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceSurfaceCapabilities2KHR(wine_phys_dev_from_handle(physicalDevice)->phys_dev, &pSurfaceInfo_host, pSurfaceCapabilities);
return result; #endif @@ -9284,7 +9284,7 @@ VkResult thunk_vkGetPhysicalDeviceSurfaceCapabilities2KHR(VkPhysicalDevice physi
VkResult thunk_vkGetPhysicalDeviceSurfaceCapabilitiesKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, VkSurfaceCapabilitiesKHR *pSurfaceCapabilities) { - return physicalDevice->instance->funcs.p_vkGetPhysicalDeviceSurfaceCapabilitiesKHR(physicalDevice->phys_dev, wine_surface_from_handle(surface)->driver_surface, pSurfaceCapabilities); + return wine_phys_dev_from_handle(physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceSurfaceCapabilitiesKHR(wine_phys_dev_from_handle(physicalDevice)->phys_dev, wine_surface_from_handle(surface)->driver_surface, pSurfaceCapabilities); }
static NTSTATUS wine_vkGetPhysicalDeviceSurfaceFormats2KHR(void *args) @@ -9296,7 +9296,7 @@ static NTSTATUS wine_vkGetPhysicalDeviceSurfaceFormats2KHR(void *args) TRACE("%p, %p, %p, %p\n", params->physicalDevice, params->pSurfaceInfo, params->pSurfaceFormatCount, params->pSurfaceFormats);
convert_VkPhysicalDeviceSurfaceInfo2KHR_win_to_host(params->pSurfaceInfo, &pSurfaceInfo_host); - result = params->physicalDevice->instance->funcs.p_vkGetPhysicalDeviceSurfaceFormats2KHR(params->physicalDevice->phys_dev, &pSurfaceInfo_host, params->pSurfaceFormatCount, params->pSurfaceFormats); + result = wine_phys_dev_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceSurfaceFormats2KHR(wine_phys_dev_from_handle(params->physicalDevice)->phys_dev, &pSurfaceInfo_host, params->pSurfaceFormatCount, params->pSurfaceFormats);
return result; #else @@ -9305,7 +9305,7 @@ static NTSTATUS wine_vkGetPhysicalDeviceSurfaceFormats2KHR(void *args) TRACE("%p, %p, %p, %p\n", params->physicalDevice, params->pSurfaceInfo, params->pSurfaceFormatCount, params->pSurfaceFormats);
convert_VkPhysicalDeviceSurfaceInfo2KHR_win_to_host(params->pSurfaceInfo, &pSurfaceInfo_host); - result = params->physicalDevice->instance->funcs.p_vkGetPhysicalDeviceSurfaceFormats2KHR(params->physicalDevice->phys_dev, &pSurfaceInfo_host, params->pSurfaceFormatCount, params->pSurfaceFormats); + result = wine_phys_dev_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceSurfaceFormats2KHR(wine_phys_dev_from_handle(params->physicalDevice)->phys_dev, &pSurfaceInfo_host, params->pSurfaceFormatCount, params->pSurfaceFormats);
return result; #endif @@ -9315,42 +9315,42 @@ static NTSTATUS wine_vkGetPhysicalDeviceSurfaceFormatsKHR(void *args) { struct vkGetPhysicalDeviceSurfaceFormatsKHR_params *params = args; TRACE("%p, 0x%s, %p, %p\n", params->physicalDevice, wine_dbgstr_longlong(params->surface), params->pSurfaceFormatCount, params->pSurfaceFormats); - return params->physicalDevice->instance->funcs.p_vkGetPhysicalDeviceSurfaceFormatsKHR(params->physicalDevice->phys_dev, wine_surface_from_handle(params->surface)->driver_surface, params->pSurfaceFormatCount, params->pSurfaceFormats); + return wine_phys_dev_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceSurfaceFormatsKHR(wine_phys_dev_from_handle(params->physicalDevice)->phys_dev, wine_surface_from_handle(params->surface)->driver_surface, params->pSurfaceFormatCount, params->pSurfaceFormats); }
static NTSTATUS wine_vkGetPhysicalDeviceSurfacePresentModesKHR(void *args) { struct vkGetPhysicalDeviceSurfacePresentModesKHR_params *params = args; TRACE("%p, 0x%s, %p, %p\n", params->physicalDevice, wine_dbgstr_longlong(params->surface), params->pPresentModeCount, params->pPresentModes); - return params->physicalDevice->instance->funcs.p_vkGetPhysicalDeviceSurfacePresentModesKHR(params->physicalDevice->phys_dev, wine_surface_from_handle(params->surface)->driver_surface, params->pPresentModeCount, params->pPresentModes); + return wine_phys_dev_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceSurfacePresentModesKHR(wine_phys_dev_from_handle(params->physicalDevice)->phys_dev, wine_surface_from_handle(params->surface)->driver_surface, params->pPresentModeCount, params->pPresentModes); }
static NTSTATUS wine_vkGetPhysicalDeviceSurfaceSupportKHR(void *args) { struct vkGetPhysicalDeviceSurfaceSupportKHR_params *params = args; TRACE("%p, %u, 0x%s, %p\n", params->physicalDevice, params->queueFamilyIndex, wine_dbgstr_longlong(params->surface), params->pSupported); - return params->physicalDevice->instance->funcs.p_vkGetPhysicalDeviceSurfaceSupportKHR(params->physicalDevice->phys_dev, params->queueFamilyIndex, wine_surface_from_handle(params->surface)->driver_surface, params->pSupported); + return wine_phys_dev_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceSurfaceSupportKHR(wine_phys_dev_from_handle(params->physicalDevice)->phys_dev, params->queueFamilyIndex, wine_surface_from_handle(params->surface)->driver_surface, params->pSupported); }
static NTSTATUS wine_vkGetPhysicalDeviceToolProperties(void *args) { struct vkGetPhysicalDeviceToolProperties_params *params = args; TRACE("%p, %p, %p\n", params->physicalDevice, params->pToolCount, params->pToolProperties); - return params->physicalDevice->instance->funcs.p_vkGetPhysicalDeviceToolProperties(params->physicalDevice->phys_dev, params->pToolCount, params->pToolProperties); + return wine_phys_dev_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceToolProperties(wine_phys_dev_from_handle(params->physicalDevice)->phys_dev, params->pToolCount, params->pToolProperties); }
static NTSTATUS wine_vkGetPhysicalDeviceToolPropertiesEXT(void *args) { struct vkGetPhysicalDeviceToolPropertiesEXT_params *params = args; TRACE("%p, %p, %p\n", params->physicalDevice, params->pToolCount, params->pToolProperties); - return params->physicalDevice->instance->funcs.p_vkGetPhysicalDeviceToolPropertiesEXT(params->physicalDevice->phys_dev, params->pToolCount, params->pToolProperties); + return wine_phys_dev_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceToolPropertiesEXT(wine_phys_dev_from_handle(params->physicalDevice)->phys_dev, params->pToolCount, params->pToolProperties); }
static NTSTATUS wine_vkGetPhysicalDeviceWin32PresentationSupportKHR(void *args) { struct vkGetPhysicalDeviceWin32PresentationSupportKHR_params *params = args; TRACE("%p, %u\n", params->physicalDevice, params->queueFamilyIndex); - return params->physicalDevice->instance->funcs.p_vkGetPhysicalDeviceWin32PresentationSupportKHR(params->physicalDevice->phys_dev, params->queueFamilyIndex); + return wine_phys_dev_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceWin32PresentationSupportKHR(wine_phys_dev_from_handle(params->physicalDevice)->phys_dev, params->queueFamilyIndex); }
static NTSTATUS wine_vkGetPipelineCacheData(void *args) @@ -10339,7 +10339,7 @@ uint64_t wine_vk_unwrap_handle(VkObjectType type, uint64_t handle) case VK_OBJECT_TYPE_INSTANCE: return (uint64_t) (uintptr_t) wine_instance_from_handle(((VkInstance) (uintptr_t) handle))->instance; case VK_OBJECT_TYPE_PHYSICAL_DEVICE: - return (uint64_t) (uintptr_t) ((VkPhysicalDevice) (uintptr_t) handle)->phys_dev; + return (uint64_t) (uintptr_t) wine_phys_dev_from_handle(((VkPhysicalDevice) (uintptr_t) handle))->phys_dev; case VK_OBJECT_TYPE_QUEUE: return (uint64_t) (uintptr_t) wine_queue_from_handle(((VkQueue) (uintptr_t) handle))->queue; case VK_OBJECT_TYPE_SURFACE_KHR:
From: Jacek Caban jacek@codeweavers.com
--- dlls/winevulkan/loader.c | 34 ++++++++++++++++++++++++++++++++ dlls/winevulkan/loader_thunks.c | 19 ------------------ dlls/winevulkan/loader_thunks.h | 1 + dlls/winevulkan/make_vulkan | 4 ++-- dlls/winevulkan/vulkan.c | 18 ++++++++++------- dlls/winevulkan/vulkan_loader.h | 10 ++++++++++ dlls/winevulkan/vulkan_private.h | 9 +++------ 7 files changed, 61 insertions(+), 34 deletions(-)
diff --git a/dlls/winevulkan/loader.c b/dlls/winevulkan/loader.c index 221a62a5680..ce5d2314169 100644 --- a/dlls/winevulkan/loader.c +++ b/dlls/winevulkan/loader.c @@ -491,6 +491,40 @@ void WINAPI vkDestroyDevice(VkDevice device, const VkAllocationCallbacks *alloca free(device); }
+VkResult WINAPI vkCreateCommandPool(VkDevice device, const VkCommandPoolCreateInfo *create_info, + const VkAllocationCallbacks *allocator, VkCommandPool *ret) +{ + struct vkCreateCommandPool_params params; + struct vk_command_pool *cmd_pool; + VkResult result; + + if (!(cmd_pool = malloc(sizeof(*cmd_pool)))) + return VK_ERROR_OUT_OF_HOST_MEMORY; + cmd_pool->unix_handle = 0; + + params.device = device; + params.pCreateInfo = create_info; + params.pAllocator = allocator; + params.pCommandPool = ret; + params.client_ptr = cmd_pool; + result = vk_unix_call(unix_vkCreateCommandPool, ¶ms); + if (!cmd_pool->unix_handle) + free(cmd_pool); + return result; +} + +void WINAPI vkDestroyCommandPool(VkDevice device, VkCommandPool handle, const VkAllocationCallbacks *allocator) +{ + struct vk_command_pool *cmd_pool = command_pool_from_handle(handle); + struct vkDestroyCommandPool_params params; + + params.device = device; + params.commandPool = handle; + params.pAllocator = allocator; + vk_unix_call(unix_vkDestroyCommandPool, ¶ms); + free(cmd_pool); +} + static BOOL WINAPI call_vulkan_debug_report_callback( struct wine_vk_debug_report_params *params, ULONG size ) { return params->user_callback(params->flags, params->object_type, params->object_handle, params->location, diff --git a/dlls/winevulkan/loader_thunks.c b/dlls/winevulkan/loader_thunks.c index cb4ea68a8b4..32626c27eab 100644 --- a/dlls/winevulkan/loader_thunks.c +++ b/dlls/winevulkan/loader_thunks.c @@ -1999,16 +1999,6 @@ VkResult WINAPI vkCreateBufferView(VkDevice device, const VkBufferViewCreateInfo return vk_unix_call(unix_vkCreateBufferView, ¶ms); }
-VkResult WINAPI vkCreateCommandPool(VkDevice device, const VkCommandPoolCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkCommandPool *pCommandPool) -{ - struct vkCreateCommandPool_params params; - params.device = device; - params.pCreateInfo = pCreateInfo; - params.pAllocator = pAllocator; - params.pCommandPool = pCommandPool; - return vk_unix_call(unix_vkCreateCommandPool, ¶ms); -} - VkResult WINAPI vkCreateComputePipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkComputePipelineCreateInfo *pCreateInfos, const VkAllocationCallbacks *pAllocator, VkPipeline *pPipelines) { struct vkCreateComputePipelines_params params; @@ -2441,15 +2431,6 @@ void WINAPI vkDestroyBufferView(VkDevice device, VkBufferView bufferView, const vk_unix_call(unix_vkDestroyBufferView, ¶ms); }
-void WINAPI vkDestroyCommandPool(VkDevice device, VkCommandPool commandPool, const VkAllocationCallbacks *pAllocator) -{ - struct vkDestroyCommandPool_params params; - params.device = device; - params.commandPool = commandPool; - params.pAllocator = pAllocator; - vk_unix_call(unix_vkDestroyCommandPool, ¶ms); -} - void WINAPI vkDestroyCuFunctionNVX(VkDevice device, VkCuFunctionNVX function, const VkAllocationCallbacks *pAllocator) { struct vkDestroyCuFunctionNVX_params params; diff --git a/dlls/winevulkan/loader_thunks.h b/dlls/winevulkan/loader_thunks.h index b42496e3655..410041ef51c 100644 --- a/dlls/winevulkan/loader_thunks.h +++ b/dlls/winevulkan/loader_thunks.h @@ -2066,6 +2066,7 @@ struct vkCreateCommandPool_params const VkCommandPoolCreateInfo *pCreateInfo; const VkAllocationCallbacks *pAllocator; VkCommandPool *pCommandPool; + void *client_ptr; };
struct vkCreateComputePipelines_params diff --git a/dlls/winevulkan/make_vulkan b/dlls/winevulkan/make_vulkan index a1cb6452f25..068e140a738 100755 --- a/dlls/winevulkan/make_vulkan +++ b/dlls/winevulkan/make_vulkan @@ -201,10 +201,10 @@ FUNCTION_OVERRIDES = {
# Device functions "vkAllocateCommandBuffers" : {"dispatch" : True, "driver" : False, "thunk" : ThunkType.NONE}, - "vkCreateCommandPool" : {"dispatch": True, "driver" : False, "thunk" : ThunkType.NONE}, + "vkCreateCommandPool" : {"dispatch": True, "driver" : False, "thunk" : ThunkType.NONE, "loader_thunk" : ThunkType.PRIVATE, "extra_param" : "client_ptr"}, "vkCreateComputePipelines" : {"dispatch": True, "driver" : False, "thunk" : ThunkType.PRIVATE}, "vkCreateGraphicsPipelines" : {"dispatch": True, "driver" : False, "thunk" : ThunkType.PRIVATE}, - "vkDestroyCommandPool" : {"dispatch": True, "driver" : False, "thunk" : ThunkType.NONE}, + "vkDestroyCommandPool" : {"dispatch": True, "driver" : False, "thunk" : ThunkType.NONE, "loader_thunk" : ThunkType.PRIVATE}, "vkDestroyDevice" : {"dispatch" : True, "driver" : False, "thunk" : ThunkType.NONE, "loader_thunk" : ThunkType.PRIVATE}, "vkFreeCommandBuffers" : {"dispatch" : True, "driver" : False, "thunk" : ThunkType.NONE}, "vkGetDeviceProcAddr" : {"dispatch" : False, "driver" : True, "thunk" : ThunkType.NONE, "loader_thunk" : ThunkType.NONE}, diff --git a/dlls/winevulkan/vulkan.c b/dlls/winevulkan/vulkan.c index 558b09c310a..652beb7b4e0 100644 --- a/dlls/winevulkan/vulkan.c +++ b/dlls/winevulkan/vulkan.c @@ -63,8 +63,8 @@ static const struct vulkan_funcs *vk_funcs;
#define WINE_VK_ADD_DISPATCHABLE_MAPPING(instance, client_handle, native_handle, object) \ wine_vk_add_handle_mapping((instance), (uintptr_t)(client_handle), (uintptr_t)(native_handle), &(object)->mapping) -#define WINE_VK_ADD_NON_DISPATCHABLE_MAPPING(instance, object, native_handle) \ - wine_vk_add_handle_mapping((instance), (uint64_t) (uintptr_t) (object), (uint64_t) (native_handle), &(object)->mapping) +#define WINE_VK_ADD_NON_DISPATCHABLE_MAPPING(instance, client_handle, native_handle, object) \ + wine_vk_add_handle_mapping((instance), (uintptr_t)(client_handle), (native_handle), &(object)->mapping) static void wine_vk_add_handle_mapping(struct wine_instance *instance, uint64_t wrapped_handle, uint64_t native_handle, struct wine_vk_mapping *mapping) { @@ -1148,6 +1148,7 @@ NTSTATUS wine_vkCreateCommandPool(void *args) const VkCommandPoolCreateInfo *info = params->pCreateInfo; const VkAllocationCallbacks *allocator = params->pAllocator; VkCommandPool *command_pool = params->pCommandPool; + struct vk_command_pool *handle = params->client_ptr; struct wine_cmd_pool *object; VkResult res;
@@ -1165,8 +1166,11 @@ NTSTATUS wine_vkCreateCommandPool(void *args)
if (res == VK_SUCCESS) { - WINE_VK_ADD_NON_DISPATCHABLE_MAPPING(device->phys_dev->instance, object, object->command_pool); - *command_pool = wine_cmd_pool_to_handle(object); + object->handle = (uintptr_t)handle; + handle->unix_handle = (uintptr_t)object; + WINE_VK_ADD_NON_DISPATCHABLE_MAPPING(device->phys_dev->instance, object->handle, + object->command_pool, object); + *command_pool = object->handle; } else { @@ -1575,7 +1579,7 @@ NTSTATUS wine_vkCreateWin32SurfaceKHR(void *args)
object->surface = vk_funcs->p_wine_get_native_surface(object->driver_surface);
- WINE_VK_ADD_NON_DISPATCHABLE_MAPPING(instance, object, object->surface); + WINE_VK_ADD_NON_DISPATCHABLE_MAPPING(instance, object, object->surface, object);
*surface = wine_surface_to_handle(object);
@@ -1689,7 +1693,7 @@ NTSTATUS wine_vkCreateDebugUtilsMessengerEXT(void *args) return res; }
- WINE_VK_ADD_NON_DISPATCHABLE_MAPPING(instance, object, object->debug_messenger); + WINE_VK_ADD_NON_DISPATCHABLE_MAPPING(instance, object, object->debug_messenger, object); *messenger = wine_debug_utils_messenger_to_handle(object);
return VK_SUCCESS; @@ -1753,7 +1757,7 @@ NTSTATUS wine_vkCreateDebugReportCallbackEXT(void *args) return res; }
- WINE_VK_ADD_NON_DISPATCHABLE_MAPPING(instance, object, object->debug_callback); + WINE_VK_ADD_NON_DISPATCHABLE_MAPPING(instance, object, object->debug_callback, object); *callback = wine_debug_report_callback_to_handle(object);
return VK_SUCCESS; diff --git a/dlls/winevulkan/vulkan_loader.h b/dlls/winevulkan/vulkan_loader.h index bf99cf57694..fdf6d3d1699 100644 --- a/dlls/winevulkan/vulkan_loader.h +++ b/dlls/winevulkan/vulkan_loader.h @@ -78,6 +78,16 @@ struct VkDevice_T struct VkQueue_T queues[1]; };
+struct vk_command_pool +{ + UINT64 unix_handle; +}; + +static inline struct vk_command_pool *command_pool_from_handle(VkCommandPool handle) +{ + return (struct vk_command_pool *)(uintptr_t)handle; +} + struct vulkan_func { const char *name; diff --git a/dlls/winevulkan/vulkan_private.h b/dlls/winevulkan/vulkan_private.h index 99907252e2d..5f7642d5f6d 100644 --- a/dlls/winevulkan/vulkan_private.h +++ b/dlls/winevulkan/vulkan_private.h @@ -157,6 +157,7 @@ static inline struct wine_queue *wine_queue_from_handle(VkQueue handle)
struct wine_cmd_pool { + VkCommandPool handle; VkCommandPool command_pool;
struct list command_buffers; @@ -166,12 +167,8 @@ struct wine_cmd_pool
static inline struct wine_cmd_pool *wine_cmd_pool_from_handle(VkCommandPool handle) { - return (struct wine_cmd_pool *)(uintptr_t)handle; -} - -static inline VkCommandPool wine_cmd_pool_to_handle(struct wine_cmd_pool *cmd_pool) -{ - return (VkCommandPool)(uintptr_t)cmd_pool; + struct vk_command_pool *client_ptr = command_pool_from_handle(handle); + return (struct wine_cmd_pool *)(uintptr_t)client_ptr->unix_handle; }
struct wine_debug_utils_messenger
From: Jacek Caban jacek@codeweavers.com
--- dlls/winevulkan/loader.c | 63 +++++ dlls/winevulkan/loader_thunks.c | 19 -- dlls/winevulkan/make_vulkan | 17 +- dlls/winevulkan/vulkan.c | 50 ++-- dlls/winevulkan/vulkan_loader.h | 8 + dlls/winevulkan/vulkan_private.h | 15 +- dlls/winevulkan/vulkan_thunks.c | 460 +++++++++++++++---------------- 7 files changed, 331 insertions(+), 301 deletions(-)
diff --git a/dlls/winevulkan/loader.c b/dlls/winevulkan/loader.c index ce5d2314169..847207f8cee 100644 --- a/dlls/winevulkan/loader.c +++ b/dlls/winevulkan/loader.c @@ -501,6 +501,7 @@ VkResult WINAPI vkCreateCommandPool(VkDevice device, const VkCommandPoolCreateIn if (!(cmd_pool = malloc(sizeof(*cmd_pool)))) return VK_ERROR_OUT_OF_HOST_MEMORY; cmd_pool->unix_handle = 0; + list_init(&cmd_pool->command_buffers);
params.device = device; params.pCreateInfo = create_info; @@ -517,6 +518,19 @@ void WINAPI vkDestroyCommandPool(VkDevice device, VkCommandPool handle, const Vk { struct vk_command_pool *cmd_pool = command_pool_from_handle(handle); struct vkDestroyCommandPool_params params; + VkCommandBuffer buffer, cursor; + + if (!cmd_pool) + return; + + /* The Vulkan spec says: + * + * "When a pool is destroyed, all command buffers allocated from the pool are freed." + */ + LIST_FOR_EACH_ENTRY_SAFE(buffer, cursor, &cmd_pool->command_buffers, struct VkCommandBuffer_T, pool_link) + { + vkFreeCommandBuffers(device, handle, 1, &buffer); + }
params.device = device; params.commandPool = handle; @@ -525,6 +539,55 @@ void WINAPI vkDestroyCommandPool(VkDevice device, VkCommandPool handle, const Vk free(cmd_pool); }
+VkResult WINAPI vkAllocateCommandBuffers(VkDevice device, const VkCommandBufferAllocateInfo *allocate_info, + VkCommandBuffer *buffers) +{ + struct vk_command_pool *pool = command_pool_from_handle(allocate_info->commandPool); + struct vkAllocateCommandBuffers_params params; + uint32_t i; + VkResult result; + + for (i = 0; i < allocate_info->commandBufferCount; i++) + buffers[i] = alloc_vk_object(sizeof(*buffers[i])); + + params.device = device; + params.pAllocateInfo = allocate_info; + params.pCommandBuffers = buffers; + result = vk_unix_call(unix_vkAllocateCommandBuffers, ¶ms); + if (result == VK_SUCCESS) + { + for (i = 0; i < allocate_info->commandBufferCount; i++) + list_add_tail(&pool->command_buffers, &buffers[i]->pool_link); + } + else + { + for (i = 0; i < allocate_info->commandBufferCount; i++) + { + free(buffers[i]); + buffers[i] = NULL; + } + } + return result; +} + +void WINAPI vkFreeCommandBuffers(VkDevice device, VkCommandPool cmd_pool, uint32_t count, + const VkCommandBuffer *buffers) +{ + struct vkFreeCommandBuffers_params params; + uint32_t i; + + params.device = device; + params.commandPool = cmd_pool; + params.commandBufferCount = count; + params.pCommandBuffers = buffers; + vk_unix_call(unix_vkFreeCommandBuffers, ¶ms); + for (i = 0; i < count; i++) + { + list_remove(&buffers[i]->pool_link); + free(buffers[i]); + } +} + static BOOL WINAPI call_vulkan_debug_report_callback( struct wine_vk_debug_report_params *params, ULONG size ) { return params->user_callback(params->flags, params->object_type, params->object_handle, params->location, diff --git a/dlls/winevulkan/loader_thunks.c b/dlls/winevulkan/loader_thunks.c index 32626c27eab..22f70e530ec 100644 --- a/dlls/winevulkan/loader_thunks.c +++ b/dlls/winevulkan/loader_thunks.c @@ -51,15 +51,6 @@ VkResult WINAPI vkAcquireProfilingLockKHR(VkDevice device, const VkAcquireProfil return vk_unix_call(unix_vkAcquireProfilingLockKHR, ¶ms); }
-VkResult WINAPI vkAllocateCommandBuffers(VkDevice device, const VkCommandBufferAllocateInfo *pAllocateInfo, VkCommandBuffer *pCommandBuffers) -{ - struct vkAllocateCommandBuffers_params params; - params.device = device; - params.pAllocateInfo = pAllocateInfo; - params.pCommandBuffers = pCommandBuffers; - return vk_unix_call(unix_vkAllocateCommandBuffers, ¶ms); -} - VkResult WINAPI vkAllocateDescriptorSets(VkDevice device, const VkDescriptorSetAllocateInfo *pAllocateInfo, VkDescriptorSet *pDescriptorSets) { struct vkAllocateDescriptorSets_params params; @@ -2781,16 +2772,6 @@ VkResult WINAPI vkFlushMappedMemoryRanges(VkDevice device, uint32_t memoryRangeC return vk_unix_call(unix_vkFlushMappedMemoryRanges, ¶ms); }
-void WINAPI vkFreeCommandBuffers(VkDevice device, VkCommandPool commandPool, uint32_t commandBufferCount, const VkCommandBuffer *pCommandBuffers) -{ - struct vkFreeCommandBuffers_params params; - params.device = device; - params.commandPool = commandPool; - params.commandBufferCount = commandBufferCount; - params.pCommandBuffers = pCommandBuffers; - vk_unix_call(unix_vkFreeCommandBuffers, ¶ms); -} - VkResult WINAPI vkFreeDescriptorSets(VkDevice device, VkDescriptorPool descriptorPool, uint32_t descriptorSetCount, const VkDescriptorSet *pDescriptorSets) { struct vkFreeDescriptorSets_params params; diff --git a/dlls/winevulkan/make_vulkan b/dlls/winevulkan/make_vulkan index 068e140a738..fe3df259fc7 100755 --- a/dlls/winevulkan/make_vulkan +++ b/dlls/winevulkan/make_vulkan @@ -200,13 +200,13 @@ FUNCTION_OVERRIDES = { "vkGetPhysicalDeviceProperties2KHR" : {"dispatch" : True, "driver" : False, "thunk" : ThunkType.PUBLIC, "loader_thunk" : ThunkType.PRIVATE},
# Device functions - "vkAllocateCommandBuffers" : {"dispatch" : True, "driver" : False, "thunk" : ThunkType.NONE}, + "vkAllocateCommandBuffers" : {"dispatch" : True, "driver" : False, "thunk" : ThunkType.NONE, "loader_thunk" : ThunkType.PRIVATE}, "vkCreateCommandPool" : {"dispatch": True, "driver" : False, "thunk" : ThunkType.NONE, "loader_thunk" : ThunkType.PRIVATE, "extra_param" : "client_ptr"}, "vkCreateComputePipelines" : {"dispatch": True, "driver" : False, "thunk" : ThunkType.PRIVATE}, "vkCreateGraphicsPipelines" : {"dispatch": True, "driver" : False, "thunk" : ThunkType.PRIVATE}, "vkDestroyCommandPool" : {"dispatch": True, "driver" : False, "thunk" : ThunkType.NONE, "loader_thunk" : ThunkType.PRIVATE}, "vkDestroyDevice" : {"dispatch" : True, "driver" : False, "thunk" : ThunkType.NONE, "loader_thunk" : ThunkType.PRIVATE}, - "vkFreeCommandBuffers" : {"dispatch" : True, "driver" : False, "thunk" : ThunkType.NONE}, + "vkFreeCommandBuffers" : {"dispatch" : True, "driver" : False, "thunk" : ThunkType.NONE, "loader_thunk" : ThunkType.PRIVATE}, "vkGetDeviceProcAddr" : {"dispatch" : False, "driver" : True, "thunk" : ThunkType.NONE, "loader_thunk" : ThunkType.NONE}, "vkGetDeviceQueue" : {"dispatch": True, "driver" : False, "thunk" : ThunkType.NONE}, "vkGetDeviceQueue2" : {"dispatch": True, "driver" : False, "thunk" : ThunkType.NONE}, @@ -1061,6 +1061,8 @@ class VkHandle(object): if self.parent is None: # Should only happen for VkInstance return "wine_instance_from_handle({0})->funcs".format(param) + elif self.name == "VkCommandBuffer": + return "wine_cmd_buffer_from_handle({0})->device->funcs".format(param) elif self.name == "VkDevice": return "wine_device_from_handle({0})->funcs".format(param) elif self.name == "VkPhysicalDevice": @@ -1098,6 +1100,8 @@ class VkHandle(object): def native_handle(self, name): """ Provide access to the native handle of a wrapped object. """
+ if self.name == "VkCommandBuffer": + return "wine_cmd_buffer_from_handle({0})->command_buffer".format(name) if self.name == "VkCommandPool": return "wine_cmd_pool_from_handle({0})->command_pool".format(name) if self.name == "VkDebugUtilsMessengerEXT": @@ -1114,15 +1118,6 @@ class VkHandle(object): return "wine_queue_from_handle({0})->queue".format(name) if self.name == "VkSurfaceKHR": return "wine_surface_from_handle({0})->surface".format(name) - - native_handle_name = None - - if self.name == "VkCommandBuffer": - native_handle_name = "command_buffer" - - if native_handle_name: - return "{0}->{1}".format(name, native_handle_name) - if self.is_dispatchable(): LOGGER.error("Unhandled native handle for: {0}".format(self.name)) return None diff --git a/dlls/winevulkan/vulkan.c b/dlls/winevulkan/vulkan.c index 652beb7b4e0..7bc8712d7ca 100644 --- a/dlls/winevulkan/vulkan.c +++ b/dlls/winevulkan/vulkan.c @@ -313,13 +313,15 @@ static void wine_vk_free_command_buffers(struct wine_device *device,
for (i = 0; i < count; i++) { - if (!buffers[i]) + struct wine_cmd_buffer *buffer = wine_cmd_buffer_from_handle(buffers[i]); + + if (!buffer) continue;
- device->funcs.p_vkFreeCommandBuffers(device->device, pool->command_pool, 1, &buffers[i]->command_buffer); - list_remove(&buffers[i]->pool_link); - WINE_VK_REMOVE_HANDLE_MAPPING(device->phys_dev->instance, buffers[i]); - free(buffers[i]); + device->funcs.p_vkFreeCommandBuffers(device->device, pool->command_pool, 1, &buffer->command_buffer); + WINE_VK_REMOVE_HANDLE_MAPPING(device->phys_dev->instance, buffer); + buffer->handle->base.unix_handle = 0; + free(buffer); } }
@@ -649,6 +651,7 @@ NTSTATUS wine_vkAllocateCommandBuffers(void *args) struct wine_device *device = wine_device_from_handle(params->device); const VkCommandBufferAllocateInfo *allocate_info = params->pAllocateInfo; VkCommandBuffer *buffers = params->pCommandBuffers; + struct wine_cmd_buffer *buffer; struct wine_cmd_pool *pool; VkResult res = VK_SUCCESS; unsigned int i; @@ -657,8 +660,6 @@ NTSTATUS wine_vkAllocateCommandBuffers(void *args)
pool = wine_cmd_pool_from_handle(allocate_info->commandPool);
- memset(buffers, 0, allocate_info->commandBufferCount * sizeof(*buffers)); - for (i = 0; i < allocate_info->commandBufferCount; i++) { VkCommandBufferAllocateInfo_host allocate_info_host; @@ -673,32 +674,29 @@ NTSTATUS wine_vkAllocateCommandBuffers(void *args) TRACE("Allocating command buffer %u from pool 0x%s.\n", i, wine_dbgstr_longlong(allocate_info_host.commandPool));
- if (!(buffers[i] = calloc(1, sizeof(**buffers)))) + if (!(buffer = calloc(1, sizeof(*buffer)))) { res = VK_ERROR_OUT_OF_HOST_MEMORY; break; }
- buffers[i]->base.loader_magic = VULKAN_ICD_MAGIC_VALUE; - buffers[i]->device = device; - list_add_tail(&pool->command_buffers, &buffers[i]->pool_link); + buffer->handle = buffers[i]; + buffer->device = device; res = device->funcs.p_vkAllocateCommandBuffers(device->device, - &allocate_info_host, &buffers[i]->command_buffer); - WINE_VK_ADD_DISPATCHABLE_MAPPING(device->phys_dev->instance, buffers[i], - buffers[i]->command_buffer, buffers[i]); + &allocate_info_host, &buffer->command_buffer); + buffer->handle->base.unix_handle = (uintptr_t)buffer; + WINE_VK_ADD_DISPATCHABLE_MAPPING(device->phys_dev->instance, buffer->handle, + buffer->command_buffer, buffer); if (res != VK_SUCCESS) { ERR("Failed to allocate command buffer, res=%d.\n", res); - buffers[i]->command_buffer = VK_NULL_HANDLE; + buffer->command_buffer = VK_NULL_HANDLE; break; } }
if (res != VK_SUCCESS) - { wine_vk_free_command_buffers(device, pool, i + 1, buffers); - memset(buffers, 0, allocate_info->commandBufferCount * sizeof(*buffers)); - }
return res; } @@ -1160,8 +1158,6 @@ NTSTATUS wine_vkCreateCommandPool(void *args) if (!(object = calloc(1, sizeof(*object)))) return VK_ERROR_OUT_OF_HOST_MEMORY;
- list_init(&object->command_buffers); - res = device->funcs.p_vkCreateCommandPool(device->device, info, NULL, &object->command_pool);
if (res == VK_SUCCESS) @@ -1187,26 +1183,12 @@ NTSTATUS wine_vkDestroyCommandPool(void *args) VkCommandPool handle = params->commandPool; const VkAllocationCallbacks *allocator = params->pAllocator; struct wine_cmd_pool *pool = wine_cmd_pool_from_handle(handle); - struct VkCommandBuffer_T *buffer, *cursor;
TRACE("%p, 0x%s, %p\n", device, wine_dbgstr_longlong(handle), allocator);
- if (!handle) - return STATUS_SUCCESS; - if (allocator) FIXME("Support for allocation callbacks not implemented yet\n");
- /* The Vulkan spec says: - * - * "When a pool is destroyed, all command buffers allocated from the pool are freed." - */ - LIST_FOR_EACH_ENTRY_SAFE(buffer, cursor, &pool->command_buffers, struct VkCommandBuffer_T, pool_link) - { - WINE_VK_REMOVE_HANDLE_MAPPING(device->phys_dev->instance, buffer); - free(buffer); - } - WINE_VK_REMOVE_HANDLE_MAPPING(device->phys_dev->instance, pool);
device->funcs.p_vkDestroyCommandPool(device->device, pool->command_pool, NULL); diff --git a/dlls/winevulkan/vulkan_loader.h b/dlls/winevulkan/vulkan_loader.h index fdf6d3d1699..64a136b0804 100644 --- a/dlls/winevulkan/vulkan_loader.h +++ b/dlls/winevulkan/vulkan_loader.h @@ -30,6 +30,7 @@ #include "wine/debug.h" #include "wine/vulkan.h" #include "wine/unixlib.h" +#include "wine/list.h"
#include "loader_thunks.h"
@@ -81,6 +82,7 @@ struct VkDevice_T struct vk_command_pool { UINT64 unix_handle; + struct list command_buffers; };
static inline struct vk_command_pool *command_pool_from_handle(VkCommandPool handle) @@ -88,6 +90,12 @@ static inline struct vk_command_pool *command_pool_from_handle(VkCommandPool han return (struct vk_command_pool *)(uintptr_t)handle; }
+struct VkCommandBuffer_T +{ + struct wine_vk_base base; + struct list pool_link; +}; + struct vulkan_func { const char *name; diff --git a/dlls/winevulkan/vulkan_private.h b/dlls/winevulkan/vulkan_private.h index 5f7642d5f6d..a9f2aa024e6 100644 --- a/dlls/winevulkan/vulkan_private.h +++ b/dlls/winevulkan/vulkan_private.h @@ -28,8 +28,6 @@
#include <pthread.h>
-#include "wine/list.h" - #include "vulkan_loader.h" #include "vulkan_thunks.h"
@@ -43,16 +41,21 @@ struct wine_vk_mapping uint64_t wine_wrapped_handle; };
-struct VkCommandBuffer_T +struct wine_cmd_buffer { - struct wine_vk_base base; struct wine_device *device; /* parent */ + + VkCommandBuffer handle; /* client command buffer */ VkCommandBuffer command_buffer; /* native command buffer */
- struct list pool_link; struct wine_vk_mapping mapping; };
+static inline struct wine_cmd_buffer *wine_cmd_buffer_from_handle(VkCommandBuffer handle) +{ + return (struct wine_cmd_buffer *)(uintptr_t)handle->base.unix_handle; +} + struct wine_device { struct vulkan_device_funcs funcs; @@ -160,8 +163,6 @@ struct wine_cmd_pool VkCommandPool handle; VkCommandPool command_pool;
- struct list command_buffers; - struct wine_vk_mapping mapping; };
diff --git a/dlls/winevulkan/vulkan_thunks.c b/dlls/winevulkan/vulkan_thunks.c index 5e5fab759a7..7d585d29cb7 100644 --- a/dlls/winevulkan/vulkan_thunks.c +++ b/dlls/winevulkan/vulkan_thunks.c @@ -742,7 +742,7 @@ static inline VkCommandBuffer *convert_VkCommandBuffer_array_win_to_host(const V out = malloc(count * sizeof(*out)); for (i = 0; i < count; i++) { - out[i] = in[i]->command_buffer; + out[i] = wine_cmd_buffer_from_handle(in[i])->command_buffer; }
return out; @@ -2574,7 +2574,7 @@ static inline VkCommandBufferSubmitInfo *convert_VkCommandBufferSubmitInfo_array { out[i].sType = in[i].sType; out[i].pNext = in[i].pNext; - out[i].commandBuffer = in[i].commandBuffer->command_buffer; + out[i].commandBuffer = wine_cmd_buffer_from_handle(in[i].commandBuffer)->command_buffer; out[i].deviceMask = in[i].deviceMask; }
@@ -5357,13 +5357,13 @@ static NTSTATUS wine_vkBeginCommandBuffer(void *args) TRACE("%p, %p\n", params->commandBuffer, params->pBeginInfo);
convert_VkCommandBufferBeginInfo_win_to_host(params->pBeginInfo, &pBeginInfo_host); - result = params->commandBuffer->device->funcs.p_vkBeginCommandBuffer(params->commandBuffer->command_buffer, &pBeginInfo_host); + result = wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkBeginCommandBuffer(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, &pBeginInfo_host);
free_VkCommandBufferBeginInfo(&pBeginInfo_host); return result; #else TRACE("%p, %p\n", params->commandBuffer, params->pBeginInfo); - return params->commandBuffer->device->funcs.p_vkBeginCommandBuffer(params->commandBuffer->command_buffer, params->pBeginInfo); + return wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkBeginCommandBuffer(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->pBeginInfo); #endif }
@@ -5503,12 +5503,12 @@ static NTSTATUS wine_vkCmdBeginConditionalRenderingEXT(void *args) TRACE("%p, %p\n", params->commandBuffer, params->pConditionalRenderingBegin);
convert_VkConditionalRenderingBeginInfoEXT_win_to_host(params->pConditionalRenderingBegin, &pConditionalRenderingBegin_host); - params->commandBuffer->device->funcs.p_vkCmdBeginConditionalRenderingEXT(params->commandBuffer->command_buffer, &pConditionalRenderingBegin_host); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdBeginConditionalRenderingEXT(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, &pConditionalRenderingBegin_host);
return STATUS_SUCCESS; #else TRACE("%p, %p\n", params->commandBuffer, params->pConditionalRenderingBegin); - params->commandBuffer->device->funcs.p_vkCmdBeginConditionalRenderingEXT(params->commandBuffer->command_buffer, params->pConditionalRenderingBegin); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdBeginConditionalRenderingEXT(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->pConditionalRenderingBegin); return STATUS_SUCCESS; #endif } @@ -5517,7 +5517,7 @@ static NTSTATUS wine_vkCmdBeginDebugUtilsLabelEXT(void *args) { struct vkCmdBeginDebugUtilsLabelEXT_params *params = args; TRACE("%p, %p\n", params->commandBuffer, params->pLabelInfo); - params->commandBuffer->device->funcs.p_vkCmdBeginDebugUtilsLabelEXT(params->commandBuffer->command_buffer, params->pLabelInfo); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdBeginDebugUtilsLabelEXT(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->pLabelInfo); return STATUS_SUCCESS; }
@@ -5525,7 +5525,7 @@ static NTSTATUS wine_vkCmdBeginQuery(void *args) { struct vkCmdBeginQuery_params *params = args; TRACE("%p, 0x%s, %u, %#x\n", params->commandBuffer, wine_dbgstr_longlong(params->queryPool), params->query, params->flags); - params->commandBuffer->device->funcs.p_vkCmdBeginQuery(params->commandBuffer->command_buffer, params->queryPool, params->query, params->flags); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdBeginQuery(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->queryPool, params->query, params->flags); return STATUS_SUCCESS; }
@@ -5533,7 +5533,7 @@ static NTSTATUS wine_vkCmdBeginQueryIndexedEXT(void *args) { struct vkCmdBeginQueryIndexedEXT_params *params = args; TRACE("%p, 0x%s, %u, %#x, %u\n", params->commandBuffer, wine_dbgstr_longlong(params->queryPool), params->query, params->flags, params->index); - params->commandBuffer->device->funcs.p_vkCmdBeginQueryIndexedEXT(params->commandBuffer->command_buffer, params->queryPool, params->query, params->flags, params->index); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdBeginQueryIndexedEXT(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->queryPool, params->query, params->flags, params->index); return STATUS_SUCCESS; }
@@ -5545,12 +5545,12 @@ static NTSTATUS wine_vkCmdBeginRenderPass(void *args) TRACE("%p, %p, %#x\n", params->commandBuffer, params->pRenderPassBegin, params->contents);
convert_VkRenderPassBeginInfo_win_to_host(params->pRenderPassBegin, &pRenderPassBegin_host); - params->commandBuffer->device->funcs.p_vkCmdBeginRenderPass(params->commandBuffer->command_buffer, &pRenderPassBegin_host, params->contents); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdBeginRenderPass(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, &pRenderPassBegin_host, params->contents);
return STATUS_SUCCESS; #else TRACE("%p, %p, %#x\n", params->commandBuffer, params->pRenderPassBegin, params->contents); - params->commandBuffer->device->funcs.p_vkCmdBeginRenderPass(params->commandBuffer->command_buffer, params->pRenderPassBegin, params->contents); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdBeginRenderPass(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->pRenderPassBegin, params->contents); return STATUS_SUCCESS; #endif } @@ -5563,12 +5563,12 @@ static NTSTATUS wine_vkCmdBeginRenderPass2(void *args) TRACE("%p, %p, %p\n", params->commandBuffer, params->pRenderPassBegin, params->pSubpassBeginInfo);
convert_VkRenderPassBeginInfo_win_to_host(params->pRenderPassBegin, &pRenderPassBegin_host); - params->commandBuffer->device->funcs.p_vkCmdBeginRenderPass2(params->commandBuffer->command_buffer, &pRenderPassBegin_host, params->pSubpassBeginInfo); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdBeginRenderPass2(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, &pRenderPassBegin_host, params->pSubpassBeginInfo);
return STATUS_SUCCESS; #else TRACE("%p, %p, %p\n", params->commandBuffer, params->pRenderPassBegin, params->pSubpassBeginInfo); - params->commandBuffer->device->funcs.p_vkCmdBeginRenderPass2(params->commandBuffer->command_buffer, params->pRenderPassBegin, params->pSubpassBeginInfo); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdBeginRenderPass2(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->pRenderPassBegin, params->pSubpassBeginInfo); return STATUS_SUCCESS; #endif } @@ -5581,12 +5581,12 @@ static NTSTATUS wine_vkCmdBeginRenderPass2KHR(void *args) TRACE("%p, %p, %p\n", params->commandBuffer, params->pRenderPassBegin, params->pSubpassBeginInfo);
convert_VkRenderPassBeginInfo_win_to_host(params->pRenderPassBegin, &pRenderPassBegin_host); - params->commandBuffer->device->funcs.p_vkCmdBeginRenderPass2KHR(params->commandBuffer->command_buffer, &pRenderPassBegin_host, params->pSubpassBeginInfo); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdBeginRenderPass2KHR(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, &pRenderPassBegin_host, params->pSubpassBeginInfo);
return STATUS_SUCCESS; #else TRACE("%p, %p, %p\n", params->commandBuffer, params->pRenderPassBegin, params->pSubpassBeginInfo); - params->commandBuffer->device->funcs.p_vkCmdBeginRenderPass2KHR(params->commandBuffer->command_buffer, params->pRenderPassBegin, params->pSubpassBeginInfo); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdBeginRenderPass2KHR(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->pRenderPassBegin, params->pSubpassBeginInfo); return STATUS_SUCCESS; #endif } @@ -5599,13 +5599,13 @@ static NTSTATUS wine_vkCmdBeginRendering(void *args) TRACE("%p, %p\n", params->commandBuffer, params->pRenderingInfo);
convert_VkRenderingInfo_win_to_host(params->pRenderingInfo, &pRenderingInfo_host); - params->commandBuffer->device->funcs.p_vkCmdBeginRendering(params->commandBuffer->command_buffer, &pRenderingInfo_host); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdBeginRendering(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, &pRenderingInfo_host);
free_VkRenderingInfo(&pRenderingInfo_host); return STATUS_SUCCESS; #else TRACE("%p, %p\n", params->commandBuffer, params->pRenderingInfo); - params->commandBuffer->device->funcs.p_vkCmdBeginRendering(params->commandBuffer->command_buffer, params->pRenderingInfo); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdBeginRendering(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->pRenderingInfo); return STATUS_SUCCESS; #endif } @@ -5618,13 +5618,13 @@ static NTSTATUS wine_vkCmdBeginRenderingKHR(void *args) TRACE("%p, %p\n", params->commandBuffer, params->pRenderingInfo);
convert_VkRenderingInfo_win_to_host(params->pRenderingInfo, &pRenderingInfo_host); - params->commandBuffer->device->funcs.p_vkCmdBeginRenderingKHR(params->commandBuffer->command_buffer, &pRenderingInfo_host); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdBeginRenderingKHR(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, &pRenderingInfo_host);
free_VkRenderingInfo(&pRenderingInfo_host); return STATUS_SUCCESS; #else TRACE("%p, %p\n", params->commandBuffer, params->pRenderingInfo); - params->commandBuffer->device->funcs.p_vkCmdBeginRenderingKHR(params->commandBuffer->command_buffer, params->pRenderingInfo); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdBeginRenderingKHR(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->pRenderingInfo); return STATUS_SUCCESS; #endif } @@ -5633,7 +5633,7 @@ static NTSTATUS wine_vkCmdBeginTransformFeedbackEXT(void *args) { struct vkCmdBeginTransformFeedbackEXT_params *params = args; TRACE("%p, %u, %u, %p, %p\n", params->commandBuffer, params->firstCounterBuffer, params->counterBufferCount, params->pCounterBuffers, params->pCounterBufferOffsets); - params->commandBuffer->device->funcs.p_vkCmdBeginTransformFeedbackEXT(params->commandBuffer->command_buffer, params->firstCounterBuffer, params->counterBufferCount, params->pCounterBuffers, params->pCounterBufferOffsets); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdBeginTransformFeedbackEXT(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->firstCounterBuffer, params->counterBufferCount, params->pCounterBuffers, params->pCounterBufferOffsets); return STATUS_SUCCESS; }
@@ -5641,7 +5641,7 @@ static NTSTATUS wine_vkCmdBindDescriptorSets(void *args) { struct vkCmdBindDescriptorSets_params *params = args; TRACE("%p, %#x, 0x%s, %u, %u, %p, %u, %p\n", params->commandBuffer, params->pipelineBindPoint, wine_dbgstr_longlong(params->layout), params->firstSet, params->descriptorSetCount, params->pDescriptorSets, params->dynamicOffsetCount, params->pDynamicOffsets); - params->commandBuffer->device->funcs.p_vkCmdBindDescriptorSets(params->commandBuffer->command_buffer, params->pipelineBindPoint, params->layout, params->firstSet, params->descriptorSetCount, params->pDescriptorSets, params->dynamicOffsetCount, params->pDynamicOffsets); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdBindDescriptorSets(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->pipelineBindPoint, params->layout, params->firstSet, params->descriptorSetCount, params->pDescriptorSets, params->dynamicOffsetCount, params->pDynamicOffsets); return STATUS_SUCCESS; }
@@ -5649,7 +5649,7 @@ static NTSTATUS wine_vkCmdBindIndexBuffer(void *args) { struct vkCmdBindIndexBuffer_params *params = args; TRACE("%p, 0x%s, 0x%s, %#x\n", params->commandBuffer, wine_dbgstr_longlong(params->buffer), wine_dbgstr_longlong(params->offset), params->indexType); - params->commandBuffer->device->funcs.p_vkCmdBindIndexBuffer(params->commandBuffer->command_buffer, params->buffer, params->offset, params->indexType); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdBindIndexBuffer(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->buffer, params->offset, params->indexType); return STATUS_SUCCESS; }
@@ -5657,7 +5657,7 @@ static NTSTATUS wine_vkCmdBindInvocationMaskHUAWEI(void *args) { struct vkCmdBindInvocationMaskHUAWEI_params *params = args; TRACE("%p, 0x%s, %#x\n", params->commandBuffer, wine_dbgstr_longlong(params->imageView), params->imageLayout); - params->commandBuffer->device->funcs.p_vkCmdBindInvocationMaskHUAWEI(params->commandBuffer->command_buffer, params->imageView, params->imageLayout); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdBindInvocationMaskHUAWEI(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->imageView, params->imageLayout); return STATUS_SUCCESS; }
@@ -5665,7 +5665,7 @@ static NTSTATUS wine_vkCmdBindPipeline(void *args) { struct vkCmdBindPipeline_params *params = args; TRACE("%p, %#x, 0x%s\n", params->commandBuffer, params->pipelineBindPoint, wine_dbgstr_longlong(params->pipeline)); - params->commandBuffer->device->funcs.p_vkCmdBindPipeline(params->commandBuffer->command_buffer, params->pipelineBindPoint, params->pipeline); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdBindPipeline(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->pipelineBindPoint, params->pipeline); return STATUS_SUCCESS; }
@@ -5673,7 +5673,7 @@ static NTSTATUS wine_vkCmdBindPipelineShaderGroupNV(void *args) { struct vkCmdBindPipelineShaderGroupNV_params *params = args; TRACE("%p, %#x, 0x%s, %u\n", params->commandBuffer, params->pipelineBindPoint, wine_dbgstr_longlong(params->pipeline), params->groupIndex); - params->commandBuffer->device->funcs.p_vkCmdBindPipelineShaderGroupNV(params->commandBuffer->command_buffer, params->pipelineBindPoint, params->pipeline, params->groupIndex); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdBindPipelineShaderGroupNV(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->pipelineBindPoint, params->pipeline, params->groupIndex); return STATUS_SUCCESS; }
@@ -5681,7 +5681,7 @@ static NTSTATUS wine_vkCmdBindShadingRateImageNV(void *args) { struct vkCmdBindShadingRateImageNV_params *params = args; TRACE("%p, 0x%s, %#x\n", params->commandBuffer, wine_dbgstr_longlong(params->imageView), params->imageLayout); - params->commandBuffer->device->funcs.p_vkCmdBindShadingRateImageNV(params->commandBuffer->command_buffer, params->imageView, params->imageLayout); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdBindShadingRateImageNV(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->imageView, params->imageLayout); return STATUS_SUCCESS; }
@@ -5689,7 +5689,7 @@ static NTSTATUS wine_vkCmdBindTransformFeedbackBuffersEXT(void *args) { struct vkCmdBindTransformFeedbackBuffersEXT_params *params = args; TRACE("%p, %u, %u, %p, %p, %p\n", params->commandBuffer, params->firstBinding, params->bindingCount, params->pBuffers, params->pOffsets, params->pSizes); - params->commandBuffer->device->funcs.p_vkCmdBindTransformFeedbackBuffersEXT(params->commandBuffer->command_buffer, params->firstBinding, params->bindingCount, params->pBuffers, params->pOffsets, params->pSizes); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdBindTransformFeedbackBuffersEXT(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->firstBinding, params->bindingCount, params->pBuffers, params->pOffsets, params->pSizes); return STATUS_SUCCESS; }
@@ -5697,7 +5697,7 @@ static NTSTATUS wine_vkCmdBindVertexBuffers(void *args) { struct vkCmdBindVertexBuffers_params *params = args; TRACE("%p, %u, %u, %p, %p\n", params->commandBuffer, params->firstBinding, params->bindingCount, params->pBuffers, params->pOffsets); - params->commandBuffer->device->funcs.p_vkCmdBindVertexBuffers(params->commandBuffer->command_buffer, params->firstBinding, params->bindingCount, params->pBuffers, params->pOffsets); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdBindVertexBuffers(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->firstBinding, params->bindingCount, params->pBuffers, params->pOffsets); return STATUS_SUCCESS; }
@@ -5705,7 +5705,7 @@ static NTSTATUS wine_vkCmdBindVertexBuffers2(void *args) { struct vkCmdBindVertexBuffers2_params *params = args; TRACE("%p, %u, %u, %p, %p, %p, %p\n", params->commandBuffer, params->firstBinding, params->bindingCount, params->pBuffers, params->pOffsets, params->pSizes, params->pStrides); - params->commandBuffer->device->funcs.p_vkCmdBindVertexBuffers2(params->commandBuffer->command_buffer, params->firstBinding, params->bindingCount, params->pBuffers, params->pOffsets, params->pSizes, params->pStrides); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdBindVertexBuffers2(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->firstBinding, params->bindingCount, params->pBuffers, params->pOffsets, params->pSizes, params->pStrides); return STATUS_SUCCESS; }
@@ -5713,7 +5713,7 @@ static NTSTATUS wine_vkCmdBindVertexBuffers2EXT(void *args) { struct vkCmdBindVertexBuffers2EXT_params *params = args; TRACE("%p, %u, %u, %p, %p, %p, %p\n", params->commandBuffer, params->firstBinding, params->bindingCount, params->pBuffers, params->pOffsets, params->pSizes, params->pStrides); - params->commandBuffer->device->funcs.p_vkCmdBindVertexBuffers2EXT(params->commandBuffer->command_buffer, params->firstBinding, params->bindingCount, params->pBuffers, params->pOffsets, params->pSizes, params->pStrides); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdBindVertexBuffers2EXT(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->firstBinding, params->bindingCount, params->pBuffers, params->pOffsets, params->pSizes, params->pStrides); return STATUS_SUCCESS; }
@@ -5721,7 +5721,7 @@ static NTSTATUS wine_vkCmdBlitImage(void *args) { struct vkCmdBlitImage_params *params = args; TRACE("%p, 0x%s, %#x, 0x%s, %#x, %u, %p, %#x\n", params->commandBuffer, wine_dbgstr_longlong(params->srcImage), params->srcImageLayout, wine_dbgstr_longlong(params->dstImage), params->dstImageLayout, params->regionCount, params->pRegions, params->filter); - params->commandBuffer->device->funcs.p_vkCmdBlitImage(params->commandBuffer->command_buffer, params->srcImage, params->srcImageLayout, params->dstImage, params->dstImageLayout, params->regionCount, params->pRegions, params->filter); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdBlitImage(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->srcImage, params->srcImageLayout, params->dstImage, params->dstImageLayout, params->regionCount, params->pRegions, params->filter); return STATUS_SUCCESS; }
@@ -5733,12 +5733,12 @@ static NTSTATUS wine_vkCmdBlitImage2(void *args) TRACE("%p, %p\n", params->commandBuffer, params->pBlitImageInfo);
convert_VkBlitImageInfo2_win_to_host(params->pBlitImageInfo, &pBlitImageInfo_host); - params->commandBuffer->device->funcs.p_vkCmdBlitImage2(params->commandBuffer->command_buffer, &pBlitImageInfo_host); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdBlitImage2(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, &pBlitImageInfo_host);
return STATUS_SUCCESS; #else TRACE("%p, %p\n", params->commandBuffer, params->pBlitImageInfo); - params->commandBuffer->device->funcs.p_vkCmdBlitImage2(params->commandBuffer->command_buffer, params->pBlitImageInfo); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdBlitImage2(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->pBlitImageInfo); return STATUS_SUCCESS; #endif } @@ -5751,12 +5751,12 @@ static NTSTATUS wine_vkCmdBlitImage2KHR(void *args) TRACE("%p, %p\n", params->commandBuffer, params->pBlitImageInfo);
convert_VkBlitImageInfo2_win_to_host(params->pBlitImageInfo, &pBlitImageInfo_host); - params->commandBuffer->device->funcs.p_vkCmdBlitImage2KHR(params->commandBuffer->command_buffer, &pBlitImageInfo_host); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdBlitImage2KHR(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, &pBlitImageInfo_host);
return STATUS_SUCCESS; #else TRACE("%p, %p\n", params->commandBuffer, params->pBlitImageInfo); - params->commandBuffer->device->funcs.p_vkCmdBlitImage2KHR(params->commandBuffer->command_buffer, params->pBlitImageInfo); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdBlitImage2KHR(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->pBlitImageInfo); return STATUS_SUCCESS; #endif } @@ -5769,13 +5769,13 @@ static NTSTATUS wine_vkCmdBuildAccelerationStructureNV(void *args) TRACE("%p, %p, 0x%s, 0x%s, %u, 0x%s, 0x%s, 0x%s, 0x%s\n", params->commandBuffer, params->pInfo, wine_dbgstr_longlong(params->instanceData), wine_dbgstr_longlong(params->instanceOffset), params->update, wine_dbgstr_longlong(params->dst), wine_dbgstr_longlong(params->src), wine_dbgstr_longlong(params->scratch), wine_dbgstr_longlong(params->scratchOffset));
convert_VkAccelerationStructureInfoNV_win_to_host(params->pInfo, &pInfo_host); - params->commandBuffer->device->funcs.p_vkCmdBuildAccelerationStructureNV(params->commandBuffer->command_buffer, &pInfo_host, params->instanceData, params->instanceOffset, params->update, params->dst, params->src, params->scratch, params->scratchOffset); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdBuildAccelerationStructureNV(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, &pInfo_host, params->instanceData, params->instanceOffset, params->update, params->dst, params->src, params->scratch, params->scratchOffset);
free_VkAccelerationStructureInfoNV(&pInfo_host); return STATUS_SUCCESS; #else TRACE("%p, %p, 0x%s, 0x%s, %u, 0x%s, 0x%s, 0x%s, 0x%s\n", params->commandBuffer, params->pInfo, wine_dbgstr_longlong(params->instanceData), wine_dbgstr_longlong(params->instanceOffset), params->update, wine_dbgstr_longlong(params->dst), wine_dbgstr_longlong(params->src), wine_dbgstr_longlong(params->scratch), wine_dbgstr_longlong(params->scratchOffset)); - params->commandBuffer->device->funcs.p_vkCmdBuildAccelerationStructureNV(params->commandBuffer->command_buffer, params->pInfo, params->instanceData, params->instanceOffset, params->update, params->dst, params->src, params->scratch, params->scratchOffset); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdBuildAccelerationStructureNV(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->pInfo, params->instanceData, params->instanceOffset, params->update, params->dst, params->src, params->scratch, params->scratchOffset); return STATUS_SUCCESS; #endif } @@ -5788,13 +5788,13 @@ static NTSTATUS wine_vkCmdBuildAccelerationStructuresIndirectKHR(void *args) TRACE("%p, %u, %p, %p, %p, %p\n", params->commandBuffer, params->infoCount, params->pInfos, params->pIndirectDeviceAddresses, params->pIndirectStrides, params->ppMaxPrimitiveCounts);
pInfos_host = convert_VkAccelerationStructureBuildGeometryInfoKHR_array_win_to_host(params->pInfos, params->infoCount); - params->commandBuffer->device->funcs.p_vkCmdBuildAccelerationStructuresIndirectKHR(params->commandBuffer->command_buffer, params->infoCount, pInfos_host, params->pIndirectDeviceAddresses, params->pIndirectStrides, params->ppMaxPrimitiveCounts); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdBuildAccelerationStructuresIndirectKHR(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->infoCount, pInfos_host, params->pIndirectDeviceAddresses, params->pIndirectStrides, params->ppMaxPrimitiveCounts);
free_VkAccelerationStructureBuildGeometryInfoKHR_array(pInfos_host, params->infoCount); return STATUS_SUCCESS; #else TRACE("%p, %u, %p, %p, %p, %p\n", params->commandBuffer, params->infoCount, params->pInfos, params->pIndirectDeviceAddresses, params->pIndirectStrides, params->ppMaxPrimitiveCounts); - params->commandBuffer->device->funcs.p_vkCmdBuildAccelerationStructuresIndirectKHR(params->commandBuffer->command_buffer, params->infoCount, params->pInfos, params->pIndirectDeviceAddresses, params->pIndirectStrides, params->ppMaxPrimitiveCounts); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdBuildAccelerationStructuresIndirectKHR(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->infoCount, params->pInfos, params->pIndirectDeviceAddresses, params->pIndirectStrides, params->ppMaxPrimitiveCounts); return STATUS_SUCCESS; #endif } @@ -5807,13 +5807,13 @@ static NTSTATUS wine_vkCmdBuildAccelerationStructuresKHR(void *args) TRACE("%p, %u, %p, %p\n", params->commandBuffer, params->infoCount, params->pInfos, params->ppBuildRangeInfos);
pInfos_host = convert_VkAccelerationStructureBuildGeometryInfoKHR_array_win_to_host(params->pInfos, params->infoCount); - params->commandBuffer->device->funcs.p_vkCmdBuildAccelerationStructuresKHR(params->commandBuffer->command_buffer, params->infoCount, pInfos_host, params->ppBuildRangeInfos); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdBuildAccelerationStructuresKHR(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->infoCount, pInfos_host, params->ppBuildRangeInfos);
free_VkAccelerationStructureBuildGeometryInfoKHR_array(pInfos_host, params->infoCount); return STATUS_SUCCESS; #else TRACE("%p, %u, %p, %p\n", params->commandBuffer, params->infoCount, params->pInfos, params->ppBuildRangeInfos); - params->commandBuffer->device->funcs.p_vkCmdBuildAccelerationStructuresKHR(params->commandBuffer->command_buffer, params->infoCount, params->pInfos, params->ppBuildRangeInfos); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdBuildAccelerationStructuresKHR(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->infoCount, params->pInfos, params->ppBuildRangeInfos); return STATUS_SUCCESS; #endif } @@ -5822,7 +5822,7 @@ static NTSTATUS wine_vkCmdClearAttachments(void *args) { struct vkCmdClearAttachments_params *params = args; TRACE("%p, %u, %p, %u, %p\n", params->commandBuffer, params->attachmentCount, params->pAttachments, params->rectCount, params->pRects); - params->commandBuffer->device->funcs.p_vkCmdClearAttachments(params->commandBuffer->command_buffer, params->attachmentCount, params->pAttachments, params->rectCount, params->pRects); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdClearAttachments(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->attachmentCount, params->pAttachments, params->rectCount, params->pRects); return STATUS_SUCCESS; }
@@ -5830,7 +5830,7 @@ static NTSTATUS wine_vkCmdClearColorImage(void *args) { struct vkCmdClearColorImage_params *params = args; TRACE("%p, 0x%s, %#x, %p, %u, %p\n", params->commandBuffer, wine_dbgstr_longlong(params->image), params->imageLayout, params->pColor, params->rangeCount, params->pRanges); - params->commandBuffer->device->funcs.p_vkCmdClearColorImage(params->commandBuffer->command_buffer, params->image, params->imageLayout, params->pColor, params->rangeCount, params->pRanges); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdClearColorImage(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->image, params->imageLayout, params->pColor, params->rangeCount, params->pRanges); return STATUS_SUCCESS; }
@@ -5838,7 +5838,7 @@ static NTSTATUS wine_vkCmdClearDepthStencilImage(void *args) { struct vkCmdClearDepthStencilImage_params *params = args; TRACE("%p, 0x%s, %#x, %p, %u, %p\n", params->commandBuffer, wine_dbgstr_longlong(params->image), params->imageLayout, params->pDepthStencil, params->rangeCount, params->pRanges); - params->commandBuffer->device->funcs.p_vkCmdClearDepthStencilImage(params->commandBuffer->command_buffer, params->image, params->imageLayout, params->pDepthStencil, params->rangeCount, params->pRanges); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdClearDepthStencilImage(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->image, params->imageLayout, params->pDepthStencil, params->rangeCount, params->pRanges); return STATUS_SUCCESS; }
@@ -5850,12 +5850,12 @@ static NTSTATUS wine_vkCmdCopyAccelerationStructureKHR(void *args) TRACE("%p, %p\n", params->commandBuffer, params->pInfo);
convert_VkCopyAccelerationStructureInfoKHR_win_to_host(params->pInfo, &pInfo_host); - params->commandBuffer->device->funcs.p_vkCmdCopyAccelerationStructureKHR(params->commandBuffer->command_buffer, &pInfo_host); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdCopyAccelerationStructureKHR(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, &pInfo_host);
return STATUS_SUCCESS; #else TRACE("%p, %p\n", params->commandBuffer, params->pInfo); - params->commandBuffer->device->funcs.p_vkCmdCopyAccelerationStructureKHR(params->commandBuffer->command_buffer, params->pInfo); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdCopyAccelerationStructureKHR(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->pInfo); return STATUS_SUCCESS; #endif } @@ -5864,7 +5864,7 @@ static NTSTATUS wine_vkCmdCopyAccelerationStructureNV(void *args) { struct vkCmdCopyAccelerationStructureNV_params *params = args; TRACE("%p, 0x%s, 0x%s, %#x\n", params->commandBuffer, wine_dbgstr_longlong(params->dst), wine_dbgstr_longlong(params->src), params->mode); - params->commandBuffer->device->funcs.p_vkCmdCopyAccelerationStructureNV(params->commandBuffer->command_buffer, params->dst, params->src, params->mode); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdCopyAccelerationStructureNV(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->dst, params->src, params->mode); return STATUS_SUCCESS; }
@@ -5876,12 +5876,12 @@ static NTSTATUS wine_vkCmdCopyAccelerationStructureToMemoryKHR(void *args) TRACE("%p, %p\n", params->commandBuffer, params->pInfo);
convert_VkCopyAccelerationStructureToMemoryInfoKHR_win_to_host(params->pInfo, &pInfo_host); - params->commandBuffer->device->funcs.p_vkCmdCopyAccelerationStructureToMemoryKHR(params->commandBuffer->command_buffer, &pInfo_host); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdCopyAccelerationStructureToMemoryKHR(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, &pInfo_host);
return STATUS_SUCCESS; #else TRACE("%p, %p\n", params->commandBuffer, params->pInfo); - params->commandBuffer->device->funcs.p_vkCmdCopyAccelerationStructureToMemoryKHR(params->commandBuffer->command_buffer, params->pInfo); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdCopyAccelerationStructureToMemoryKHR(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->pInfo); return STATUS_SUCCESS; #endif } @@ -5894,13 +5894,13 @@ static NTSTATUS wine_vkCmdCopyBuffer(void *args) TRACE("%p, 0x%s, 0x%s, %u, %p\n", params->commandBuffer, wine_dbgstr_longlong(params->srcBuffer), wine_dbgstr_longlong(params->dstBuffer), params->regionCount, params->pRegions);
pRegions_host = convert_VkBufferCopy_array_win_to_host(params->pRegions, params->regionCount); - params->commandBuffer->device->funcs.p_vkCmdCopyBuffer(params->commandBuffer->command_buffer, params->srcBuffer, params->dstBuffer, params->regionCount, pRegions_host); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdCopyBuffer(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->srcBuffer, params->dstBuffer, params->regionCount, pRegions_host);
free_VkBufferCopy_array(pRegions_host, params->regionCount); return STATUS_SUCCESS; #else TRACE("%p, 0x%s, 0x%s, %u, %p\n", params->commandBuffer, wine_dbgstr_longlong(params->srcBuffer), wine_dbgstr_longlong(params->dstBuffer), params->regionCount, params->pRegions); - params->commandBuffer->device->funcs.p_vkCmdCopyBuffer(params->commandBuffer->command_buffer, params->srcBuffer, params->dstBuffer, params->regionCount, params->pRegions); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdCopyBuffer(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->srcBuffer, params->dstBuffer, params->regionCount, params->pRegions); return STATUS_SUCCESS; #endif } @@ -5913,13 +5913,13 @@ static NTSTATUS wine_vkCmdCopyBuffer2(void *args) TRACE("%p, %p\n", params->commandBuffer, params->pCopyBufferInfo);
convert_VkCopyBufferInfo2_win_to_host(params->pCopyBufferInfo, &pCopyBufferInfo_host); - params->commandBuffer->device->funcs.p_vkCmdCopyBuffer2(params->commandBuffer->command_buffer, &pCopyBufferInfo_host); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdCopyBuffer2(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, &pCopyBufferInfo_host);
free_VkCopyBufferInfo2(&pCopyBufferInfo_host); return STATUS_SUCCESS; #else TRACE("%p, %p\n", params->commandBuffer, params->pCopyBufferInfo); - params->commandBuffer->device->funcs.p_vkCmdCopyBuffer2(params->commandBuffer->command_buffer, params->pCopyBufferInfo); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdCopyBuffer2(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->pCopyBufferInfo); return STATUS_SUCCESS; #endif } @@ -5932,13 +5932,13 @@ static NTSTATUS wine_vkCmdCopyBuffer2KHR(void *args) TRACE("%p, %p\n", params->commandBuffer, params->pCopyBufferInfo);
convert_VkCopyBufferInfo2_win_to_host(params->pCopyBufferInfo, &pCopyBufferInfo_host); - params->commandBuffer->device->funcs.p_vkCmdCopyBuffer2KHR(params->commandBuffer->command_buffer, &pCopyBufferInfo_host); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdCopyBuffer2KHR(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, &pCopyBufferInfo_host);
free_VkCopyBufferInfo2(&pCopyBufferInfo_host); return STATUS_SUCCESS; #else TRACE("%p, %p\n", params->commandBuffer, params->pCopyBufferInfo); - params->commandBuffer->device->funcs.p_vkCmdCopyBuffer2KHR(params->commandBuffer->command_buffer, params->pCopyBufferInfo); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdCopyBuffer2KHR(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->pCopyBufferInfo); return STATUS_SUCCESS; #endif } @@ -5951,13 +5951,13 @@ static NTSTATUS wine_vkCmdCopyBufferToImage(void *args) TRACE("%p, 0x%s, 0x%s, %#x, %u, %p\n", params->commandBuffer, wine_dbgstr_longlong(params->srcBuffer), wine_dbgstr_longlong(params->dstImage), params->dstImageLayout, params->regionCount, params->pRegions);
pRegions_host = convert_VkBufferImageCopy_array_win_to_host(params->pRegions, params->regionCount); - params->commandBuffer->device->funcs.p_vkCmdCopyBufferToImage(params->commandBuffer->command_buffer, params->srcBuffer, params->dstImage, params->dstImageLayout, params->regionCount, pRegions_host); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdCopyBufferToImage(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->srcBuffer, params->dstImage, params->dstImageLayout, params->regionCount, pRegions_host);
free_VkBufferImageCopy_array(pRegions_host, params->regionCount); return STATUS_SUCCESS; #else TRACE("%p, 0x%s, 0x%s, %#x, %u, %p\n", params->commandBuffer, wine_dbgstr_longlong(params->srcBuffer), wine_dbgstr_longlong(params->dstImage), params->dstImageLayout, params->regionCount, params->pRegions); - params->commandBuffer->device->funcs.p_vkCmdCopyBufferToImage(params->commandBuffer->command_buffer, params->srcBuffer, params->dstImage, params->dstImageLayout, params->regionCount, params->pRegions); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdCopyBufferToImage(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->srcBuffer, params->dstImage, params->dstImageLayout, params->regionCount, params->pRegions); return STATUS_SUCCESS; #endif } @@ -5970,13 +5970,13 @@ static NTSTATUS wine_vkCmdCopyBufferToImage2(void *args) TRACE("%p, %p\n", params->commandBuffer, params->pCopyBufferToImageInfo);
convert_VkCopyBufferToImageInfo2_win_to_host(params->pCopyBufferToImageInfo, &pCopyBufferToImageInfo_host); - params->commandBuffer->device->funcs.p_vkCmdCopyBufferToImage2(params->commandBuffer->command_buffer, &pCopyBufferToImageInfo_host); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdCopyBufferToImage2(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, &pCopyBufferToImageInfo_host);
free_VkCopyBufferToImageInfo2(&pCopyBufferToImageInfo_host); return STATUS_SUCCESS; #else TRACE("%p, %p\n", params->commandBuffer, params->pCopyBufferToImageInfo); - params->commandBuffer->device->funcs.p_vkCmdCopyBufferToImage2(params->commandBuffer->command_buffer, params->pCopyBufferToImageInfo); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdCopyBufferToImage2(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->pCopyBufferToImageInfo); return STATUS_SUCCESS; #endif } @@ -5989,13 +5989,13 @@ static NTSTATUS wine_vkCmdCopyBufferToImage2KHR(void *args) TRACE("%p, %p\n", params->commandBuffer, params->pCopyBufferToImageInfo);
convert_VkCopyBufferToImageInfo2_win_to_host(params->pCopyBufferToImageInfo, &pCopyBufferToImageInfo_host); - params->commandBuffer->device->funcs.p_vkCmdCopyBufferToImage2KHR(params->commandBuffer->command_buffer, &pCopyBufferToImageInfo_host); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdCopyBufferToImage2KHR(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, &pCopyBufferToImageInfo_host);
free_VkCopyBufferToImageInfo2(&pCopyBufferToImageInfo_host); return STATUS_SUCCESS; #else TRACE("%p, %p\n", params->commandBuffer, params->pCopyBufferToImageInfo); - params->commandBuffer->device->funcs.p_vkCmdCopyBufferToImage2KHR(params->commandBuffer->command_buffer, params->pCopyBufferToImageInfo); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdCopyBufferToImage2KHR(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->pCopyBufferToImageInfo); return STATUS_SUCCESS; #endif } @@ -6004,7 +6004,7 @@ static NTSTATUS wine_vkCmdCopyImage(void *args) { struct vkCmdCopyImage_params *params = args; TRACE("%p, 0x%s, %#x, 0x%s, %#x, %u, %p\n", params->commandBuffer, wine_dbgstr_longlong(params->srcImage), params->srcImageLayout, wine_dbgstr_longlong(params->dstImage), params->dstImageLayout, params->regionCount, params->pRegions); - params->commandBuffer->device->funcs.p_vkCmdCopyImage(params->commandBuffer->command_buffer, params->srcImage, params->srcImageLayout, params->dstImage, params->dstImageLayout, params->regionCount, params->pRegions); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdCopyImage(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->srcImage, params->srcImageLayout, params->dstImage, params->dstImageLayout, params->regionCount, params->pRegions); return STATUS_SUCCESS; }
@@ -6016,12 +6016,12 @@ static NTSTATUS wine_vkCmdCopyImage2(void *args) TRACE("%p, %p\n", params->commandBuffer, params->pCopyImageInfo);
convert_VkCopyImageInfo2_win_to_host(params->pCopyImageInfo, &pCopyImageInfo_host); - params->commandBuffer->device->funcs.p_vkCmdCopyImage2(params->commandBuffer->command_buffer, &pCopyImageInfo_host); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdCopyImage2(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, &pCopyImageInfo_host);
return STATUS_SUCCESS; #else TRACE("%p, %p\n", params->commandBuffer, params->pCopyImageInfo); - params->commandBuffer->device->funcs.p_vkCmdCopyImage2(params->commandBuffer->command_buffer, params->pCopyImageInfo); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdCopyImage2(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->pCopyImageInfo); return STATUS_SUCCESS; #endif } @@ -6034,12 +6034,12 @@ static NTSTATUS wine_vkCmdCopyImage2KHR(void *args) TRACE("%p, %p\n", params->commandBuffer, params->pCopyImageInfo);
convert_VkCopyImageInfo2_win_to_host(params->pCopyImageInfo, &pCopyImageInfo_host); - params->commandBuffer->device->funcs.p_vkCmdCopyImage2KHR(params->commandBuffer->command_buffer, &pCopyImageInfo_host); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdCopyImage2KHR(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, &pCopyImageInfo_host);
return STATUS_SUCCESS; #else TRACE("%p, %p\n", params->commandBuffer, params->pCopyImageInfo); - params->commandBuffer->device->funcs.p_vkCmdCopyImage2KHR(params->commandBuffer->command_buffer, params->pCopyImageInfo); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdCopyImage2KHR(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->pCopyImageInfo); return STATUS_SUCCESS; #endif } @@ -6052,13 +6052,13 @@ static NTSTATUS wine_vkCmdCopyImageToBuffer(void *args) TRACE("%p, 0x%s, %#x, 0x%s, %u, %p\n", params->commandBuffer, wine_dbgstr_longlong(params->srcImage), params->srcImageLayout, wine_dbgstr_longlong(params->dstBuffer), params->regionCount, params->pRegions);
pRegions_host = convert_VkBufferImageCopy_array_win_to_host(params->pRegions, params->regionCount); - params->commandBuffer->device->funcs.p_vkCmdCopyImageToBuffer(params->commandBuffer->command_buffer, params->srcImage, params->srcImageLayout, params->dstBuffer, params->regionCount, pRegions_host); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdCopyImageToBuffer(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->srcImage, params->srcImageLayout, params->dstBuffer, params->regionCount, pRegions_host);
free_VkBufferImageCopy_array(pRegions_host, params->regionCount); return STATUS_SUCCESS; #else TRACE("%p, 0x%s, %#x, 0x%s, %u, %p\n", params->commandBuffer, wine_dbgstr_longlong(params->srcImage), params->srcImageLayout, wine_dbgstr_longlong(params->dstBuffer), params->regionCount, params->pRegions); - params->commandBuffer->device->funcs.p_vkCmdCopyImageToBuffer(params->commandBuffer->command_buffer, params->srcImage, params->srcImageLayout, params->dstBuffer, params->regionCount, params->pRegions); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdCopyImageToBuffer(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->srcImage, params->srcImageLayout, params->dstBuffer, params->regionCount, params->pRegions); return STATUS_SUCCESS; #endif } @@ -6071,13 +6071,13 @@ static NTSTATUS wine_vkCmdCopyImageToBuffer2(void *args) TRACE("%p, %p\n", params->commandBuffer, params->pCopyImageToBufferInfo);
convert_VkCopyImageToBufferInfo2_win_to_host(params->pCopyImageToBufferInfo, &pCopyImageToBufferInfo_host); - params->commandBuffer->device->funcs.p_vkCmdCopyImageToBuffer2(params->commandBuffer->command_buffer, &pCopyImageToBufferInfo_host); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdCopyImageToBuffer2(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, &pCopyImageToBufferInfo_host);
free_VkCopyImageToBufferInfo2(&pCopyImageToBufferInfo_host); return STATUS_SUCCESS; #else TRACE("%p, %p\n", params->commandBuffer, params->pCopyImageToBufferInfo); - params->commandBuffer->device->funcs.p_vkCmdCopyImageToBuffer2(params->commandBuffer->command_buffer, params->pCopyImageToBufferInfo); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdCopyImageToBuffer2(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->pCopyImageToBufferInfo); return STATUS_SUCCESS; #endif } @@ -6090,13 +6090,13 @@ static NTSTATUS wine_vkCmdCopyImageToBuffer2KHR(void *args) TRACE("%p, %p\n", params->commandBuffer, params->pCopyImageToBufferInfo);
convert_VkCopyImageToBufferInfo2_win_to_host(params->pCopyImageToBufferInfo, &pCopyImageToBufferInfo_host); - params->commandBuffer->device->funcs.p_vkCmdCopyImageToBuffer2KHR(params->commandBuffer->command_buffer, &pCopyImageToBufferInfo_host); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdCopyImageToBuffer2KHR(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, &pCopyImageToBufferInfo_host);
free_VkCopyImageToBufferInfo2(&pCopyImageToBufferInfo_host); return STATUS_SUCCESS; #else TRACE("%p, %p\n", params->commandBuffer, params->pCopyImageToBufferInfo); - params->commandBuffer->device->funcs.p_vkCmdCopyImageToBuffer2KHR(params->commandBuffer->command_buffer, params->pCopyImageToBufferInfo); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdCopyImageToBuffer2KHR(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->pCopyImageToBufferInfo); return STATUS_SUCCESS; #endif } @@ -6109,12 +6109,12 @@ static NTSTATUS wine_vkCmdCopyMemoryToAccelerationStructureKHR(void *args) TRACE("%p, %p\n", params->commandBuffer, params->pInfo);
convert_VkCopyMemoryToAccelerationStructureInfoKHR_win_to_host(params->pInfo, &pInfo_host); - params->commandBuffer->device->funcs.p_vkCmdCopyMemoryToAccelerationStructureKHR(params->commandBuffer->command_buffer, &pInfo_host); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdCopyMemoryToAccelerationStructureKHR(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, &pInfo_host);
return STATUS_SUCCESS; #else TRACE("%p, %p\n", params->commandBuffer, params->pInfo); - params->commandBuffer->device->funcs.p_vkCmdCopyMemoryToAccelerationStructureKHR(params->commandBuffer->command_buffer, params->pInfo); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdCopyMemoryToAccelerationStructureKHR(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->pInfo); return STATUS_SUCCESS; #endif } @@ -6123,7 +6123,7 @@ static NTSTATUS wine_vkCmdCopyQueryPoolResults(void *args) { struct vkCmdCopyQueryPoolResults_params *params = args; TRACE("%p, 0x%s, %u, %u, 0x%s, 0x%s, 0x%s, %#x\n", params->commandBuffer, wine_dbgstr_longlong(params->queryPool), params->firstQuery, params->queryCount, wine_dbgstr_longlong(params->dstBuffer), wine_dbgstr_longlong(params->dstOffset), wine_dbgstr_longlong(params->stride), params->flags); - params->commandBuffer->device->funcs.p_vkCmdCopyQueryPoolResults(params->commandBuffer->command_buffer, params->queryPool, params->firstQuery, params->queryCount, params->dstBuffer, params->dstOffset, params->stride, params->flags); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdCopyQueryPoolResults(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->queryPool, params->firstQuery, params->queryCount, params->dstBuffer, params->dstOffset, params->stride, params->flags); return STATUS_SUCCESS; }
@@ -6135,12 +6135,12 @@ static NTSTATUS wine_vkCmdCuLaunchKernelNVX(void *args) TRACE("%p, %p\n", params->commandBuffer, params->pLaunchInfo);
convert_VkCuLaunchInfoNVX_win_to_host(params->pLaunchInfo, &pLaunchInfo_host); - params->commandBuffer->device->funcs.p_vkCmdCuLaunchKernelNVX(params->commandBuffer->command_buffer, &pLaunchInfo_host); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdCuLaunchKernelNVX(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, &pLaunchInfo_host);
return STATUS_SUCCESS; #else TRACE("%p, %p\n", params->commandBuffer, params->pLaunchInfo); - params->commandBuffer->device->funcs.p_vkCmdCuLaunchKernelNVX(params->commandBuffer->command_buffer, params->pLaunchInfo); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdCuLaunchKernelNVX(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->pLaunchInfo); return STATUS_SUCCESS; #endif } @@ -6149,7 +6149,7 @@ static NTSTATUS wine_vkCmdDebugMarkerBeginEXT(void *args) { struct vkCmdDebugMarkerBeginEXT_params *params = args; TRACE("%p, %p\n", params->commandBuffer, params->pMarkerInfo); - params->commandBuffer->device->funcs.p_vkCmdDebugMarkerBeginEXT(params->commandBuffer->command_buffer, params->pMarkerInfo); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdDebugMarkerBeginEXT(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->pMarkerInfo); return STATUS_SUCCESS; }
@@ -6157,7 +6157,7 @@ static NTSTATUS wine_vkCmdDebugMarkerEndEXT(void *args) { struct vkCmdDebugMarkerEndEXT_params *params = args; TRACE("%p\n", params->commandBuffer); - params->commandBuffer->device->funcs.p_vkCmdDebugMarkerEndEXT(params->commandBuffer->command_buffer); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdDebugMarkerEndEXT(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer); return STATUS_SUCCESS; }
@@ -6165,7 +6165,7 @@ static NTSTATUS wine_vkCmdDebugMarkerInsertEXT(void *args) { struct vkCmdDebugMarkerInsertEXT_params *params = args; TRACE("%p, %p\n", params->commandBuffer, params->pMarkerInfo); - params->commandBuffer->device->funcs.p_vkCmdDebugMarkerInsertEXT(params->commandBuffer->command_buffer, params->pMarkerInfo); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdDebugMarkerInsertEXT(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->pMarkerInfo); return STATUS_SUCCESS; }
@@ -6173,7 +6173,7 @@ static NTSTATUS wine_vkCmdDispatch(void *args) { struct vkCmdDispatch_params *params = args; TRACE("%p, %u, %u, %u\n", params->commandBuffer, params->groupCountX, params->groupCountY, params->groupCountZ); - params->commandBuffer->device->funcs.p_vkCmdDispatch(params->commandBuffer->command_buffer, params->groupCountX, params->groupCountY, params->groupCountZ); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdDispatch(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->groupCountX, params->groupCountY, params->groupCountZ); return STATUS_SUCCESS; }
@@ -6181,7 +6181,7 @@ static NTSTATUS wine_vkCmdDispatchBase(void *args) { struct vkCmdDispatchBase_params *params = args; TRACE("%p, %u, %u, %u, %u, %u, %u\n", params->commandBuffer, params->baseGroupX, params->baseGroupY, params->baseGroupZ, params->groupCountX, params->groupCountY, params->groupCountZ); - params->commandBuffer->device->funcs.p_vkCmdDispatchBase(params->commandBuffer->command_buffer, params->baseGroupX, params->baseGroupY, params->baseGroupZ, params->groupCountX, params->groupCountY, params->groupCountZ); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdDispatchBase(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->baseGroupX, params->baseGroupY, params->baseGroupZ, params->groupCountX, params->groupCountY, params->groupCountZ); return STATUS_SUCCESS; }
@@ -6189,7 +6189,7 @@ static NTSTATUS wine_vkCmdDispatchBaseKHR(void *args) { struct vkCmdDispatchBaseKHR_params *params = args; TRACE("%p, %u, %u, %u, %u, %u, %u\n", params->commandBuffer, params->baseGroupX, params->baseGroupY, params->baseGroupZ, params->groupCountX, params->groupCountY, params->groupCountZ); - params->commandBuffer->device->funcs.p_vkCmdDispatchBaseKHR(params->commandBuffer->command_buffer, params->baseGroupX, params->baseGroupY, params->baseGroupZ, params->groupCountX, params->groupCountY, params->groupCountZ); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdDispatchBaseKHR(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->baseGroupX, params->baseGroupY, params->baseGroupZ, params->groupCountX, params->groupCountY, params->groupCountZ); return STATUS_SUCCESS; }
@@ -6197,7 +6197,7 @@ static NTSTATUS wine_vkCmdDispatchIndirect(void *args) { struct vkCmdDispatchIndirect_params *params = args; TRACE("%p, 0x%s, 0x%s\n", params->commandBuffer, wine_dbgstr_longlong(params->buffer), wine_dbgstr_longlong(params->offset)); - params->commandBuffer->device->funcs.p_vkCmdDispatchIndirect(params->commandBuffer->command_buffer, params->buffer, params->offset); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdDispatchIndirect(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->buffer, params->offset); return STATUS_SUCCESS; }
@@ -6205,7 +6205,7 @@ static NTSTATUS wine_vkCmdDraw(void *args) { struct vkCmdDraw_params *params = args; TRACE("%p, %u, %u, %u, %u\n", params->commandBuffer, params->vertexCount, params->instanceCount, params->firstVertex, params->firstInstance); - params->commandBuffer->device->funcs.p_vkCmdDraw(params->commandBuffer->command_buffer, params->vertexCount, params->instanceCount, params->firstVertex, params->firstInstance); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdDraw(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->vertexCount, params->instanceCount, params->firstVertex, params->firstInstance); return STATUS_SUCCESS; }
@@ -6213,7 +6213,7 @@ static NTSTATUS wine_vkCmdDrawIndexed(void *args) { struct vkCmdDrawIndexed_params *params = args; TRACE("%p, %u, %u, %u, %d, %u\n", params->commandBuffer, params->indexCount, params->instanceCount, params->firstIndex, params->vertexOffset, params->firstInstance); - params->commandBuffer->device->funcs.p_vkCmdDrawIndexed(params->commandBuffer->command_buffer, params->indexCount, params->instanceCount, params->firstIndex, params->vertexOffset, params->firstInstance); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdDrawIndexed(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->indexCount, params->instanceCount, params->firstIndex, params->vertexOffset, params->firstInstance); return STATUS_SUCCESS; }
@@ -6221,7 +6221,7 @@ static NTSTATUS wine_vkCmdDrawIndexedIndirect(void *args) { struct vkCmdDrawIndexedIndirect_params *params = args; TRACE("%p, 0x%s, 0x%s, %u, %u\n", params->commandBuffer, wine_dbgstr_longlong(params->buffer), wine_dbgstr_longlong(params->offset), params->drawCount, params->stride); - params->commandBuffer->device->funcs.p_vkCmdDrawIndexedIndirect(params->commandBuffer->command_buffer, params->buffer, params->offset, params->drawCount, params->stride); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdDrawIndexedIndirect(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->buffer, params->offset, params->drawCount, params->stride); return STATUS_SUCCESS; }
@@ -6229,7 +6229,7 @@ static NTSTATUS wine_vkCmdDrawIndexedIndirectCount(void *args) { struct vkCmdDrawIndexedIndirectCount_params *params = args; TRACE("%p, 0x%s, 0x%s, 0x%s, 0x%s, %u, %u\n", params->commandBuffer, wine_dbgstr_longlong(params->buffer), wine_dbgstr_longlong(params->offset), wine_dbgstr_longlong(params->countBuffer), wine_dbgstr_longlong(params->countBufferOffset), params->maxDrawCount, params->stride); - params->commandBuffer->device->funcs.p_vkCmdDrawIndexedIndirectCount(params->commandBuffer->command_buffer, params->buffer, params->offset, params->countBuffer, params->countBufferOffset, params->maxDrawCount, params->stride); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdDrawIndexedIndirectCount(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->buffer, params->offset, params->countBuffer, params->countBufferOffset, params->maxDrawCount, params->stride); return STATUS_SUCCESS; }
@@ -6237,7 +6237,7 @@ static NTSTATUS wine_vkCmdDrawIndexedIndirectCountAMD(void *args) { struct vkCmdDrawIndexedIndirectCountAMD_params *params = args; TRACE("%p, 0x%s, 0x%s, 0x%s, 0x%s, %u, %u\n", params->commandBuffer, wine_dbgstr_longlong(params->buffer), wine_dbgstr_longlong(params->offset), wine_dbgstr_longlong(params->countBuffer), wine_dbgstr_longlong(params->countBufferOffset), params->maxDrawCount, params->stride); - params->commandBuffer->device->funcs.p_vkCmdDrawIndexedIndirectCountAMD(params->commandBuffer->command_buffer, params->buffer, params->offset, params->countBuffer, params->countBufferOffset, params->maxDrawCount, params->stride); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdDrawIndexedIndirectCountAMD(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->buffer, params->offset, params->countBuffer, params->countBufferOffset, params->maxDrawCount, params->stride); return STATUS_SUCCESS; }
@@ -6245,7 +6245,7 @@ static NTSTATUS wine_vkCmdDrawIndexedIndirectCountKHR(void *args) { struct vkCmdDrawIndexedIndirectCountKHR_params *params = args; TRACE("%p, 0x%s, 0x%s, 0x%s, 0x%s, %u, %u\n", params->commandBuffer, wine_dbgstr_longlong(params->buffer), wine_dbgstr_longlong(params->offset), wine_dbgstr_longlong(params->countBuffer), wine_dbgstr_longlong(params->countBufferOffset), params->maxDrawCount, params->stride); - params->commandBuffer->device->funcs.p_vkCmdDrawIndexedIndirectCountKHR(params->commandBuffer->command_buffer, params->buffer, params->offset, params->countBuffer, params->countBufferOffset, params->maxDrawCount, params->stride); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdDrawIndexedIndirectCountKHR(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->buffer, params->offset, params->countBuffer, params->countBufferOffset, params->maxDrawCount, params->stride); return STATUS_SUCCESS; }
@@ -6253,7 +6253,7 @@ static NTSTATUS wine_vkCmdDrawIndirect(void *args) { struct vkCmdDrawIndirect_params *params = args; TRACE("%p, 0x%s, 0x%s, %u, %u\n", params->commandBuffer, wine_dbgstr_longlong(params->buffer), wine_dbgstr_longlong(params->offset), params->drawCount, params->stride); - params->commandBuffer->device->funcs.p_vkCmdDrawIndirect(params->commandBuffer->command_buffer, params->buffer, params->offset, params->drawCount, params->stride); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdDrawIndirect(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->buffer, params->offset, params->drawCount, params->stride); return STATUS_SUCCESS; }
@@ -6261,7 +6261,7 @@ static NTSTATUS wine_vkCmdDrawIndirectByteCountEXT(void *args) { struct vkCmdDrawIndirectByteCountEXT_params *params = args; TRACE("%p, %u, %u, 0x%s, 0x%s, %u, %u\n", params->commandBuffer, params->instanceCount, params->firstInstance, wine_dbgstr_longlong(params->counterBuffer), wine_dbgstr_longlong(params->counterBufferOffset), params->counterOffset, params->vertexStride); - params->commandBuffer->device->funcs.p_vkCmdDrawIndirectByteCountEXT(params->commandBuffer->command_buffer, params->instanceCount, params->firstInstance, params->counterBuffer, params->counterBufferOffset, params->counterOffset, params->vertexStride); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdDrawIndirectByteCountEXT(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->instanceCount, params->firstInstance, params->counterBuffer, params->counterBufferOffset, params->counterOffset, params->vertexStride); return STATUS_SUCCESS; }
@@ -6269,7 +6269,7 @@ static NTSTATUS wine_vkCmdDrawIndirectCount(void *args) { struct vkCmdDrawIndirectCount_params *params = args; TRACE("%p, 0x%s, 0x%s, 0x%s, 0x%s, %u, %u\n", params->commandBuffer, wine_dbgstr_longlong(params->buffer), wine_dbgstr_longlong(params->offset), wine_dbgstr_longlong(params->countBuffer), wine_dbgstr_longlong(params->countBufferOffset), params->maxDrawCount, params->stride); - params->commandBuffer->device->funcs.p_vkCmdDrawIndirectCount(params->commandBuffer->command_buffer, params->buffer, params->offset, params->countBuffer, params->countBufferOffset, params->maxDrawCount, params->stride); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdDrawIndirectCount(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->buffer, params->offset, params->countBuffer, params->countBufferOffset, params->maxDrawCount, params->stride); return STATUS_SUCCESS; }
@@ -6277,7 +6277,7 @@ static NTSTATUS wine_vkCmdDrawIndirectCountAMD(void *args) { struct vkCmdDrawIndirectCountAMD_params *params = args; TRACE("%p, 0x%s, 0x%s, 0x%s, 0x%s, %u, %u\n", params->commandBuffer, wine_dbgstr_longlong(params->buffer), wine_dbgstr_longlong(params->offset), wine_dbgstr_longlong(params->countBuffer), wine_dbgstr_longlong(params->countBufferOffset), params->maxDrawCount, params->stride); - params->commandBuffer->device->funcs.p_vkCmdDrawIndirectCountAMD(params->commandBuffer->command_buffer, params->buffer, params->offset, params->countBuffer, params->countBufferOffset, params->maxDrawCount, params->stride); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdDrawIndirectCountAMD(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->buffer, params->offset, params->countBuffer, params->countBufferOffset, params->maxDrawCount, params->stride); return STATUS_SUCCESS; }
@@ -6285,7 +6285,7 @@ static NTSTATUS wine_vkCmdDrawIndirectCountKHR(void *args) { struct vkCmdDrawIndirectCountKHR_params *params = args; TRACE("%p, 0x%s, 0x%s, 0x%s, 0x%s, %u, %u\n", params->commandBuffer, wine_dbgstr_longlong(params->buffer), wine_dbgstr_longlong(params->offset), wine_dbgstr_longlong(params->countBuffer), wine_dbgstr_longlong(params->countBufferOffset), params->maxDrawCount, params->stride); - params->commandBuffer->device->funcs.p_vkCmdDrawIndirectCountKHR(params->commandBuffer->command_buffer, params->buffer, params->offset, params->countBuffer, params->countBufferOffset, params->maxDrawCount, params->stride); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdDrawIndirectCountKHR(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->buffer, params->offset, params->countBuffer, params->countBufferOffset, params->maxDrawCount, params->stride); return STATUS_SUCCESS; }
@@ -6293,7 +6293,7 @@ static NTSTATUS wine_vkCmdDrawMeshTasksEXT(void *args) { struct vkCmdDrawMeshTasksEXT_params *params = args; TRACE("%p, %u, %u, %u\n", params->commandBuffer, params->groupCountX, params->groupCountY, params->groupCountZ); - params->commandBuffer->device->funcs.p_vkCmdDrawMeshTasksEXT(params->commandBuffer->command_buffer, params->groupCountX, params->groupCountY, params->groupCountZ); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdDrawMeshTasksEXT(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->groupCountX, params->groupCountY, params->groupCountZ); return STATUS_SUCCESS; }
@@ -6301,7 +6301,7 @@ static NTSTATUS wine_vkCmdDrawMeshTasksIndirectCountEXT(void *args) { struct vkCmdDrawMeshTasksIndirectCountEXT_params *params = args; TRACE("%p, 0x%s, 0x%s, 0x%s, 0x%s, %u, %u\n", params->commandBuffer, wine_dbgstr_longlong(params->buffer), wine_dbgstr_longlong(params->offset), wine_dbgstr_longlong(params->countBuffer), wine_dbgstr_longlong(params->countBufferOffset), params->maxDrawCount, params->stride); - params->commandBuffer->device->funcs.p_vkCmdDrawMeshTasksIndirectCountEXT(params->commandBuffer->command_buffer, params->buffer, params->offset, params->countBuffer, params->countBufferOffset, params->maxDrawCount, params->stride); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdDrawMeshTasksIndirectCountEXT(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->buffer, params->offset, params->countBuffer, params->countBufferOffset, params->maxDrawCount, params->stride); return STATUS_SUCCESS; }
@@ -6309,7 +6309,7 @@ static NTSTATUS wine_vkCmdDrawMeshTasksIndirectCountNV(void *args) { struct vkCmdDrawMeshTasksIndirectCountNV_params *params = args; TRACE("%p, 0x%s, 0x%s, 0x%s, 0x%s, %u, %u\n", params->commandBuffer, wine_dbgstr_longlong(params->buffer), wine_dbgstr_longlong(params->offset), wine_dbgstr_longlong(params->countBuffer), wine_dbgstr_longlong(params->countBufferOffset), params->maxDrawCount, params->stride); - params->commandBuffer->device->funcs.p_vkCmdDrawMeshTasksIndirectCountNV(params->commandBuffer->command_buffer, params->buffer, params->offset, params->countBuffer, params->countBufferOffset, params->maxDrawCount, params->stride); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdDrawMeshTasksIndirectCountNV(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->buffer, params->offset, params->countBuffer, params->countBufferOffset, params->maxDrawCount, params->stride); return STATUS_SUCCESS; }
@@ -6317,7 +6317,7 @@ static NTSTATUS wine_vkCmdDrawMeshTasksIndirectEXT(void *args) { struct vkCmdDrawMeshTasksIndirectEXT_params *params = args; TRACE("%p, 0x%s, 0x%s, %u, %u\n", params->commandBuffer, wine_dbgstr_longlong(params->buffer), wine_dbgstr_longlong(params->offset), params->drawCount, params->stride); - params->commandBuffer->device->funcs.p_vkCmdDrawMeshTasksIndirectEXT(params->commandBuffer->command_buffer, params->buffer, params->offset, params->drawCount, params->stride); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdDrawMeshTasksIndirectEXT(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->buffer, params->offset, params->drawCount, params->stride); return STATUS_SUCCESS; }
@@ -6325,7 +6325,7 @@ static NTSTATUS wine_vkCmdDrawMeshTasksIndirectNV(void *args) { struct vkCmdDrawMeshTasksIndirectNV_params *params = args; TRACE("%p, 0x%s, 0x%s, %u, %u\n", params->commandBuffer, wine_dbgstr_longlong(params->buffer), wine_dbgstr_longlong(params->offset), params->drawCount, params->stride); - params->commandBuffer->device->funcs.p_vkCmdDrawMeshTasksIndirectNV(params->commandBuffer->command_buffer, params->buffer, params->offset, params->drawCount, params->stride); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdDrawMeshTasksIndirectNV(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->buffer, params->offset, params->drawCount, params->stride); return STATUS_SUCCESS; }
@@ -6333,7 +6333,7 @@ static NTSTATUS wine_vkCmdDrawMeshTasksNV(void *args) { struct vkCmdDrawMeshTasksNV_params *params = args; TRACE("%p, %u, %u\n", params->commandBuffer, params->taskCount, params->firstTask); - params->commandBuffer->device->funcs.p_vkCmdDrawMeshTasksNV(params->commandBuffer->command_buffer, params->taskCount, params->firstTask); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdDrawMeshTasksNV(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->taskCount, params->firstTask); return STATUS_SUCCESS; }
@@ -6341,7 +6341,7 @@ static NTSTATUS wine_vkCmdDrawMultiEXT(void *args) { struct vkCmdDrawMultiEXT_params *params = args; TRACE("%p, %u, %p, %u, %u, %u\n", params->commandBuffer, params->drawCount, params->pVertexInfo, params->instanceCount, params->firstInstance, params->stride); - params->commandBuffer->device->funcs.p_vkCmdDrawMultiEXT(params->commandBuffer->command_buffer, params->drawCount, params->pVertexInfo, params->instanceCount, params->firstInstance, params->stride); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdDrawMultiEXT(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->drawCount, params->pVertexInfo, params->instanceCount, params->firstInstance, params->stride); return STATUS_SUCCESS; }
@@ -6349,7 +6349,7 @@ static NTSTATUS wine_vkCmdDrawMultiIndexedEXT(void *args) { struct vkCmdDrawMultiIndexedEXT_params *params = args; TRACE("%p, %u, %p, %u, %u, %u, %p\n", params->commandBuffer, params->drawCount, params->pIndexInfo, params->instanceCount, params->firstInstance, params->stride, params->pVertexOffset); - params->commandBuffer->device->funcs.p_vkCmdDrawMultiIndexedEXT(params->commandBuffer->command_buffer, params->drawCount, params->pIndexInfo, params->instanceCount, params->firstInstance, params->stride, params->pVertexOffset); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdDrawMultiIndexedEXT(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->drawCount, params->pIndexInfo, params->instanceCount, params->firstInstance, params->stride, params->pVertexOffset); return STATUS_SUCCESS; }
@@ -6357,7 +6357,7 @@ static NTSTATUS wine_vkCmdEndConditionalRenderingEXT(void *args) { struct vkCmdEndConditionalRenderingEXT_params *params = args; TRACE("%p\n", params->commandBuffer); - params->commandBuffer->device->funcs.p_vkCmdEndConditionalRenderingEXT(params->commandBuffer->command_buffer); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdEndConditionalRenderingEXT(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer); return STATUS_SUCCESS; }
@@ -6365,7 +6365,7 @@ static NTSTATUS wine_vkCmdEndDebugUtilsLabelEXT(void *args) { struct vkCmdEndDebugUtilsLabelEXT_params *params = args; TRACE("%p\n", params->commandBuffer); - params->commandBuffer->device->funcs.p_vkCmdEndDebugUtilsLabelEXT(params->commandBuffer->command_buffer); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdEndDebugUtilsLabelEXT(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer); return STATUS_SUCCESS; }
@@ -6373,7 +6373,7 @@ static NTSTATUS wine_vkCmdEndQuery(void *args) { struct vkCmdEndQuery_params *params = args; TRACE("%p, 0x%s, %u\n", params->commandBuffer, wine_dbgstr_longlong(params->queryPool), params->query); - params->commandBuffer->device->funcs.p_vkCmdEndQuery(params->commandBuffer->command_buffer, params->queryPool, params->query); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdEndQuery(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->queryPool, params->query); return STATUS_SUCCESS; }
@@ -6381,7 +6381,7 @@ static NTSTATUS wine_vkCmdEndQueryIndexedEXT(void *args) { struct vkCmdEndQueryIndexedEXT_params *params = args; TRACE("%p, 0x%s, %u, %u\n", params->commandBuffer, wine_dbgstr_longlong(params->queryPool), params->query, params->index); - params->commandBuffer->device->funcs.p_vkCmdEndQueryIndexedEXT(params->commandBuffer->command_buffer, params->queryPool, params->query, params->index); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdEndQueryIndexedEXT(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->queryPool, params->query, params->index); return STATUS_SUCCESS; }
@@ -6389,7 +6389,7 @@ static NTSTATUS wine_vkCmdEndRenderPass(void *args) { struct vkCmdEndRenderPass_params *params = args; TRACE("%p\n", params->commandBuffer); - params->commandBuffer->device->funcs.p_vkCmdEndRenderPass(params->commandBuffer->command_buffer); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdEndRenderPass(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer); return STATUS_SUCCESS; }
@@ -6397,7 +6397,7 @@ static NTSTATUS wine_vkCmdEndRenderPass2(void *args) { struct vkCmdEndRenderPass2_params *params = args; TRACE("%p, %p\n", params->commandBuffer, params->pSubpassEndInfo); - params->commandBuffer->device->funcs.p_vkCmdEndRenderPass2(params->commandBuffer->command_buffer, params->pSubpassEndInfo); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdEndRenderPass2(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->pSubpassEndInfo); return STATUS_SUCCESS; }
@@ -6405,7 +6405,7 @@ static NTSTATUS wine_vkCmdEndRenderPass2KHR(void *args) { struct vkCmdEndRenderPass2KHR_params *params = args; TRACE("%p, %p\n", params->commandBuffer, params->pSubpassEndInfo); - params->commandBuffer->device->funcs.p_vkCmdEndRenderPass2KHR(params->commandBuffer->command_buffer, params->pSubpassEndInfo); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdEndRenderPass2KHR(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->pSubpassEndInfo); return STATUS_SUCCESS; }
@@ -6413,7 +6413,7 @@ static NTSTATUS wine_vkCmdEndRendering(void *args) { struct vkCmdEndRendering_params *params = args; TRACE("%p\n", params->commandBuffer); - params->commandBuffer->device->funcs.p_vkCmdEndRendering(params->commandBuffer->command_buffer); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdEndRendering(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer); return STATUS_SUCCESS; }
@@ -6421,7 +6421,7 @@ static NTSTATUS wine_vkCmdEndRenderingKHR(void *args) { struct vkCmdEndRenderingKHR_params *params = args; TRACE("%p\n", params->commandBuffer); - params->commandBuffer->device->funcs.p_vkCmdEndRenderingKHR(params->commandBuffer->command_buffer); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdEndRenderingKHR(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer); return STATUS_SUCCESS; }
@@ -6429,7 +6429,7 @@ static NTSTATUS wine_vkCmdEndTransformFeedbackEXT(void *args) { struct vkCmdEndTransformFeedbackEXT_params *params = args; TRACE("%p, %u, %u, %p, %p\n", params->commandBuffer, params->firstCounterBuffer, params->counterBufferCount, params->pCounterBuffers, params->pCounterBufferOffsets); - params->commandBuffer->device->funcs.p_vkCmdEndTransformFeedbackEXT(params->commandBuffer->command_buffer, params->firstCounterBuffer, params->counterBufferCount, params->pCounterBuffers, params->pCounterBufferOffsets); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdEndTransformFeedbackEXT(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->firstCounterBuffer, params->counterBufferCount, params->pCounterBuffers, params->pCounterBufferOffsets); return STATUS_SUCCESS; }
@@ -6440,7 +6440,7 @@ static NTSTATUS wine_vkCmdExecuteCommands(void *args) TRACE("%p, %u, %p\n", params->commandBuffer, params->commandBufferCount, params->pCommandBuffers);
pCommandBuffers_host = convert_VkCommandBuffer_array_win_to_host(params->pCommandBuffers, params->commandBufferCount); - params->commandBuffer->device->funcs.p_vkCmdExecuteCommands(params->commandBuffer->command_buffer, params->commandBufferCount, pCommandBuffers_host); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdExecuteCommands(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->commandBufferCount, pCommandBuffers_host);
free_VkCommandBuffer_array(pCommandBuffers_host, params->commandBufferCount); return STATUS_SUCCESS; @@ -6454,13 +6454,13 @@ static NTSTATUS wine_vkCmdExecuteGeneratedCommandsNV(void *args) TRACE("%p, %u, %p\n", params->commandBuffer, params->isPreprocessed, params->pGeneratedCommandsInfo);
convert_VkGeneratedCommandsInfoNV_win_to_host(params->pGeneratedCommandsInfo, &pGeneratedCommandsInfo_host); - params->commandBuffer->device->funcs.p_vkCmdExecuteGeneratedCommandsNV(params->commandBuffer->command_buffer, params->isPreprocessed, &pGeneratedCommandsInfo_host); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdExecuteGeneratedCommandsNV(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->isPreprocessed, &pGeneratedCommandsInfo_host);
free_VkGeneratedCommandsInfoNV(&pGeneratedCommandsInfo_host); return STATUS_SUCCESS; #else TRACE("%p, %u, %p\n", params->commandBuffer, params->isPreprocessed, params->pGeneratedCommandsInfo); - params->commandBuffer->device->funcs.p_vkCmdExecuteGeneratedCommandsNV(params->commandBuffer->command_buffer, params->isPreprocessed, params->pGeneratedCommandsInfo); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdExecuteGeneratedCommandsNV(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->isPreprocessed, params->pGeneratedCommandsInfo); return STATUS_SUCCESS; #endif } @@ -6469,7 +6469,7 @@ static NTSTATUS wine_vkCmdFillBuffer(void *args) { struct vkCmdFillBuffer_params *params = args; TRACE("%p, 0x%s, 0x%s, 0x%s, %u\n", params->commandBuffer, wine_dbgstr_longlong(params->dstBuffer), wine_dbgstr_longlong(params->dstOffset), wine_dbgstr_longlong(params->size), params->data); - params->commandBuffer->device->funcs.p_vkCmdFillBuffer(params->commandBuffer->command_buffer, params->dstBuffer, params->dstOffset, params->size, params->data); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdFillBuffer(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->dstBuffer, params->dstOffset, params->size, params->data); return STATUS_SUCCESS; }
@@ -6477,7 +6477,7 @@ static NTSTATUS wine_vkCmdInsertDebugUtilsLabelEXT(void *args) { struct vkCmdInsertDebugUtilsLabelEXT_params *params = args; TRACE("%p, %p\n", params->commandBuffer, params->pLabelInfo); - params->commandBuffer->device->funcs.p_vkCmdInsertDebugUtilsLabelEXT(params->commandBuffer->command_buffer, params->pLabelInfo); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdInsertDebugUtilsLabelEXT(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->pLabelInfo); return STATUS_SUCCESS; }
@@ -6485,7 +6485,7 @@ static NTSTATUS wine_vkCmdNextSubpass(void *args) { struct vkCmdNextSubpass_params *params = args; TRACE("%p, %#x\n", params->commandBuffer, params->contents); - params->commandBuffer->device->funcs.p_vkCmdNextSubpass(params->commandBuffer->command_buffer, params->contents); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdNextSubpass(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->contents); return STATUS_SUCCESS; }
@@ -6493,7 +6493,7 @@ static NTSTATUS wine_vkCmdNextSubpass2(void *args) { struct vkCmdNextSubpass2_params *params = args; TRACE("%p, %p, %p\n", params->commandBuffer, params->pSubpassBeginInfo, params->pSubpassEndInfo); - params->commandBuffer->device->funcs.p_vkCmdNextSubpass2(params->commandBuffer->command_buffer, params->pSubpassBeginInfo, params->pSubpassEndInfo); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdNextSubpass2(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->pSubpassBeginInfo, params->pSubpassEndInfo); return STATUS_SUCCESS; }
@@ -6501,7 +6501,7 @@ static NTSTATUS wine_vkCmdNextSubpass2KHR(void *args) { struct vkCmdNextSubpass2KHR_params *params = args; TRACE("%p, %p, %p\n", params->commandBuffer, params->pSubpassBeginInfo, params->pSubpassEndInfo); - params->commandBuffer->device->funcs.p_vkCmdNextSubpass2KHR(params->commandBuffer->command_buffer, params->pSubpassBeginInfo, params->pSubpassEndInfo); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdNextSubpass2KHR(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->pSubpassBeginInfo, params->pSubpassEndInfo); return STATUS_SUCCESS; }
@@ -6515,14 +6515,14 @@ static NTSTATUS wine_vkCmdPipelineBarrier(void *args)
pBufferMemoryBarriers_host = convert_VkBufferMemoryBarrier_array_win_to_host(params->pBufferMemoryBarriers, params->bufferMemoryBarrierCount); pImageMemoryBarriers_host = convert_VkImageMemoryBarrier_array_win_to_host(params->pImageMemoryBarriers, params->imageMemoryBarrierCount); - params->commandBuffer->device->funcs.p_vkCmdPipelineBarrier(params->commandBuffer->command_buffer, params->srcStageMask, params->dstStageMask, params->dependencyFlags, params->memoryBarrierCount, params->pMemoryBarriers, params->bufferMemoryBarrierCount, pBufferMemoryBarriers_host, params->imageMemoryBarrierCount, pImageMemoryBarriers_host); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdPipelineBarrier(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->srcStageMask, params->dstStageMask, params->dependencyFlags, params->memoryBarrierCount, params->pMemoryBarriers, params->bufferMemoryBarrierCount, pBufferMemoryBarriers_host, params->imageMemoryBarrierCount, pImageMemoryBarriers_host);
free_VkBufferMemoryBarrier_array(pBufferMemoryBarriers_host, params->bufferMemoryBarrierCount); free_VkImageMemoryBarrier_array(pImageMemoryBarriers_host, params->imageMemoryBarrierCount); return STATUS_SUCCESS; #else TRACE("%p, %#x, %#x, %#x, %u, %p, %u, %p, %u, %p\n", params->commandBuffer, params->srcStageMask, params->dstStageMask, params->dependencyFlags, params->memoryBarrierCount, params->pMemoryBarriers, params->bufferMemoryBarrierCount, params->pBufferMemoryBarriers, params->imageMemoryBarrierCount, params->pImageMemoryBarriers); - params->commandBuffer->device->funcs.p_vkCmdPipelineBarrier(params->commandBuffer->command_buffer, params->srcStageMask, params->dstStageMask, params->dependencyFlags, params->memoryBarrierCount, params->pMemoryBarriers, params->bufferMemoryBarrierCount, params->pBufferMemoryBarriers, params->imageMemoryBarrierCount, params->pImageMemoryBarriers); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdPipelineBarrier(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->srcStageMask, params->dstStageMask, params->dependencyFlags, params->memoryBarrierCount, params->pMemoryBarriers, params->bufferMemoryBarrierCount, params->pBufferMemoryBarriers, params->imageMemoryBarrierCount, params->pImageMemoryBarriers); return STATUS_SUCCESS; #endif } @@ -6535,13 +6535,13 @@ static NTSTATUS wine_vkCmdPipelineBarrier2(void *args) TRACE("%p, %p\n", params->commandBuffer, params->pDependencyInfo);
convert_VkDependencyInfo_win_to_host(params->pDependencyInfo, &pDependencyInfo_host); - params->commandBuffer->device->funcs.p_vkCmdPipelineBarrier2(params->commandBuffer->command_buffer, &pDependencyInfo_host); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdPipelineBarrier2(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, &pDependencyInfo_host);
free_VkDependencyInfo(&pDependencyInfo_host); return STATUS_SUCCESS; #else TRACE("%p, %p\n", params->commandBuffer, params->pDependencyInfo); - params->commandBuffer->device->funcs.p_vkCmdPipelineBarrier2(params->commandBuffer->command_buffer, params->pDependencyInfo); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdPipelineBarrier2(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->pDependencyInfo); return STATUS_SUCCESS; #endif } @@ -6554,13 +6554,13 @@ static NTSTATUS wine_vkCmdPipelineBarrier2KHR(void *args) TRACE("%p, %p\n", params->commandBuffer, params->pDependencyInfo);
convert_VkDependencyInfo_win_to_host(params->pDependencyInfo, &pDependencyInfo_host); - params->commandBuffer->device->funcs.p_vkCmdPipelineBarrier2KHR(params->commandBuffer->command_buffer, &pDependencyInfo_host); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdPipelineBarrier2KHR(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, &pDependencyInfo_host);
free_VkDependencyInfo(&pDependencyInfo_host); return STATUS_SUCCESS; #else TRACE("%p, %p\n", params->commandBuffer, params->pDependencyInfo); - params->commandBuffer->device->funcs.p_vkCmdPipelineBarrier2KHR(params->commandBuffer->command_buffer, params->pDependencyInfo); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdPipelineBarrier2KHR(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->pDependencyInfo); return STATUS_SUCCESS; #endif } @@ -6573,13 +6573,13 @@ static NTSTATUS wine_vkCmdPreprocessGeneratedCommandsNV(void *args) TRACE("%p, %p\n", params->commandBuffer, params->pGeneratedCommandsInfo);
convert_VkGeneratedCommandsInfoNV_win_to_host(params->pGeneratedCommandsInfo, &pGeneratedCommandsInfo_host); - params->commandBuffer->device->funcs.p_vkCmdPreprocessGeneratedCommandsNV(params->commandBuffer->command_buffer, &pGeneratedCommandsInfo_host); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdPreprocessGeneratedCommandsNV(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, &pGeneratedCommandsInfo_host);
free_VkGeneratedCommandsInfoNV(&pGeneratedCommandsInfo_host); return STATUS_SUCCESS; #else TRACE("%p, %p\n", params->commandBuffer, params->pGeneratedCommandsInfo); - params->commandBuffer->device->funcs.p_vkCmdPreprocessGeneratedCommandsNV(params->commandBuffer->command_buffer, params->pGeneratedCommandsInfo); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdPreprocessGeneratedCommandsNV(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->pGeneratedCommandsInfo); return STATUS_SUCCESS; #endif } @@ -6588,7 +6588,7 @@ static NTSTATUS wine_vkCmdPushConstants(void *args) { struct vkCmdPushConstants_params *params = args; TRACE("%p, 0x%s, %#x, %u, %u, %p\n", params->commandBuffer, wine_dbgstr_longlong(params->layout), params->stageFlags, params->offset, params->size, params->pValues); - params->commandBuffer->device->funcs.p_vkCmdPushConstants(params->commandBuffer->command_buffer, params->layout, params->stageFlags, params->offset, params->size, params->pValues); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdPushConstants(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->layout, params->stageFlags, params->offset, params->size, params->pValues); return STATUS_SUCCESS; }
@@ -6600,13 +6600,13 @@ static NTSTATUS wine_vkCmdPushDescriptorSetKHR(void *args) TRACE("%p, %#x, 0x%s, %u, %u, %p\n", params->commandBuffer, params->pipelineBindPoint, wine_dbgstr_longlong(params->layout), params->set, params->descriptorWriteCount, params->pDescriptorWrites);
pDescriptorWrites_host = convert_VkWriteDescriptorSet_array_win_to_host(params->pDescriptorWrites, params->descriptorWriteCount); - params->commandBuffer->device->funcs.p_vkCmdPushDescriptorSetKHR(params->commandBuffer->command_buffer, params->pipelineBindPoint, params->layout, params->set, params->descriptorWriteCount, pDescriptorWrites_host); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdPushDescriptorSetKHR(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->pipelineBindPoint, params->layout, params->set, params->descriptorWriteCount, pDescriptorWrites_host);
free_VkWriteDescriptorSet_array(pDescriptorWrites_host, params->descriptorWriteCount); return STATUS_SUCCESS; #else TRACE("%p, %#x, 0x%s, %u, %u, %p\n", params->commandBuffer, params->pipelineBindPoint, wine_dbgstr_longlong(params->layout), params->set, params->descriptorWriteCount, params->pDescriptorWrites); - params->commandBuffer->device->funcs.p_vkCmdPushDescriptorSetKHR(params->commandBuffer->command_buffer, params->pipelineBindPoint, params->layout, params->set, params->descriptorWriteCount, params->pDescriptorWrites); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdPushDescriptorSetKHR(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->pipelineBindPoint, params->layout, params->set, params->descriptorWriteCount, params->pDescriptorWrites); return STATUS_SUCCESS; #endif } @@ -6615,7 +6615,7 @@ static NTSTATUS wine_vkCmdPushDescriptorSetWithTemplateKHR(void *args) { struct vkCmdPushDescriptorSetWithTemplateKHR_params *params = args; TRACE("%p, 0x%s, 0x%s, %u, %p\n", params->commandBuffer, wine_dbgstr_longlong(params->descriptorUpdateTemplate), wine_dbgstr_longlong(params->layout), params->set, params->pData); - params->commandBuffer->device->funcs.p_vkCmdPushDescriptorSetWithTemplateKHR(params->commandBuffer->command_buffer, params->descriptorUpdateTemplate, params->layout, params->set, params->pData); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdPushDescriptorSetWithTemplateKHR(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->descriptorUpdateTemplate, params->layout, params->set, params->pData); return STATUS_SUCCESS; }
@@ -6623,7 +6623,7 @@ static NTSTATUS wine_vkCmdResetEvent(void *args) { struct vkCmdResetEvent_params *params = args; TRACE("%p, 0x%s, %#x\n", params->commandBuffer, wine_dbgstr_longlong(params->event), params->stageMask); - params->commandBuffer->device->funcs.p_vkCmdResetEvent(params->commandBuffer->command_buffer, params->event, params->stageMask); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdResetEvent(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->event, params->stageMask); return STATUS_SUCCESS; }
@@ -6631,7 +6631,7 @@ static NTSTATUS wine_vkCmdResetEvent2(void *args) { struct vkCmdResetEvent2_params *params = args; TRACE("%p, 0x%s, 0x%s\n", params->commandBuffer, wine_dbgstr_longlong(params->event), wine_dbgstr_longlong(params->stageMask)); - params->commandBuffer->device->funcs.p_vkCmdResetEvent2(params->commandBuffer->command_buffer, params->event, params->stageMask); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdResetEvent2(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->event, params->stageMask); return STATUS_SUCCESS; }
@@ -6639,7 +6639,7 @@ static NTSTATUS wine_vkCmdResetEvent2KHR(void *args) { struct vkCmdResetEvent2KHR_params *params = args; TRACE("%p, 0x%s, 0x%s\n", params->commandBuffer, wine_dbgstr_longlong(params->event), wine_dbgstr_longlong(params->stageMask)); - params->commandBuffer->device->funcs.p_vkCmdResetEvent2KHR(params->commandBuffer->command_buffer, params->event, params->stageMask); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdResetEvent2KHR(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->event, params->stageMask); return STATUS_SUCCESS; }
@@ -6647,7 +6647,7 @@ static NTSTATUS wine_vkCmdResetQueryPool(void *args) { struct vkCmdResetQueryPool_params *params = args; TRACE("%p, 0x%s, %u, %u\n", params->commandBuffer, wine_dbgstr_longlong(params->queryPool), params->firstQuery, params->queryCount); - params->commandBuffer->device->funcs.p_vkCmdResetQueryPool(params->commandBuffer->command_buffer, params->queryPool, params->firstQuery, params->queryCount); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdResetQueryPool(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->queryPool, params->firstQuery, params->queryCount); return STATUS_SUCCESS; }
@@ -6655,7 +6655,7 @@ static NTSTATUS wine_vkCmdResolveImage(void *args) { struct vkCmdResolveImage_params *params = args; TRACE("%p, 0x%s, %#x, 0x%s, %#x, %u, %p\n", params->commandBuffer, wine_dbgstr_longlong(params->srcImage), params->srcImageLayout, wine_dbgstr_longlong(params->dstImage), params->dstImageLayout, params->regionCount, params->pRegions); - params->commandBuffer->device->funcs.p_vkCmdResolveImage(params->commandBuffer->command_buffer, params->srcImage, params->srcImageLayout, params->dstImage, params->dstImageLayout, params->regionCount, params->pRegions); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdResolveImage(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->srcImage, params->srcImageLayout, params->dstImage, params->dstImageLayout, params->regionCount, params->pRegions); return STATUS_SUCCESS; }
@@ -6667,12 +6667,12 @@ static NTSTATUS wine_vkCmdResolveImage2(void *args) TRACE("%p, %p\n", params->commandBuffer, params->pResolveImageInfo);
convert_VkResolveImageInfo2_win_to_host(params->pResolveImageInfo, &pResolveImageInfo_host); - params->commandBuffer->device->funcs.p_vkCmdResolveImage2(params->commandBuffer->command_buffer, &pResolveImageInfo_host); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdResolveImage2(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, &pResolveImageInfo_host);
return STATUS_SUCCESS; #else TRACE("%p, %p\n", params->commandBuffer, params->pResolveImageInfo); - params->commandBuffer->device->funcs.p_vkCmdResolveImage2(params->commandBuffer->command_buffer, params->pResolveImageInfo); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdResolveImage2(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->pResolveImageInfo); return STATUS_SUCCESS; #endif } @@ -6685,12 +6685,12 @@ static NTSTATUS wine_vkCmdResolveImage2KHR(void *args) TRACE("%p, %p\n", params->commandBuffer, params->pResolveImageInfo);
convert_VkResolveImageInfo2_win_to_host(params->pResolveImageInfo, &pResolveImageInfo_host); - params->commandBuffer->device->funcs.p_vkCmdResolveImage2KHR(params->commandBuffer->command_buffer, &pResolveImageInfo_host); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdResolveImage2KHR(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, &pResolveImageInfo_host);
return STATUS_SUCCESS; #else TRACE("%p, %p\n", params->commandBuffer, params->pResolveImageInfo); - params->commandBuffer->device->funcs.p_vkCmdResolveImage2KHR(params->commandBuffer->command_buffer, params->pResolveImageInfo); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdResolveImage2KHR(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->pResolveImageInfo); return STATUS_SUCCESS; #endif } @@ -6699,7 +6699,7 @@ static NTSTATUS wine_vkCmdSetBlendConstants(void *args) { struct vkCmdSetBlendConstants_params *params = args; TRACE("%p, %p\n", params->commandBuffer, params->blendConstants); - params->commandBuffer->device->funcs.p_vkCmdSetBlendConstants(params->commandBuffer->command_buffer, params->blendConstants); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdSetBlendConstants(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->blendConstants); return STATUS_SUCCESS; }
@@ -6707,7 +6707,7 @@ static NTSTATUS wine_vkCmdSetCheckpointNV(void *args) { struct vkCmdSetCheckpointNV_params *params = args; TRACE("%p, %p\n", params->commandBuffer, params->pCheckpointMarker); - params->commandBuffer->device->funcs.p_vkCmdSetCheckpointNV(params->commandBuffer->command_buffer, params->pCheckpointMarker); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdSetCheckpointNV(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->pCheckpointMarker); return STATUS_SUCCESS; }
@@ -6715,7 +6715,7 @@ static NTSTATUS wine_vkCmdSetCoarseSampleOrderNV(void *args) { struct vkCmdSetCoarseSampleOrderNV_params *params = args; TRACE("%p, %#x, %u, %p\n", params->commandBuffer, params->sampleOrderType, params->customSampleOrderCount, params->pCustomSampleOrders); - params->commandBuffer->device->funcs.p_vkCmdSetCoarseSampleOrderNV(params->commandBuffer->command_buffer, params->sampleOrderType, params->customSampleOrderCount, params->pCustomSampleOrders); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdSetCoarseSampleOrderNV(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->sampleOrderType, params->customSampleOrderCount, params->pCustomSampleOrders); return STATUS_SUCCESS; }
@@ -6723,7 +6723,7 @@ static NTSTATUS wine_vkCmdSetColorWriteEnableEXT(void *args) { struct vkCmdSetColorWriteEnableEXT_params *params = args; TRACE("%p, %u, %p\n", params->commandBuffer, params->attachmentCount, params->pColorWriteEnables); - params->commandBuffer->device->funcs.p_vkCmdSetColorWriteEnableEXT(params->commandBuffer->command_buffer, params->attachmentCount, params->pColorWriteEnables); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdSetColorWriteEnableEXT(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->attachmentCount, params->pColorWriteEnables); return STATUS_SUCCESS; }
@@ -6731,7 +6731,7 @@ static NTSTATUS wine_vkCmdSetCullMode(void *args) { struct vkCmdSetCullMode_params *params = args; TRACE("%p, %#x\n", params->commandBuffer, params->cullMode); - params->commandBuffer->device->funcs.p_vkCmdSetCullMode(params->commandBuffer->command_buffer, params->cullMode); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdSetCullMode(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->cullMode); return STATUS_SUCCESS; }
@@ -6739,7 +6739,7 @@ static NTSTATUS wine_vkCmdSetCullModeEXT(void *args) { struct vkCmdSetCullModeEXT_params *params = args; TRACE("%p, %#x\n", params->commandBuffer, params->cullMode); - params->commandBuffer->device->funcs.p_vkCmdSetCullModeEXT(params->commandBuffer->command_buffer, params->cullMode); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdSetCullModeEXT(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->cullMode); return STATUS_SUCCESS; }
@@ -6747,7 +6747,7 @@ static NTSTATUS wine_vkCmdSetDepthBias(void *args) { struct vkCmdSetDepthBias_params *params = args; TRACE("%p, %f, %f, %f\n", params->commandBuffer, params->depthBiasConstantFactor, params->depthBiasClamp, params->depthBiasSlopeFactor); - params->commandBuffer->device->funcs.p_vkCmdSetDepthBias(params->commandBuffer->command_buffer, params->depthBiasConstantFactor, params->depthBiasClamp, params->depthBiasSlopeFactor); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdSetDepthBias(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->depthBiasConstantFactor, params->depthBiasClamp, params->depthBiasSlopeFactor); return STATUS_SUCCESS; }
@@ -6755,7 +6755,7 @@ static NTSTATUS wine_vkCmdSetDepthBiasEnable(void *args) { struct vkCmdSetDepthBiasEnable_params *params = args; TRACE("%p, %u\n", params->commandBuffer, params->depthBiasEnable); - params->commandBuffer->device->funcs.p_vkCmdSetDepthBiasEnable(params->commandBuffer->command_buffer, params->depthBiasEnable); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdSetDepthBiasEnable(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->depthBiasEnable); return STATUS_SUCCESS; }
@@ -6763,7 +6763,7 @@ static NTSTATUS wine_vkCmdSetDepthBiasEnableEXT(void *args) { struct vkCmdSetDepthBiasEnableEXT_params *params = args; TRACE("%p, %u\n", params->commandBuffer, params->depthBiasEnable); - params->commandBuffer->device->funcs.p_vkCmdSetDepthBiasEnableEXT(params->commandBuffer->command_buffer, params->depthBiasEnable); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdSetDepthBiasEnableEXT(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->depthBiasEnable); return STATUS_SUCCESS; }
@@ -6771,7 +6771,7 @@ static NTSTATUS wine_vkCmdSetDepthBounds(void *args) { struct vkCmdSetDepthBounds_params *params = args; TRACE("%p, %f, %f\n", params->commandBuffer, params->minDepthBounds, params->maxDepthBounds); - params->commandBuffer->device->funcs.p_vkCmdSetDepthBounds(params->commandBuffer->command_buffer, params->minDepthBounds, params->maxDepthBounds); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdSetDepthBounds(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->minDepthBounds, params->maxDepthBounds); return STATUS_SUCCESS; }
@@ -6779,7 +6779,7 @@ static NTSTATUS wine_vkCmdSetDepthBoundsTestEnable(void *args) { struct vkCmdSetDepthBoundsTestEnable_params *params = args; TRACE("%p, %u\n", params->commandBuffer, params->depthBoundsTestEnable); - params->commandBuffer->device->funcs.p_vkCmdSetDepthBoundsTestEnable(params->commandBuffer->command_buffer, params->depthBoundsTestEnable); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdSetDepthBoundsTestEnable(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->depthBoundsTestEnable); return STATUS_SUCCESS; }
@@ -6787,7 +6787,7 @@ static NTSTATUS wine_vkCmdSetDepthBoundsTestEnableEXT(void *args) { struct vkCmdSetDepthBoundsTestEnableEXT_params *params = args; TRACE("%p, %u\n", params->commandBuffer, params->depthBoundsTestEnable); - params->commandBuffer->device->funcs.p_vkCmdSetDepthBoundsTestEnableEXT(params->commandBuffer->command_buffer, params->depthBoundsTestEnable); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdSetDepthBoundsTestEnableEXT(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->depthBoundsTestEnable); return STATUS_SUCCESS; }
@@ -6795,7 +6795,7 @@ static NTSTATUS wine_vkCmdSetDepthCompareOp(void *args) { struct vkCmdSetDepthCompareOp_params *params = args; TRACE("%p, %#x\n", params->commandBuffer, params->depthCompareOp); - params->commandBuffer->device->funcs.p_vkCmdSetDepthCompareOp(params->commandBuffer->command_buffer, params->depthCompareOp); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdSetDepthCompareOp(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->depthCompareOp); return STATUS_SUCCESS; }
@@ -6803,7 +6803,7 @@ static NTSTATUS wine_vkCmdSetDepthCompareOpEXT(void *args) { struct vkCmdSetDepthCompareOpEXT_params *params = args; TRACE("%p, %#x\n", params->commandBuffer, params->depthCompareOp); - params->commandBuffer->device->funcs.p_vkCmdSetDepthCompareOpEXT(params->commandBuffer->command_buffer, params->depthCompareOp); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdSetDepthCompareOpEXT(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->depthCompareOp); return STATUS_SUCCESS; }
@@ -6811,7 +6811,7 @@ static NTSTATUS wine_vkCmdSetDepthTestEnable(void *args) { struct vkCmdSetDepthTestEnable_params *params = args; TRACE("%p, %u\n", params->commandBuffer, params->depthTestEnable); - params->commandBuffer->device->funcs.p_vkCmdSetDepthTestEnable(params->commandBuffer->command_buffer, params->depthTestEnable); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdSetDepthTestEnable(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->depthTestEnable); return STATUS_SUCCESS; }
@@ -6819,7 +6819,7 @@ static NTSTATUS wine_vkCmdSetDepthTestEnableEXT(void *args) { struct vkCmdSetDepthTestEnableEXT_params *params = args; TRACE("%p, %u\n", params->commandBuffer, params->depthTestEnable); - params->commandBuffer->device->funcs.p_vkCmdSetDepthTestEnableEXT(params->commandBuffer->command_buffer, params->depthTestEnable); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdSetDepthTestEnableEXT(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->depthTestEnable); return STATUS_SUCCESS; }
@@ -6827,7 +6827,7 @@ static NTSTATUS wine_vkCmdSetDepthWriteEnable(void *args) { struct vkCmdSetDepthWriteEnable_params *params = args; TRACE("%p, %u\n", params->commandBuffer, params->depthWriteEnable); - params->commandBuffer->device->funcs.p_vkCmdSetDepthWriteEnable(params->commandBuffer->command_buffer, params->depthWriteEnable); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdSetDepthWriteEnable(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->depthWriteEnable); return STATUS_SUCCESS; }
@@ -6835,7 +6835,7 @@ static NTSTATUS wine_vkCmdSetDepthWriteEnableEXT(void *args) { struct vkCmdSetDepthWriteEnableEXT_params *params = args; TRACE("%p, %u\n", params->commandBuffer, params->depthWriteEnable); - params->commandBuffer->device->funcs.p_vkCmdSetDepthWriteEnableEXT(params->commandBuffer->command_buffer, params->depthWriteEnable); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdSetDepthWriteEnableEXT(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->depthWriteEnable); return STATUS_SUCCESS; }
@@ -6843,7 +6843,7 @@ static NTSTATUS wine_vkCmdSetDeviceMask(void *args) { struct vkCmdSetDeviceMask_params *params = args; TRACE("%p, %u\n", params->commandBuffer, params->deviceMask); - params->commandBuffer->device->funcs.p_vkCmdSetDeviceMask(params->commandBuffer->command_buffer, params->deviceMask); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdSetDeviceMask(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->deviceMask); return STATUS_SUCCESS; }
@@ -6851,7 +6851,7 @@ static NTSTATUS wine_vkCmdSetDeviceMaskKHR(void *args) { struct vkCmdSetDeviceMaskKHR_params *params = args; TRACE("%p, %u\n", params->commandBuffer, params->deviceMask); - params->commandBuffer->device->funcs.p_vkCmdSetDeviceMaskKHR(params->commandBuffer->command_buffer, params->deviceMask); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdSetDeviceMaskKHR(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->deviceMask); return STATUS_SUCCESS; }
@@ -6859,7 +6859,7 @@ static NTSTATUS wine_vkCmdSetDiscardRectangleEXT(void *args) { struct vkCmdSetDiscardRectangleEXT_params *params = args; TRACE("%p, %u, %u, %p\n", params->commandBuffer, params->firstDiscardRectangle, params->discardRectangleCount, params->pDiscardRectangles); - params->commandBuffer->device->funcs.p_vkCmdSetDiscardRectangleEXT(params->commandBuffer->command_buffer, params->firstDiscardRectangle, params->discardRectangleCount, params->pDiscardRectangles); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdSetDiscardRectangleEXT(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->firstDiscardRectangle, params->discardRectangleCount, params->pDiscardRectangles); return STATUS_SUCCESS; }
@@ -6867,7 +6867,7 @@ static NTSTATUS wine_vkCmdSetEvent(void *args) { struct vkCmdSetEvent_params *params = args; TRACE("%p, 0x%s, %#x\n", params->commandBuffer, wine_dbgstr_longlong(params->event), params->stageMask); - params->commandBuffer->device->funcs.p_vkCmdSetEvent(params->commandBuffer->command_buffer, params->event, params->stageMask); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdSetEvent(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->event, params->stageMask); return STATUS_SUCCESS; }
@@ -6879,13 +6879,13 @@ static NTSTATUS wine_vkCmdSetEvent2(void *args) TRACE("%p, 0x%s, %p\n", params->commandBuffer, wine_dbgstr_longlong(params->event), params->pDependencyInfo);
convert_VkDependencyInfo_win_to_host(params->pDependencyInfo, &pDependencyInfo_host); - params->commandBuffer->device->funcs.p_vkCmdSetEvent2(params->commandBuffer->command_buffer, params->event, &pDependencyInfo_host); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdSetEvent2(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->event, &pDependencyInfo_host);
free_VkDependencyInfo(&pDependencyInfo_host); return STATUS_SUCCESS; #else TRACE("%p, 0x%s, %p\n", params->commandBuffer, wine_dbgstr_longlong(params->event), params->pDependencyInfo); - params->commandBuffer->device->funcs.p_vkCmdSetEvent2(params->commandBuffer->command_buffer, params->event, params->pDependencyInfo); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdSetEvent2(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->event, params->pDependencyInfo); return STATUS_SUCCESS; #endif } @@ -6898,13 +6898,13 @@ static NTSTATUS wine_vkCmdSetEvent2KHR(void *args) TRACE("%p, 0x%s, %p\n", params->commandBuffer, wine_dbgstr_longlong(params->event), params->pDependencyInfo);
convert_VkDependencyInfo_win_to_host(params->pDependencyInfo, &pDependencyInfo_host); - params->commandBuffer->device->funcs.p_vkCmdSetEvent2KHR(params->commandBuffer->command_buffer, params->event, &pDependencyInfo_host); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdSetEvent2KHR(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->event, &pDependencyInfo_host);
free_VkDependencyInfo(&pDependencyInfo_host); return STATUS_SUCCESS; #else TRACE("%p, 0x%s, %p\n", params->commandBuffer, wine_dbgstr_longlong(params->event), params->pDependencyInfo); - params->commandBuffer->device->funcs.p_vkCmdSetEvent2KHR(params->commandBuffer->command_buffer, params->event, params->pDependencyInfo); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdSetEvent2KHR(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->event, params->pDependencyInfo); return STATUS_SUCCESS; #endif } @@ -6913,7 +6913,7 @@ static NTSTATUS wine_vkCmdSetExclusiveScissorNV(void *args) { struct vkCmdSetExclusiveScissorNV_params *params = args; TRACE("%p, %u, %u, %p\n", params->commandBuffer, params->firstExclusiveScissor, params->exclusiveScissorCount, params->pExclusiveScissors); - params->commandBuffer->device->funcs.p_vkCmdSetExclusiveScissorNV(params->commandBuffer->command_buffer, params->firstExclusiveScissor, params->exclusiveScissorCount, params->pExclusiveScissors); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdSetExclusiveScissorNV(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->firstExclusiveScissor, params->exclusiveScissorCount, params->pExclusiveScissors); return STATUS_SUCCESS; }
@@ -6921,7 +6921,7 @@ static NTSTATUS wine_vkCmdSetFragmentShadingRateEnumNV(void *args) { struct vkCmdSetFragmentShadingRateEnumNV_params *params = args; TRACE("%p, %#x, %p\n", params->commandBuffer, params->shadingRate, params->combinerOps); - params->commandBuffer->device->funcs.p_vkCmdSetFragmentShadingRateEnumNV(params->commandBuffer->command_buffer, params->shadingRate, params->combinerOps); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdSetFragmentShadingRateEnumNV(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->shadingRate, params->combinerOps); return STATUS_SUCCESS; }
@@ -6929,7 +6929,7 @@ static NTSTATUS wine_vkCmdSetFragmentShadingRateKHR(void *args) { struct vkCmdSetFragmentShadingRateKHR_params *params = args; TRACE("%p, %p, %p\n", params->commandBuffer, params->pFragmentSize, params->combinerOps); - params->commandBuffer->device->funcs.p_vkCmdSetFragmentShadingRateKHR(params->commandBuffer->command_buffer, params->pFragmentSize, params->combinerOps); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdSetFragmentShadingRateKHR(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->pFragmentSize, params->combinerOps); return STATUS_SUCCESS; }
@@ -6937,7 +6937,7 @@ static NTSTATUS wine_vkCmdSetFrontFace(void *args) { struct vkCmdSetFrontFace_params *params = args; TRACE("%p, %#x\n", params->commandBuffer, params->frontFace); - params->commandBuffer->device->funcs.p_vkCmdSetFrontFace(params->commandBuffer->command_buffer, params->frontFace); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdSetFrontFace(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->frontFace); return STATUS_SUCCESS; }
@@ -6945,7 +6945,7 @@ static NTSTATUS wine_vkCmdSetFrontFaceEXT(void *args) { struct vkCmdSetFrontFaceEXT_params *params = args; TRACE("%p, %#x\n", params->commandBuffer, params->frontFace); - params->commandBuffer->device->funcs.p_vkCmdSetFrontFaceEXT(params->commandBuffer->command_buffer, params->frontFace); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdSetFrontFaceEXT(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->frontFace); return STATUS_SUCCESS; }
@@ -6953,7 +6953,7 @@ static NTSTATUS wine_vkCmdSetLineStippleEXT(void *args) { struct vkCmdSetLineStippleEXT_params *params = args; TRACE("%p, %u, %u\n", params->commandBuffer, params->lineStippleFactor, params->lineStipplePattern); - params->commandBuffer->device->funcs.p_vkCmdSetLineStippleEXT(params->commandBuffer->command_buffer, params->lineStippleFactor, params->lineStipplePattern); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdSetLineStippleEXT(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->lineStippleFactor, params->lineStipplePattern); return STATUS_SUCCESS; }
@@ -6961,7 +6961,7 @@ static NTSTATUS wine_vkCmdSetLineWidth(void *args) { struct vkCmdSetLineWidth_params *params = args; TRACE("%p, %f\n", params->commandBuffer, params->lineWidth); - params->commandBuffer->device->funcs.p_vkCmdSetLineWidth(params->commandBuffer->command_buffer, params->lineWidth); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdSetLineWidth(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->lineWidth); return STATUS_SUCCESS; }
@@ -6969,7 +6969,7 @@ static NTSTATUS wine_vkCmdSetLogicOpEXT(void *args) { struct vkCmdSetLogicOpEXT_params *params = args; TRACE("%p, %#x\n", params->commandBuffer, params->logicOp); - params->commandBuffer->device->funcs.p_vkCmdSetLogicOpEXT(params->commandBuffer->command_buffer, params->logicOp); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdSetLogicOpEXT(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->logicOp); return STATUS_SUCCESS; }
@@ -6977,7 +6977,7 @@ static NTSTATUS wine_vkCmdSetPatchControlPointsEXT(void *args) { struct vkCmdSetPatchControlPointsEXT_params *params = args; TRACE("%p, %u\n", params->commandBuffer, params->patchControlPoints); - params->commandBuffer->device->funcs.p_vkCmdSetPatchControlPointsEXT(params->commandBuffer->command_buffer, params->patchControlPoints); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdSetPatchControlPointsEXT(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->patchControlPoints); return STATUS_SUCCESS; }
@@ -6990,12 +6990,12 @@ static NTSTATUS wine_vkCmdSetPerformanceMarkerINTEL(void *args) TRACE("%p, %p\n", params->commandBuffer, params->pMarkerInfo);
convert_VkPerformanceMarkerInfoINTEL_win_to_host(params->pMarkerInfo, &pMarkerInfo_host); - result = params->commandBuffer->device->funcs.p_vkCmdSetPerformanceMarkerINTEL(params->commandBuffer->command_buffer, &pMarkerInfo_host); + result = wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdSetPerformanceMarkerINTEL(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, &pMarkerInfo_host);
return result; #else TRACE("%p, %p\n", params->commandBuffer, params->pMarkerInfo); - return params->commandBuffer->device->funcs.p_vkCmdSetPerformanceMarkerINTEL(params->commandBuffer->command_buffer, params->pMarkerInfo); + return wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdSetPerformanceMarkerINTEL(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->pMarkerInfo); #endif }
@@ -7008,12 +7008,12 @@ static NTSTATUS wine_vkCmdSetPerformanceOverrideINTEL(void *args) TRACE("%p, %p\n", params->commandBuffer, params->pOverrideInfo);
convert_VkPerformanceOverrideInfoINTEL_win_to_host(params->pOverrideInfo, &pOverrideInfo_host); - result = params->commandBuffer->device->funcs.p_vkCmdSetPerformanceOverrideINTEL(params->commandBuffer->command_buffer, &pOverrideInfo_host); + result = wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdSetPerformanceOverrideINTEL(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, &pOverrideInfo_host);
return result; #else TRACE("%p, %p\n", params->commandBuffer, params->pOverrideInfo); - return params->commandBuffer->device->funcs.p_vkCmdSetPerformanceOverrideINTEL(params->commandBuffer->command_buffer, params->pOverrideInfo); + return wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdSetPerformanceOverrideINTEL(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->pOverrideInfo); #endif }
@@ -7021,14 +7021,14 @@ static NTSTATUS wine_vkCmdSetPerformanceStreamMarkerINTEL(void *args) { struct vkCmdSetPerformanceStreamMarkerINTEL_params *params = args; TRACE("%p, %p\n", params->commandBuffer, params->pMarkerInfo); - return params->commandBuffer->device->funcs.p_vkCmdSetPerformanceStreamMarkerINTEL(params->commandBuffer->command_buffer, params->pMarkerInfo); + return wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdSetPerformanceStreamMarkerINTEL(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->pMarkerInfo); }
static NTSTATUS wine_vkCmdSetPrimitiveRestartEnable(void *args) { struct vkCmdSetPrimitiveRestartEnable_params *params = args; TRACE("%p, %u\n", params->commandBuffer, params->primitiveRestartEnable); - params->commandBuffer->device->funcs.p_vkCmdSetPrimitiveRestartEnable(params->commandBuffer->command_buffer, params->primitiveRestartEnable); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdSetPrimitiveRestartEnable(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->primitiveRestartEnable); return STATUS_SUCCESS; }
@@ -7036,7 +7036,7 @@ static NTSTATUS wine_vkCmdSetPrimitiveRestartEnableEXT(void *args) { struct vkCmdSetPrimitiveRestartEnableEXT_params *params = args; TRACE("%p, %u\n", params->commandBuffer, params->primitiveRestartEnable); - params->commandBuffer->device->funcs.p_vkCmdSetPrimitiveRestartEnableEXT(params->commandBuffer->command_buffer, params->primitiveRestartEnable); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdSetPrimitiveRestartEnableEXT(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->primitiveRestartEnable); return STATUS_SUCCESS; }
@@ -7044,7 +7044,7 @@ static NTSTATUS wine_vkCmdSetPrimitiveTopology(void *args) { struct vkCmdSetPrimitiveTopology_params *params = args; TRACE("%p, %#x\n", params->commandBuffer, params->primitiveTopology); - params->commandBuffer->device->funcs.p_vkCmdSetPrimitiveTopology(params->commandBuffer->command_buffer, params->primitiveTopology); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdSetPrimitiveTopology(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->primitiveTopology); return STATUS_SUCCESS; }
@@ -7052,7 +7052,7 @@ static NTSTATUS wine_vkCmdSetPrimitiveTopologyEXT(void *args) { struct vkCmdSetPrimitiveTopologyEXT_params *params = args; TRACE("%p, %#x\n", params->commandBuffer, params->primitiveTopology); - params->commandBuffer->device->funcs.p_vkCmdSetPrimitiveTopologyEXT(params->commandBuffer->command_buffer, params->primitiveTopology); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdSetPrimitiveTopologyEXT(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->primitiveTopology); return STATUS_SUCCESS; }
@@ -7060,7 +7060,7 @@ static NTSTATUS wine_vkCmdSetRasterizerDiscardEnable(void *args) { struct vkCmdSetRasterizerDiscardEnable_params *params = args; TRACE("%p, %u\n", params->commandBuffer, params->rasterizerDiscardEnable); - params->commandBuffer->device->funcs.p_vkCmdSetRasterizerDiscardEnable(params->commandBuffer->command_buffer, params->rasterizerDiscardEnable); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdSetRasterizerDiscardEnable(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->rasterizerDiscardEnable); return STATUS_SUCCESS; }
@@ -7068,7 +7068,7 @@ static NTSTATUS wine_vkCmdSetRasterizerDiscardEnableEXT(void *args) { struct vkCmdSetRasterizerDiscardEnableEXT_params *params = args; TRACE("%p, %u\n", params->commandBuffer, params->rasterizerDiscardEnable); - params->commandBuffer->device->funcs.p_vkCmdSetRasterizerDiscardEnableEXT(params->commandBuffer->command_buffer, params->rasterizerDiscardEnable); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdSetRasterizerDiscardEnableEXT(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->rasterizerDiscardEnable); return STATUS_SUCCESS; }
@@ -7076,7 +7076,7 @@ static NTSTATUS wine_vkCmdSetRayTracingPipelineStackSizeKHR(void *args) { struct vkCmdSetRayTracingPipelineStackSizeKHR_params *params = args; TRACE("%p, %u\n", params->commandBuffer, params->pipelineStackSize); - params->commandBuffer->device->funcs.p_vkCmdSetRayTracingPipelineStackSizeKHR(params->commandBuffer->command_buffer, params->pipelineStackSize); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdSetRayTracingPipelineStackSizeKHR(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->pipelineStackSize); return STATUS_SUCCESS; }
@@ -7084,7 +7084,7 @@ static NTSTATUS wine_vkCmdSetSampleLocationsEXT(void *args) { struct vkCmdSetSampleLocationsEXT_params *params = args; TRACE("%p, %p\n", params->commandBuffer, params->pSampleLocationsInfo); - params->commandBuffer->device->funcs.p_vkCmdSetSampleLocationsEXT(params->commandBuffer->command_buffer, params->pSampleLocationsInfo); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdSetSampleLocationsEXT(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->pSampleLocationsInfo); return STATUS_SUCCESS; }
@@ -7092,7 +7092,7 @@ static NTSTATUS wine_vkCmdSetScissor(void *args) { struct vkCmdSetScissor_params *params = args; TRACE("%p, %u, %u, %p\n", params->commandBuffer, params->firstScissor, params->scissorCount, params->pScissors); - params->commandBuffer->device->funcs.p_vkCmdSetScissor(params->commandBuffer->command_buffer, params->firstScissor, params->scissorCount, params->pScissors); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdSetScissor(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->firstScissor, params->scissorCount, params->pScissors); return STATUS_SUCCESS; }
@@ -7100,7 +7100,7 @@ static NTSTATUS wine_vkCmdSetScissorWithCount(void *args) { struct vkCmdSetScissorWithCount_params *params = args; TRACE("%p, %u, %p\n", params->commandBuffer, params->scissorCount, params->pScissors); - params->commandBuffer->device->funcs.p_vkCmdSetScissorWithCount(params->commandBuffer->command_buffer, params->scissorCount, params->pScissors); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdSetScissorWithCount(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->scissorCount, params->pScissors); return STATUS_SUCCESS; }
@@ -7108,7 +7108,7 @@ static NTSTATUS wine_vkCmdSetScissorWithCountEXT(void *args) { struct vkCmdSetScissorWithCountEXT_params *params = args; TRACE("%p, %u, %p\n", params->commandBuffer, params->scissorCount, params->pScissors); - params->commandBuffer->device->funcs.p_vkCmdSetScissorWithCountEXT(params->commandBuffer->command_buffer, params->scissorCount, params->pScissors); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdSetScissorWithCountEXT(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->scissorCount, params->pScissors); return STATUS_SUCCESS; }
@@ -7116,7 +7116,7 @@ static NTSTATUS wine_vkCmdSetStencilCompareMask(void *args) { struct vkCmdSetStencilCompareMask_params *params = args; TRACE("%p, %#x, %u\n", params->commandBuffer, params->faceMask, params->compareMask); - params->commandBuffer->device->funcs.p_vkCmdSetStencilCompareMask(params->commandBuffer->command_buffer, params->faceMask, params->compareMask); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdSetStencilCompareMask(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->faceMask, params->compareMask); return STATUS_SUCCESS; }
@@ -7124,7 +7124,7 @@ static NTSTATUS wine_vkCmdSetStencilOp(void *args) { struct vkCmdSetStencilOp_params *params = args; TRACE("%p, %#x, %#x, %#x, %#x, %#x\n", params->commandBuffer, params->faceMask, params->failOp, params->passOp, params->depthFailOp, params->compareOp); - params->commandBuffer->device->funcs.p_vkCmdSetStencilOp(params->commandBuffer->command_buffer, params->faceMask, params->failOp, params->passOp, params->depthFailOp, params->compareOp); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdSetStencilOp(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->faceMask, params->failOp, params->passOp, params->depthFailOp, params->compareOp); return STATUS_SUCCESS; }
@@ -7132,7 +7132,7 @@ static NTSTATUS wine_vkCmdSetStencilOpEXT(void *args) { struct vkCmdSetStencilOpEXT_params *params = args; TRACE("%p, %#x, %#x, %#x, %#x, %#x\n", params->commandBuffer, params->faceMask, params->failOp, params->passOp, params->depthFailOp, params->compareOp); - params->commandBuffer->device->funcs.p_vkCmdSetStencilOpEXT(params->commandBuffer->command_buffer, params->faceMask, params->failOp, params->passOp, params->depthFailOp, params->compareOp); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdSetStencilOpEXT(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->faceMask, params->failOp, params->passOp, params->depthFailOp, params->compareOp); return STATUS_SUCCESS; }
@@ -7140,7 +7140,7 @@ static NTSTATUS wine_vkCmdSetStencilReference(void *args) { struct vkCmdSetStencilReference_params *params = args; TRACE("%p, %#x, %u\n", params->commandBuffer, params->faceMask, params->reference); - params->commandBuffer->device->funcs.p_vkCmdSetStencilReference(params->commandBuffer->command_buffer, params->faceMask, params->reference); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdSetStencilReference(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->faceMask, params->reference); return STATUS_SUCCESS; }
@@ -7148,7 +7148,7 @@ static NTSTATUS wine_vkCmdSetStencilTestEnable(void *args) { struct vkCmdSetStencilTestEnable_params *params = args; TRACE("%p, %u\n", params->commandBuffer, params->stencilTestEnable); - params->commandBuffer->device->funcs.p_vkCmdSetStencilTestEnable(params->commandBuffer->command_buffer, params->stencilTestEnable); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdSetStencilTestEnable(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->stencilTestEnable); return STATUS_SUCCESS; }
@@ -7156,7 +7156,7 @@ static NTSTATUS wine_vkCmdSetStencilTestEnableEXT(void *args) { struct vkCmdSetStencilTestEnableEXT_params *params = args; TRACE("%p, %u\n", params->commandBuffer, params->stencilTestEnable); - params->commandBuffer->device->funcs.p_vkCmdSetStencilTestEnableEXT(params->commandBuffer->command_buffer, params->stencilTestEnable); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdSetStencilTestEnableEXT(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->stencilTestEnable); return STATUS_SUCCESS; }
@@ -7164,7 +7164,7 @@ static NTSTATUS wine_vkCmdSetStencilWriteMask(void *args) { struct vkCmdSetStencilWriteMask_params *params = args; TRACE("%p, %#x, %u\n", params->commandBuffer, params->faceMask, params->writeMask); - params->commandBuffer->device->funcs.p_vkCmdSetStencilWriteMask(params->commandBuffer->command_buffer, params->faceMask, params->writeMask); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdSetStencilWriteMask(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->faceMask, params->writeMask); return STATUS_SUCCESS; }
@@ -7172,7 +7172,7 @@ static NTSTATUS wine_vkCmdSetVertexInputEXT(void *args) { struct vkCmdSetVertexInputEXT_params *params = args; TRACE("%p, %u, %p, %u, %p\n", params->commandBuffer, params->vertexBindingDescriptionCount, params->pVertexBindingDescriptions, params->vertexAttributeDescriptionCount, params->pVertexAttributeDescriptions); - params->commandBuffer->device->funcs.p_vkCmdSetVertexInputEXT(params->commandBuffer->command_buffer, params->vertexBindingDescriptionCount, params->pVertexBindingDescriptions, params->vertexAttributeDescriptionCount, params->pVertexAttributeDescriptions); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdSetVertexInputEXT(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->vertexBindingDescriptionCount, params->pVertexBindingDescriptions, params->vertexAttributeDescriptionCount, params->pVertexAttributeDescriptions); return STATUS_SUCCESS; }
@@ -7180,7 +7180,7 @@ static NTSTATUS wine_vkCmdSetViewport(void *args) { struct vkCmdSetViewport_params *params = args; TRACE("%p, %u, %u, %p\n", params->commandBuffer, params->firstViewport, params->viewportCount, params->pViewports); - params->commandBuffer->device->funcs.p_vkCmdSetViewport(params->commandBuffer->command_buffer, params->firstViewport, params->viewportCount, params->pViewports); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdSetViewport(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->firstViewport, params->viewportCount, params->pViewports); return STATUS_SUCCESS; }
@@ -7188,7 +7188,7 @@ static NTSTATUS wine_vkCmdSetViewportShadingRatePaletteNV(void *args) { struct vkCmdSetViewportShadingRatePaletteNV_params *params = args; TRACE("%p, %u, %u, %p\n", params->commandBuffer, params->firstViewport, params->viewportCount, params->pShadingRatePalettes); - params->commandBuffer->device->funcs.p_vkCmdSetViewportShadingRatePaletteNV(params->commandBuffer->command_buffer, params->firstViewport, params->viewportCount, params->pShadingRatePalettes); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdSetViewportShadingRatePaletteNV(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->firstViewport, params->viewportCount, params->pShadingRatePalettes); return STATUS_SUCCESS; }
@@ -7196,7 +7196,7 @@ static NTSTATUS wine_vkCmdSetViewportWScalingNV(void *args) { struct vkCmdSetViewportWScalingNV_params *params = args; TRACE("%p, %u, %u, %p\n", params->commandBuffer, params->firstViewport, params->viewportCount, params->pViewportWScalings); - params->commandBuffer->device->funcs.p_vkCmdSetViewportWScalingNV(params->commandBuffer->command_buffer, params->firstViewport, params->viewportCount, params->pViewportWScalings); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdSetViewportWScalingNV(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->firstViewport, params->viewportCount, params->pViewportWScalings); return STATUS_SUCCESS; }
@@ -7204,7 +7204,7 @@ static NTSTATUS wine_vkCmdSetViewportWithCount(void *args) { struct vkCmdSetViewportWithCount_params *params = args; TRACE("%p, %u, %p\n", params->commandBuffer, params->viewportCount, params->pViewports); - params->commandBuffer->device->funcs.p_vkCmdSetViewportWithCount(params->commandBuffer->command_buffer, params->viewportCount, params->pViewports); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdSetViewportWithCount(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->viewportCount, params->pViewports); return STATUS_SUCCESS; }
@@ -7212,7 +7212,7 @@ static NTSTATUS wine_vkCmdSetViewportWithCountEXT(void *args) { struct vkCmdSetViewportWithCountEXT_params *params = args; TRACE("%p, %u, %p\n", params->commandBuffer, params->viewportCount, params->pViewports); - params->commandBuffer->device->funcs.p_vkCmdSetViewportWithCountEXT(params->commandBuffer->command_buffer, params->viewportCount, params->pViewports); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdSetViewportWithCountEXT(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->viewportCount, params->pViewports); return STATUS_SUCCESS; }
@@ -7220,7 +7220,7 @@ static NTSTATUS wine_vkCmdSubpassShadingHUAWEI(void *args) { struct vkCmdSubpassShadingHUAWEI_params *params = args; TRACE("%p\n", params->commandBuffer); - params->commandBuffer->device->funcs.p_vkCmdSubpassShadingHUAWEI(params->commandBuffer->command_buffer); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdSubpassShadingHUAWEI(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer); return STATUS_SUCCESS; }
@@ -7228,7 +7228,7 @@ static NTSTATUS wine_vkCmdTraceRaysIndirect2KHR(void *args) { struct vkCmdTraceRaysIndirect2KHR_params *params = args; TRACE("%p, 0x%s\n", params->commandBuffer, wine_dbgstr_longlong(params->indirectDeviceAddress)); - params->commandBuffer->device->funcs.p_vkCmdTraceRaysIndirect2KHR(params->commandBuffer->command_buffer, params->indirectDeviceAddress); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdTraceRaysIndirect2KHR(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->indirectDeviceAddress); return STATUS_SUCCESS; }
@@ -7246,12 +7246,12 @@ static NTSTATUS wine_vkCmdTraceRaysIndirectKHR(void *args) convert_VkStridedDeviceAddressRegionKHR_win_to_host(params->pMissShaderBindingTable, &pMissShaderBindingTable_host); convert_VkStridedDeviceAddressRegionKHR_win_to_host(params->pHitShaderBindingTable, &pHitShaderBindingTable_host); convert_VkStridedDeviceAddressRegionKHR_win_to_host(params->pCallableShaderBindingTable, &pCallableShaderBindingTable_host); - params->commandBuffer->device->funcs.p_vkCmdTraceRaysIndirectKHR(params->commandBuffer->command_buffer, &pRaygenShaderBindingTable_host, &pMissShaderBindingTable_host, &pHitShaderBindingTable_host, &pCallableShaderBindingTable_host, params->indirectDeviceAddress); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdTraceRaysIndirectKHR(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, &pRaygenShaderBindingTable_host, &pMissShaderBindingTable_host, &pHitShaderBindingTable_host, &pCallableShaderBindingTable_host, params->indirectDeviceAddress);
return STATUS_SUCCESS; #else TRACE("%p, %p, %p, %p, %p, 0x%s\n", params->commandBuffer, params->pRaygenShaderBindingTable, params->pMissShaderBindingTable, params->pHitShaderBindingTable, params->pCallableShaderBindingTable, wine_dbgstr_longlong(params->indirectDeviceAddress)); - params->commandBuffer->device->funcs.p_vkCmdTraceRaysIndirectKHR(params->commandBuffer->command_buffer, params->pRaygenShaderBindingTable, params->pMissShaderBindingTable, params->pHitShaderBindingTable, params->pCallableShaderBindingTable, params->indirectDeviceAddress); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdTraceRaysIndirectKHR(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->pRaygenShaderBindingTable, params->pMissShaderBindingTable, params->pHitShaderBindingTable, params->pCallableShaderBindingTable, params->indirectDeviceAddress); return STATUS_SUCCESS; #endif } @@ -7270,12 +7270,12 @@ static NTSTATUS wine_vkCmdTraceRaysKHR(void *args) convert_VkStridedDeviceAddressRegionKHR_win_to_host(params->pMissShaderBindingTable, &pMissShaderBindingTable_host); convert_VkStridedDeviceAddressRegionKHR_win_to_host(params->pHitShaderBindingTable, &pHitShaderBindingTable_host); convert_VkStridedDeviceAddressRegionKHR_win_to_host(params->pCallableShaderBindingTable, &pCallableShaderBindingTable_host); - params->commandBuffer->device->funcs.p_vkCmdTraceRaysKHR(params->commandBuffer->command_buffer, &pRaygenShaderBindingTable_host, &pMissShaderBindingTable_host, &pHitShaderBindingTable_host, &pCallableShaderBindingTable_host, params->width, params->height, params->depth); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdTraceRaysKHR(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, &pRaygenShaderBindingTable_host, &pMissShaderBindingTable_host, &pHitShaderBindingTable_host, &pCallableShaderBindingTable_host, params->width, params->height, params->depth);
return STATUS_SUCCESS; #else TRACE("%p, %p, %p, %p, %p, %u, %u, %u\n", params->commandBuffer, params->pRaygenShaderBindingTable, params->pMissShaderBindingTable, params->pHitShaderBindingTable, params->pCallableShaderBindingTable, params->width, params->height, params->depth); - params->commandBuffer->device->funcs.p_vkCmdTraceRaysKHR(params->commandBuffer->command_buffer, params->pRaygenShaderBindingTable, params->pMissShaderBindingTable, params->pHitShaderBindingTable, params->pCallableShaderBindingTable, params->width, params->height, params->depth); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdTraceRaysKHR(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->pRaygenShaderBindingTable, params->pMissShaderBindingTable, params->pHitShaderBindingTable, params->pCallableShaderBindingTable, params->width, params->height, params->depth); return STATUS_SUCCESS; #endif } @@ -7284,7 +7284,7 @@ static NTSTATUS wine_vkCmdTraceRaysNV(void *args) { struct vkCmdTraceRaysNV_params *params = args; TRACE("%p, 0x%s, 0x%s, 0x%s, 0x%s, 0x%s, 0x%s, 0x%s, 0x%s, 0x%s, 0x%s, 0x%s, %u, %u, %u\n", params->commandBuffer, wine_dbgstr_longlong(params->raygenShaderBindingTableBuffer), wine_dbgstr_longlong(params->raygenShaderBindingOffset), wine_dbgstr_longlong(params->missShaderBindingTableBuffer), wine_dbgstr_longlong(params->missShaderBindingOffset), wine_dbgstr_longlong(params->missShaderBindingStride), wine_dbgstr_longlong(params->hitShaderBindingTableBuffer), wine_dbgstr_longlong(params->hitShaderBindingOffset), wine_dbgstr_longlong(params->hitShaderBindingStride), wine_dbgstr_longlong(params->callableShaderBindingTableBuffer), wine_dbgstr_longlong(params->callableShaderBindingOffset), wine_dbgstr_longlong(params->callableShaderBindingStride), params->width, params->height, params->depth); - params->commandBuffer->device->funcs.p_vkCmdTraceRaysNV(params->commandBuffer->command_buffer, params->raygenShaderBindingTableBuffer, params->raygenShaderBindingOffset, params->missShaderBindingTableBuffer, params->missShaderBindingOffset, params->missShaderBindingStride, params->hitShaderBindingTableBuffer, params->hitShaderBindingOffset, params->hitShaderBindingStride, params->callableShaderBindingTableBuffer, params->callableShaderBindingOffset, params->callableShaderBindingStride, params->width, params->height, params->depth); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdTraceRaysNV(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->raygenShaderBindingTableBuffer, params->raygenShaderBindingOffset, params->missShaderBindingTableBuffer, params->missShaderBindingOffset, params->missShaderBindingStride, params->hitShaderBindingTableBuffer, params->hitShaderBindingOffset, params->hitShaderBindingStride, params->callableShaderBindingTableBuffer, params->callableShaderBindingOffset, params->callableShaderBindingStride, params->width, params->height, params->depth); return STATUS_SUCCESS; }
@@ -7292,7 +7292,7 @@ static NTSTATUS wine_vkCmdUpdateBuffer(void *args) { struct vkCmdUpdateBuffer_params *params = args; TRACE("%p, 0x%s, 0x%s, 0x%s, %p\n", params->commandBuffer, wine_dbgstr_longlong(params->dstBuffer), wine_dbgstr_longlong(params->dstOffset), wine_dbgstr_longlong(params->dataSize), params->pData); - params->commandBuffer->device->funcs.p_vkCmdUpdateBuffer(params->commandBuffer->command_buffer, params->dstBuffer, params->dstOffset, params->dataSize, params->pData); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdUpdateBuffer(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->dstBuffer, params->dstOffset, params->dataSize, params->pData); return STATUS_SUCCESS; }
@@ -7306,14 +7306,14 @@ static NTSTATUS wine_vkCmdWaitEvents(void *args)
pBufferMemoryBarriers_host = convert_VkBufferMemoryBarrier_array_win_to_host(params->pBufferMemoryBarriers, params->bufferMemoryBarrierCount); pImageMemoryBarriers_host = convert_VkImageMemoryBarrier_array_win_to_host(params->pImageMemoryBarriers, params->imageMemoryBarrierCount); - params->commandBuffer->device->funcs.p_vkCmdWaitEvents(params->commandBuffer->command_buffer, params->eventCount, params->pEvents, params->srcStageMask, params->dstStageMask, params->memoryBarrierCount, params->pMemoryBarriers, params->bufferMemoryBarrierCount, pBufferMemoryBarriers_host, params->imageMemoryBarrierCount, pImageMemoryBarriers_host); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdWaitEvents(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->eventCount, params->pEvents, params->srcStageMask, params->dstStageMask, params->memoryBarrierCount, params->pMemoryBarriers, params->bufferMemoryBarrierCount, pBufferMemoryBarriers_host, params->imageMemoryBarrierCount, pImageMemoryBarriers_host);
free_VkBufferMemoryBarrier_array(pBufferMemoryBarriers_host, params->bufferMemoryBarrierCount); free_VkImageMemoryBarrier_array(pImageMemoryBarriers_host, params->imageMemoryBarrierCount); return STATUS_SUCCESS; #else TRACE("%p, %u, %p, %#x, %#x, %u, %p, %u, %p, %u, %p\n", params->commandBuffer, params->eventCount, params->pEvents, params->srcStageMask, params->dstStageMask, params->memoryBarrierCount, params->pMemoryBarriers, params->bufferMemoryBarrierCount, params->pBufferMemoryBarriers, params->imageMemoryBarrierCount, params->pImageMemoryBarriers); - params->commandBuffer->device->funcs.p_vkCmdWaitEvents(params->commandBuffer->command_buffer, params->eventCount, params->pEvents, params->srcStageMask, params->dstStageMask, params->memoryBarrierCount, params->pMemoryBarriers, params->bufferMemoryBarrierCount, params->pBufferMemoryBarriers, params->imageMemoryBarrierCount, params->pImageMemoryBarriers); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdWaitEvents(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->eventCount, params->pEvents, params->srcStageMask, params->dstStageMask, params->memoryBarrierCount, params->pMemoryBarriers, params->bufferMemoryBarrierCount, params->pBufferMemoryBarriers, params->imageMemoryBarrierCount, params->pImageMemoryBarriers); return STATUS_SUCCESS; #endif } @@ -7326,13 +7326,13 @@ static NTSTATUS wine_vkCmdWaitEvents2(void *args) TRACE("%p, %u, %p, %p\n", params->commandBuffer, params->eventCount, params->pEvents, params->pDependencyInfos);
pDependencyInfos_host = convert_VkDependencyInfo_array_win_to_host(params->pDependencyInfos, params->eventCount); - params->commandBuffer->device->funcs.p_vkCmdWaitEvents2(params->commandBuffer->command_buffer, params->eventCount, params->pEvents, pDependencyInfos_host); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdWaitEvents2(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->eventCount, params->pEvents, pDependencyInfos_host);
free_VkDependencyInfo_array(pDependencyInfos_host, params->eventCount); return STATUS_SUCCESS; #else TRACE("%p, %u, %p, %p\n", params->commandBuffer, params->eventCount, params->pEvents, params->pDependencyInfos); - params->commandBuffer->device->funcs.p_vkCmdWaitEvents2(params->commandBuffer->command_buffer, params->eventCount, params->pEvents, params->pDependencyInfos); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdWaitEvents2(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->eventCount, params->pEvents, params->pDependencyInfos); return STATUS_SUCCESS; #endif } @@ -7345,13 +7345,13 @@ static NTSTATUS wine_vkCmdWaitEvents2KHR(void *args) TRACE("%p, %u, %p, %p\n", params->commandBuffer, params->eventCount, params->pEvents, params->pDependencyInfos);
pDependencyInfos_host = convert_VkDependencyInfo_array_win_to_host(params->pDependencyInfos, params->eventCount); - params->commandBuffer->device->funcs.p_vkCmdWaitEvents2KHR(params->commandBuffer->command_buffer, params->eventCount, params->pEvents, pDependencyInfos_host); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdWaitEvents2KHR(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->eventCount, params->pEvents, pDependencyInfos_host);
free_VkDependencyInfo_array(pDependencyInfos_host, params->eventCount); return STATUS_SUCCESS; #else TRACE("%p, %u, %p, %p\n", params->commandBuffer, params->eventCount, params->pEvents, params->pDependencyInfos); - params->commandBuffer->device->funcs.p_vkCmdWaitEvents2KHR(params->commandBuffer->command_buffer, params->eventCount, params->pEvents, params->pDependencyInfos); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdWaitEvents2KHR(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->eventCount, params->pEvents, params->pDependencyInfos); return STATUS_SUCCESS; #endif } @@ -7360,7 +7360,7 @@ static NTSTATUS wine_vkCmdWriteAccelerationStructuresPropertiesKHR(void *args) { struct vkCmdWriteAccelerationStructuresPropertiesKHR_params *params = args; TRACE("%p, %u, %p, %#x, 0x%s, %u\n", params->commandBuffer, params->accelerationStructureCount, params->pAccelerationStructures, params->queryType, wine_dbgstr_longlong(params->queryPool), params->firstQuery); - params->commandBuffer->device->funcs.p_vkCmdWriteAccelerationStructuresPropertiesKHR(params->commandBuffer->command_buffer, params->accelerationStructureCount, params->pAccelerationStructures, params->queryType, params->queryPool, params->firstQuery); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdWriteAccelerationStructuresPropertiesKHR(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->accelerationStructureCount, params->pAccelerationStructures, params->queryType, params->queryPool, params->firstQuery); return STATUS_SUCCESS; }
@@ -7368,7 +7368,7 @@ static NTSTATUS wine_vkCmdWriteAccelerationStructuresPropertiesNV(void *args) { struct vkCmdWriteAccelerationStructuresPropertiesNV_params *params = args; TRACE("%p, %u, %p, %#x, 0x%s, %u\n", params->commandBuffer, params->accelerationStructureCount, params->pAccelerationStructures, params->queryType, wine_dbgstr_longlong(params->queryPool), params->firstQuery); - params->commandBuffer->device->funcs.p_vkCmdWriteAccelerationStructuresPropertiesNV(params->commandBuffer->command_buffer, params->accelerationStructureCount, params->pAccelerationStructures, params->queryType, params->queryPool, params->firstQuery); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdWriteAccelerationStructuresPropertiesNV(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->accelerationStructureCount, params->pAccelerationStructures, params->queryType, params->queryPool, params->firstQuery); return STATUS_SUCCESS; }
@@ -7376,7 +7376,7 @@ static NTSTATUS wine_vkCmdWriteBufferMarker2AMD(void *args) { struct vkCmdWriteBufferMarker2AMD_params *params = args; TRACE("%p, 0x%s, 0x%s, 0x%s, %u\n", params->commandBuffer, wine_dbgstr_longlong(params->stage), wine_dbgstr_longlong(params->dstBuffer), wine_dbgstr_longlong(params->dstOffset), params->marker); - params->commandBuffer->device->funcs.p_vkCmdWriteBufferMarker2AMD(params->commandBuffer->command_buffer, params->stage, params->dstBuffer, params->dstOffset, params->marker); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdWriteBufferMarker2AMD(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->stage, params->dstBuffer, params->dstOffset, params->marker); return STATUS_SUCCESS; }
@@ -7384,7 +7384,7 @@ static NTSTATUS wine_vkCmdWriteBufferMarkerAMD(void *args) { struct vkCmdWriteBufferMarkerAMD_params *params = args; TRACE("%p, %#x, 0x%s, 0x%s, %u\n", params->commandBuffer, params->pipelineStage, wine_dbgstr_longlong(params->dstBuffer), wine_dbgstr_longlong(params->dstOffset), params->marker); - params->commandBuffer->device->funcs.p_vkCmdWriteBufferMarkerAMD(params->commandBuffer->command_buffer, params->pipelineStage, params->dstBuffer, params->dstOffset, params->marker); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdWriteBufferMarkerAMD(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->pipelineStage, params->dstBuffer, params->dstOffset, params->marker); return STATUS_SUCCESS; }
@@ -7392,7 +7392,7 @@ static NTSTATUS wine_vkCmdWriteTimestamp(void *args) { struct vkCmdWriteTimestamp_params *params = args; TRACE("%p, %#x, 0x%s, %u\n", params->commandBuffer, params->pipelineStage, wine_dbgstr_longlong(params->queryPool), params->query); - params->commandBuffer->device->funcs.p_vkCmdWriteTimestamp(params->commandBuffer->command_buffer, params->pipelineStage, params->queryPool, params->query); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdWriteTimestamp(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->pipelineStage, params->queryPool, params->query); return STATUS_SUCCESS; }
@@ -7400,7 +7400,7 @@ static NTSTATUS wine_vkCmdWriteTimestamp2(void *args) { struct vkCmdWriteTimestamp2_params *params = args; TRACE("%p, 0x%s, 0x%s, %u\n", params->commandBuffer, wine_dbgstr_longlong(params->stage), wine_dbgstr_longlong(params->queryPool), params->query); - params->commandBuffer->device->funcs.p_vkCmdWriteTimestamp2(params->commandBuffer->command_buffer, params->stage, params->queryPool, params->query); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdWriteTimestamp2(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->stage, params->queryPool, params->query); return STATUS_SUCCESS; }
@@ -7408,7 +7408,7 @@ static NTSTATUS wine_vkCmdWriteTimestamp2KHR(void *args) { struct vkCmdWriteTimestamp2KHR_params *params = args; TRACE("%p, 0x%s, 0x%s, %u\n", params->commandBuffer, wine_dbgstr_longlong(params->stage), wine_dbgstr_longlong(params->queryPool), params->query); - params->commandBuffer->device->funcs.p_vkCmdWriteTimestamp2KHR(params->commandBuffer->command_buffer, params->stage, params->queryPool, params->query); + wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkCmdWriteTimestamp2KHR(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->stage, params->queryPool, params->query); return STATUS_SUCCESS; }
@@ -8207,7 +8207,7 @@ static NTSTATUS wine_vkEndCommandBuffer(void *args) { struct vkEndCommandBuffer_params *params = args; TRACE("%p\n", params->commandBuffer); - return params->commandBuffer->device->funcs.p_vkEndCommandBuffer(params->commandBuffer->command_buffer); + return wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkEndCommandBuffer(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer); }
static NTSTATUS wine_vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR(void *args) @@ -9754,7 +9754,7 @@ static NTSTATUS wine_vkResetCommandBuffer(void *args) { struct vkResetCommandBuffer_params *params = args; TRACE("%p, %#x\n", params->commandBuffer, params->flags); - return params->commandBuffer->device->funcs.p_vkResetCommandBuffer(params->commandBuffer->command_buffer, params->flags); + return wine_cmd_buffer_from_handle(params->commandBuffer)->device->funcs.p_vkResetCommandBuffer(wine_cmd_buffer_from_handle(params->commandBuffer)->command_buffer, params->flags); }
static NTSTATUS wine_vkResetCommandPool(void *args) @@ -10327,7 +10327,7 @@ uint64_t wine_vk_unwrap_handle(VkObjectType type, uint64_t handle) switch(type) { case VK_OBJECT_TYPE_COMMAND_BUFFER: - return (uint64_t) (uintptr_t) ((VkCommandBuffer) (uintptr_t) handle)->command_buffer; + return (uint64_t) (uintptr_t) wine_cmd_buffer_from_handle(((VkCommandBuffer) (uintptr_t) handle))->command_buffer; case VK_OBJECT_TYPE_COMMAND_POOL: return (uint64_t) wine_cmd_pool_from_handle(handle)->command_pool; case VK_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT:
On Tue Sep 6 19:22:58 2022 +0000, Alexandre Julliard wrote:
This is breaking tests here:
tools/runtest -q -P wine -T . -M vulkan-1.dll -p dlls/vulkan-1/tests/vulkan-1_test.exe vulkan && touch dlls/vulkan-1/tests/vulkan.ok wine: Unhandled page fault on read access to 00000008 at address 682C43C8 (thread 016c), starting debugger... Unhandled exception: page fault on read access to 0x00000008 in 32-bit code (0x682c43c8). Register dump: CS:0023 SS:002b DS:002b ES:002b FS:0063 GS:006b EIP:682c43c8 ESP:0064fc10 EBP:0064fc78 EFLAGS:00010202( R- -- I - - - ) EAX:00000000 EBX:00000000 ECX:0064fc90 EDX:00000000 ESI:00000000 EDI:00137d60 Stack dump: 0x0064fc10: 00d705a0 00000000 000000fd 0064fc4c 0x0064fc20: 00d704e8 00137d60 0064fc68 00000000 0x0064fc30: 00d705a8 0064fc4c 00000000 00d70570 0x0064fc40: 00130000 00000000 00d70598 00d70570 0x0064fc50: 00d705a0 00000000 00000000 0064fc48 0x0064fc60: 00d704e8 00137d60 0064fc90 00000000 Backtrace: =>0 0x682c43c8 vkDestroyCommandPool+0x28(device=<internal error>, handle=<internal error>, allocator=<internal error>) [Z:\home\julliard\wine\wine\dlls\winevulkan\loader.c:527] in winevulkan (0x0064fc78) 1 0x004020f2 test_destroy_command_pool+0x162(vk_physical_device=00D704E8) [Z:\home\julliard\wine\wine\dlls\vulkan-1\tests\vulkan.c:346] in vulkan-1_test (0x0064fcf8) 2 0x00403694 for_each_device_instance+0x164(extension_count=<internal error>, enabled_extensions=<internal error>, test_func_instance=00000000, test_func=00401F90) [Z:\home\julliard\wine\wine\dlls\vulkan-1\tests\vulkan.c:905] in vulkan-1_test (0x0064fd48) 3 0x00403bd3 create_instance(test_func=<internal error>) [Z:\home\julliard\wine\wine\dlls\vulkan-1\tests\vulkan.c:920] in vulkan-1_test (0x0064fdb8) 4 0x00403bd3 test_unsupported_instance_extensions(test_func=<internal error>) [Z:\home\julliard\wine\wine\dlls\vulkan-1\tests\vulkan.c:920] in vulkan-1_test (0x0064fdb8) 5 0x00403bd3 func_vulkan+0x4c3() [Z:\home\julliard\wine\wine\dlls\vulkan-1\tests\vulkan.c:920] in vulkan-1_test (0x0064fdb8) 6 0x00403f53 run_test+0xe3(name="vulkan") [Z:\home\julliard\wine\wine\include\wine\test.h:674] in vulkan-1_test (0x0064fe18) 7 0x00405aa9 main+0x1f9(argc=<internal error>, argv=<internal error>) [Z:\home\julliard\wine\wine\include\wine\test.h:780] in vulkan-1_test (0x0064fee8) 8 0x0040585f mainCRTStartup+0x7f() [Z:\home\julliard\wine\wine\dlls\msvcrt\crt_main.c:60] in vulkan-1_test (0x0064ff30) 9 0x7b62a2f0 in kernel32 (+0x2a2f0) (0x0064ff48) 10 0x7bc5c7d7 in ntdll (+0x5c7d7) (0x0064ff5c) 11 0x7bc5ceb0 RtlCreateUserThread(entry=004057E0, arg=7FFD1000) [Z:\home\julliard\wine\wine\dlls\ntdll\thread.c:261] in ntdll (0x0064ffec) 0x682c43c8 vkDestroyCommandPool+0x28 [Z:\home\julliard\wine\wine\dlls\winevulkan\loader.c:527] in winevulkan: movl 0x8(%esi),%eax 527 LIST_FOR_EACH_ENTRY_SAFE(buffer, cursor, &cmd_pool->command_buffers, struct VkCommandBuffer_T, pool_link)
Sorry about that, the new version should fix it.