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 -#include #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 +#include #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: