From: Rémi Bernon rbernon@codeweavers.com
--- dlls/winevulkan/make_vulkan | 4 +- dlls/winevulkan/vulkan.c | 247 +++++++++++++++++-------------- dlls/winevulkan/vulkan_private.h | 12 +- dlls/winevulkan/vulkan_thunks.c | 150 +++++++++---------- include/wine/vulkan_driver.h | 17 ++- 5 files changed, 229 insertions(+), 201 deletions(-)
diff --git a/dlls/winevulkan/make_vulkan b/dlls/winevulkan/make_vulkan index 83f9ed5702e..679cf886bef 100755 --- a/dlls/winevulkan/make_vulkan +++ b/dlls/winevulkan/make_vulkan @@ -1146,7 +1146,7 @@ class VkHandle(object): elif self.name == "VkDevice": return "wine_device_from_handle({0})->funcs".format(param) elif self.name == "VkPhysicalDevice": - return "wine_phys_dev_from_handle({0})->instance->funcs".format(param) + return "vulkan_physical_device_from_handle({0})->instance->funcs".format(param) elif self.name == "VkQueue": return "wine_queue_from_handle({0})->device->funcs".format(param) elif self.parent in ["VkInstance", "VkPhysicalDevice"]: @@ -1197,7 +1197,7 @@ class VkHandle(object): if self.name == "VkDeviceMemory": return "wine_device_memory_from_handle({0})->host_memory".format(name) if self.name == "VkPhysicalDevice": - return "wine_phys_dev_from_handle({0})->host_physical_device".format(name) + return "vulkan_physical_device_from_handle({0})->host.physical_device".format(name) if self.name == "VkQueue": return "wine_queue_from_handle({0})->host_queue".format(name) if self.name == "VkSurfaceKHR": diff --git a/dlls/winevulkan/vulkan.c b/dlls/winevulkan/vulkan.c index caf20355f25..b70784da759 100644 --- a/dlls/winevulkan/vulkan.c +++ b/dlls/winevulkan/vulkan.c @@ -356,7 +356,7 @@ static void wine_phys_dev_cleanup(struct wine_phys_dev *phys_dev) free(phys_dev->extensions); }
-static VkResult wine_vk_physical_device_init(struct wine_phys_dev *object, VkPhysicalDevice host_handle, +static VkResult wine_vk_physical_device_init(struct wine_phys_dev *object, VkPhysicalDevice host_physical_device, VkPhysicalDevice client_physical_device, struct vulkan_instance *instance) { BOOL have_memory_placed = FALSE, have_map_memory2 = FALSE; @@ -366,15 +366,15 @@ static VkResult wine_vk_physical_device_init(struct wine_phys_dev *object, VkPhy VkResult res; unsigned int i, j;
- object->instance = instance; - object->handle = client_physical_device; - object->host_physical_device = host_handle; + object->obj.instance = instance; + object->obj.client.physical_device = client_physical_device; + object->obj.host.physical_device = host_physical_device;
client_physical_device->obj.unix_handle = (uintptr_t)object;
- instance->funcs.p_vkGetPhysicalDeviceMemoryProperties(host_handle, &object->memory_properties); + instance->funcs.p_vkGetPhysicalDeviceMemoryProperties(host_physical_device, &object->memory_properties);
- res = instance->funcs.p_vkEnumerateDeviceExtensionProperties(host_handle, + res = instance->funcs.p_vkEnumerateDeviceExtensionProperties(host_physical_device, NULL, &num_host_properties, NULL); if (res != VK_SUCCESS) { @@ -389,7 +389,7 @@ static VkResult wine_vk_physical_device_init(struct wine_phys_dev *object, VkPhy goto err; }
- res = instance->funcs.p_vkEnumerateDeviceExtensionProperties(host_handle, + res = instance->funcs.p_vkEnumerateDeviceExtensionProperties(host_physical_device, NULL, &num_host_properties, host_properties); if (res != VK_SUCCESS) { @@ -449,7 +449,7 @@ static VkResult wine_vk_physical_device_init(struct wine_phys_dev *object, VkPhy .pNext = &map_placed_feature, };
- instance->funcs.p_vkGetPhysicalDeviceFeatures2KHR(host_handle, &features); + instance->funcs.p_vkGetPhysicalDeviceFeatures2KHR(host_physical_device, &features); if (map_placed_feature.memoryMapPlaced && map_placed_feature.memoryUnmapReserve) { VkPhysicalDeviceMapMemoryPlacedPropertiesEXT map_placed_props = @@ -462,7 +462,7 @@ static VkResult wine_vk_physical_device_init(struct wine_phys_dev *object, VkPhy .pNext = &map_placed_props, };
- instance->funcs.p_vkGetPhysicalDeviceProperties2(host_handle, &props); + instance->funcs.p_vkGetPhysicalDeviceProperties2(host_physical_device, &props); object->map_placed_align = map_placed_props.minPlacedMemoryMapAlignment; TRACE( "Using placed map with alignment %u\n", object->map_placed_align ); } @@ -479,7 +479,7 @@ static VkResult wine_vk_physical_device_init(struct wine_phys_dev *object, VkPhy .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2, .pNext = &host_mem_props, }; - instance->funcs.p_vkGetPhysicalDeviceProperties2KHR(host_handle, &props); + instance->funcs.p_vkGetPhysicalDeviceProperties2KHR(host_physical_device, &props); object->external_memory_align = host_mem_props.minImportedHostPointerAlignment; if (object->external_memory_align) TRACE("Using VK_EXT_external_memory_host for memory mapping with alignment: %u\n", @@ -498,6 +498,7 @@ err: static void wine_vk_free_command_buffers(struct wine_device *device, struct wine_cmd_pool *pool, uint32_t count, const VkCommandBuffer *buffers) { + struct vulkan_instance *instance = device->physical_device->instance; unsigned int i;
for (i = 0; i < count; i++) @@ -509,7 +510,7 @@ static void wine_vk_free_command_buffers(struct wine_device *device,
device->funcs.p_vkFreeCommandBuffers(device->host_device, pool->host_command_pool, 1, &buffer->host_command_buffer); - remove_handle_mapping(device->phys_dev->instance, &buffer->wrapper_entry); + remove_handle_mapping(instance, &buffer->wrapper_entry); buffer->handle->obj.unix_handle = 0; free(buffer); } @@ -570,9 +571,10 @@ static const char *find_extension(const char *const *extensions, uint32_t count, return NULL; }
-static VkResult wine_vk_device_convert_create_info(struct wine_phys_dev *phys_dev, +static VkResult wine_vk_device_convert_create_info(struct vulkan_physical_device *physical_device, struct conversion_context *ctx, const VkDeviceCreateInfo *src, VkDeviceCreateInfo *dst) { + struct wine_phys_dev *phys_dev = CONTAINING_RECORD(physical_device, struct wine_phys_dev, obj); const char *extra_extensions[2], * const*extensions = src->ppEnabledExtensionNames; unsigned int i, extra_count = 0, extensions_count = src->enabledExtensionCount;
@@ -759,7 +761,7 @@ static VkResult wine_vk_instance_convert_create_info(struct conversion_context * static VkResult wine_vk_instance_init_physical_devices(struct vulkan_instance *instance, struct wine_phys_dev *physical_devices, uint32_t *physical_device_count, VkInstance client_instance) { - VkPhysicalDevice *host_handles; + VkPhysicalDevice *host_physical_devices; uint32_t phys_dev_count; unsigned int i; VkResult res; @@ -780,13 +782,13 @@ static VkResult wine_vk_instance_init_physical_devices(struct vulkan_instance *i } client_instance->phys_dev_count = phys_dev_count;
- if (!(host_handles = calloc(phys_dev_count, sizeof(*host_handles)))) + if (!(host_physical_devices = calloc(phys_dev_count, sizeof(*host_physical_devices)))) return VK_ERROR_OUT_OF_HOST_MEMORY;
- res = instance->funcs.p_vkEnumeratePhysicalDevices(instance->host.instance, &phys_dev_count, host_handles); + res = instance->funcs.p_vkEnumeratePhysicalDevices(instance->host.instance, &phys_dev_count, host_physical_devices); if (res != VK_SUCCESS) { - free(host_handles); + free(host_physical_devices); return res; }
@@ -794,33 +796,33 @@ static VkResult wine_vk_instance_init_physical_devices(struct vulkan_instance *i for (i = 0; i < phys_dev_count; i++) { struct wine_phys_dev *phys_dev = physical_devices + i; - res = wine_vk_physical_device_init(phys_dev, host_handles[i], &client_instance->phys_devs[i], instance); + res = wine_vk_physical_device_init(phys_dev, host_physical_devices[i], &client_instance->phys_devs[i], instance); if (res != VK_SUCCESS) goto err; } *physical_device_count = phys_dev_count;
- free(host_handles); + free(host_physical_devices); return VK_SUCCESS;
err: while (i) wine_phys_dev_cleanup(&physical_devices[--i]); - free(host_handles); + free(host_physical_devices); return res; }
static struct wine_phys_dev *wine_vk_instance_wrap_physical_device(struct wine_phys_dev *physical_devices, - uint32_t physical_device_count, VkPhysicalDevice host_handle) + uint32_t physical_device_count, VkPhysicalDevice host_physical_device) { unsigned int i;
for (i = 0; i < physical_device_count; ++i) { struct wine_phys_dev *current = physical_devices + i; - if (current->host_physical_device == host_handle) return current; + if (current->obj.host.physical_device == host_physical_device) return current; }
- ERR("Unrecognized physical device %p.\n", host_handle); + ERR("Unrecognized physical device %p.\n", host_physical_device); return NULL; }
@@ -828,6 +830,7 @@ VkResult wine_vkAllocateCommandBuffers(VkDevice handle, const VkCommandBufferAll VkCommandBuffer *buffers ) { struct wine_device *device = wine_device_from_handle(handle); + struct vulkan_instance *instance = device->physical_device->instance; struct wine_cmd_buffer *buffer; struct wine_cmd_pool *pool; VkResult res = VK_SUCCESS; @@ -861,7 +864,7 @@ VkResult wine_vkAllocateCommandBuffers(VkDevice handle, const VkCommandBufferAll res = device->funcs.p_vkAllocateCommandBuffers(device->host_device, &allocate_info_host, &buffer->host_command_buffer); client_command_buffer->obj.unix_handle = (uintptr_t)buffer; - add_handle_mapping_ptr(device->phys_dev->instance, buffer->handle, buffer->host_command_buffer, &buffer->wrapper_entry); + add_handle_mapping_ptr(instance, buffer->handle, buffer->host_command_buffer, &buffer->wrapper_entry); if (res != VK_SUCCESS) { ERR("Failed to allocate command buffer, res=%d.\n", res); @@ -876,13 +879,13 @@ VkResult wine_vkAllocateCommandBuffers(VkDevice handle, const VkCommandBufferAll return res; }
-VkResult wine_vkCreateDevice(VkPhysicalDevice phys_dev_handle, const VkDeviceCreateInfo *create_info, +VkResult wine_vkCreateDevice(VkPhysicalDevice client_physical_device, const VkDeviceCreateInfo *create_info, const VkAllocationCallbacks *allocator, VkDevice *ret_device, void *client_ptr) { - struct wine_phys_dev *phys_dev = wine_phys_dev_from_handle(phys_dev_handle); - struct vulkan_instance *instance = phys_dev->instance; - VkDevice client_device = client_ptr; + struct vulkan_physical_device *physical_device = vulkan_physical_device_from_handle(client_physical_device); + struct vulkan_instance *instance = physical_device->instance; + VkDevice host_device, client_device = client_ptr; VkDeviceCreateInfo create_info_host; struct VkQueue_T *queue_handles; struct conversion_context ctx; @@ -897,7 +900,7 @@ VkResult wine_vkCreateDevice(VkPhysicalDevice phys_dev_handle, const VkDeviceCre { VkPhysicalDeviceProperties properties;
- instance->funcs.p_vkGetPhysicalDeviceProperties(phys_dev->host_physical_device, &properties); + instance->funcs.p_vkGetPhysicalDeviceProperties(physical_device->host.physical_device, &properties);
TRACE("Device name: %s.\n", debugstr_a(properties.deviceName)); TRACE("Vendor ID: %#x, Device ID: %#x.\n", properties.vendorID, properties.deviceID); @@ -911,13 +914,11 @@ VkResult wine_vkCreateDevice(VkPhysicalDevice phys_dev_handle, const VkDeviceCre if (!(object = calloc(1, offsetof(struct wine_device, queues[queue_count])))) return VK_ERROR_OUT_OF_HOST_MEMORY;
- object->phys_dev = phys_dev; - init_conversion_context(&ctx); - res = wine_vk_device_convert_create_info(phys_dev, &ctx, create_info, &create_info_host); + res = wine_vk_device_convert_create_info(physical_device, &ctx, create_info, &create_info_host); if (res == VK_SUCCESS) - res = instance->funcs.p_vkCreateDevice(phys_dev->host_physical_device, &create_info_host, - NULL /* allocator */, &object->host_device); + res = instance->funcs.p_vkCreateDevice(physical_device->host.physical_device, &create_info_host, + NULL /* allocator */, &host_device); free_conversion_context(&ctx); if (res != VK_SUCCESS) { @@ -926,6 +927,9 @@ VkResult wine_vkCreateDevice(VkPhysicalDevice phys_dev_handle, const VkDeviceCre return res; }
+ object->physical_device = physical_device; + object->host_device = host_device; + /* Just load all function pointers we are aware off. The loader takes care of filtering. * We use vkGetDeviceProcAddr as opposed to vkGetInstanceProcAddr for efficiency reasons * as functions pass through fewer dispatch tables within the loader. @@ -1039,7 +1043,7 @@ VkResult wine_vkCreateInstance(const VkInstanceCreateInfo *create_info, for (i = 0; i < instance->phys_dev_count; i++) { struct wine_phys_dev *phys_dev = &instance->phys_devs[i]; - add_handle_mapping_ptr(&instance->obj, phys_dev->handle, phys_dev->host_physical_device, &phys_dev->wrapper_entry); + add_handle_mapping_ptr(&instance->obj, phys_dev->obj.client.physical_device, phys_dev->obj.host.physical_device, &phys_dev->wrapper_entry); }
*ret = client_instance; @@ -1050,6 +1054,7 @@ VkResult wine_vkCreateInstance(const VkInstanceCreateInfo *create_info, void wine_vkDestroyDevice(VkDevice handle, const VkAllocationCallbacks *allocator) { struct wine_device *device = wine_device_from_handle(handle); + struct vulkan_instance *instance = device->physical_device->instance; unsigned int i;
if (allocator) @@ -1059,8 +1064,8 @@ void wine_vkDestroyDevice(VkDevice handle, const VkAllocationCallbacks *allocato
device->funcs.p_vkDestroyDevice(device->host_device, NULL /* pAllocator */); for (i = 0; i < device->queue_count; i++) - remove_handle_mapping(device->phys_dev->instance, &device->queues[i].wrapper_entry); - remove_handle_mapping(device->phys_dev->instance, &device->wrapper_entry); + remove_handle_mapping(instance, &device->queues[i].wrapper_entry); + remove_handle_mapping(instance, &device->wrapper_entry);
free(device); } @@ -1089,10 +1094,11 @@ void wine_vkDestroyInstance(VkInstance client_instance, const VkAllocationCallba free(instance); }
-VkResult wine_vkEnumerateDeviceExtensionProperties(VkPhysicalDevice phys_dev_handle, const char *layer_name, +VkResult wine_vkEnumerateDeviceExtensionProperties(VkPhysicalDevice client_physical_device, const char *layer_name, uint32_t *count, VkExtensionProperties *properties) { - struct wine_phys_dev *phys_dev = wine_phys_dev_from_handle(phys_dev_handle); + struct vulkan_physical_device *physical_device = vulkan_physical_device_from_handle(client_physical_device); + struct wine_phys_dev *phys_dev = CONTAINING_RECORD(physical_device, struct wine_phys_dev, obj);
/* This shouldn't get called with layer_name set, the ICD loader prevents it. */ if (layer_name) @@ -1178,7 +1184,7 @@ VkResult wine_vkEnumerateInstanceExtensionProperties(const char *name, uint32_t return *count < num_properties ? VK_INCOMPLETE : VK_SUCCESS; }
-VkResult wine_vkEnumerateDeviceLayerProperties(VkPhysicalDevice phys_dev, uint32_t *count, +VkResult wine_vkEnumerateDeviceLayerProperties(VkPhysicalDevice client_physical_device, uint32_t *count, VkLayerProperties *properties) { *count = 0; @@ -1205,13 +1211,13 @@ VkResult wine_vkEnumerateInstanceVersion(uint32_t *version) return res; }
-VkResult wine_vkEnumeratePhysicalDevices(VkInstance client_instance, uint32_t *count, VkPhysicalDevice *devices) +VkResult wine_vkEnumeratePhysicalDevices(VkInstance client_instance, uint32_t *count, VkPhysicalDevice *client_physical_devices) { struct vulkan_instance *obj = vulkan_instance_from_handle(client_instance); struct wine_instance *instance = CONTAINING_RECORD(obj, struct wine_instance, obj); unsigned int i;
- if (!devices) + if (!client_physical_devices) { *count = instance->phys_dev_count; return VK_SUCCESS; @@ -1220,7 +1226,7 @@ VkResult wine_vkEnumeratePhysicalDevices(VkInstance client_instance, uint32_t *c *count = min(*count, instance->phys_dev_count); for (i = 0; i < *count; i++) { - devices[i] = instance->phys_devs[i].handle; + client_physical_devices[i] = instance->phys_devs[i].obj.client.physical_device; }
TRACE("Returning %u devices.\n", *count); @@ -1284,6 +1290,7 @@ VkResult wine_vkCreateCommandPool(VkDevice device_handle, const VkCommandPoolCre void *client_ptr) { struct wine_device *device = wine_device_from_handle(device_handle); + struct vulkan_instance *instance = device->physical_device->instance; struct vk_command_pool *client_command_pool = client_ptr; struct wine_cmd_pool *object; VkResult res; @@ -1305,7 +1312,7 @@ VkResult wine_vkCreateCommandPool(VkDevice device_handle, const VkCommandPoolCre client_command_pool->obj.unix_handle = (uintptr_t)object;
*command_pool = object->handle; - add_handle_mapping(device->phys_dev->instance, *command_pool, object->host_command_pool, &object->wrapper_entry); + add_handle_mapping(instance, *command_pool, object->host_command_pool, &object->wrapper_entry); return VK_SUCCESS; }
@@ -1313,13 +1320,14 @@ void wine_vkDestroyCommandPool(VkDevice device_handle, VkCommandPool handle, const VkAllocationCallbacks *allocator) { struct wine_device *device = wine_device_from_handle(device_handle); + struct vulkan_instance *instance = device->physical_device->instance; struct wine_cmd_pool *pool = wine_cmd_pool_from_handle(handle);
if (allocator) FIXME("Support for allocation callbacks not implemented yet\n");
device->funcs.p_vkDestroyCommandPool(device->host_device, pool->host_command_pool, NULL); - remove_handle_mapping(device->phys_dev->instance, &pool->wrapper_entry); + remove_handle_mapping(instance, &pool->wrapper_entry); free(pool); }
@@ -1340,11 +1348,11 @@ static VkResult wine_vk_enumerate_physical_device_groups(struct vulkan_instance VkPhysicalDeviceGroupProperties *current = &properties[i]; for (j = 0; j < current->physicalDeviceCount; ++j) { - VkPhysicalDevice host_handle = current->physicalDevices[j]; - struct wine_phys_dev *phys_dev = wine_vk_instance_wrap_physical_device(instance->phys_devs, instance->phys_dev_count, host_handle); + VkPhysicalDevice host_physical_device = current->physicalDevices[j]; + struct wine_phys_dev *phys_dev = wine_vk_instance_wrap_physical_device(instance->phys_devs, instance->phys_dev_count, host_physical_device); if (!phys_dev) return VK_ERROR_INITIALIZATION_FAILED; - current->physicalDevices[j] = phys_dev->handle; + current->physicalDevices[j] = phys_dev->obj.client.physical_device; } }
@@ -1369,7 +1377,7 @@ VkResult wine_vkEnumeratePhysicalDeviceGroupsKHR(VkInstance client_instance, uin instance->funcs.p_vkEnumeratePhysicalDeviceGroupsKHR, count, properties); }
-void wine_vkGetPhysicalDeviceExternalFenceProperties(VkPhysicalDevice phys_dev, +void wine_vkGetPhysicalDeviceExternalFenceProperties(VkPhysicalDevice client_physical_device, const VkPhysicalDeviceExternalFenceInfo *fence_info, VkExternalFenceProperties *properties) { @@ -1378,7 +1386,7 @@ void wine_vkGetPhysicalDeviceExternalFenceProperties(VkPhysicalDevice phys_dev, properties->externalFenceFeatures = 0; }
-void wine_vkGetPhysicalDeviceExternalFencePropertiesKHR(VkPhysicalDevice phys_dev, +void wine_vkGetPhysicalDeviceExternalFencePropertiesKHR(VkPhysicalDevice client_physical_device, const VkPhysicalDeviceExternalFenceInfo *fence_info, VkExternalFenceProperties *properties) { @@ -1387,30 +1395,30 @@ void wine_vkGetPhysicalDeviceExternalFencePropertiesKHR(VkPhysicalDevice phys_de properties->externalFenceFeatures = 0; }
-void wine_vkGetPhysicalDeviceExternalBufferProperties(VkPhysicalDevice phys_dev, +void wine_vkGetPhysicalDeviceExternalBufferProperties(VkPhysicalDevice client_physical_device, const VkPhysicalDeviceExternalBufferInfo *buffer_info, VkExternalBufferProperties *properties) { memset(&properties->externalMemoryProperties, 0, sizeof(properties->externalMemoryProperties)); }
-void wine_vkGetPhysicalDeviceExternalBufferPropertiesKHR(VkPhysicalDevice phys_dev, +void wine_vkGetPhysicalDeviceExternalBufferPropertiesKHR(VkPhysicalDevice client_physical_device, const VkPhysicalDeviceExternalBufferInfo *buffer_info, VkExternalBufferProperties *properties) { memset(&properties->externalMemoryProperties, 0, sizeof(properties->externalMemoryProperties)); }
-VkResult wine_vkGetPhysicalDeviceImageFormatProperties2(VkPhysicalDevice phys_dev_handle, +VkResult wine_vkGetPhysicalDeviceImageFormatProperties2(VkPhysicalDevice client_physical_device, const VkPhysicalDeviceImageFormatInfo2 *format_info, VkImageFormatProperties2 *properties) { - struct wine_phys_dev *phys_dev = wine_phys_dev_from_handle(phys_dev_handle); + struct vulkan_physical_device *physical_device = vulkan_physical_device_from_handle(client_physical_device); + struct vulkan_instance *instance = physical_device->instance; VkExternalImageFormatProperties *external_image_properties; VkResult res;
- res = phys_dev->instance->funcs.p_vkGetPhysicalDeviceImageFormatProperties2(phys_dev->host_physical_device, - format_info, properties); + res = instance->funcs.p_vkGetPhysicalDeviceImageFormatProperties2(physical_device->host.physical_device, format_info, properties);
if ((external_image_properties = find_next_struct(properties, VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES))) @@ -1424,16 +1432,16 @@ VkResult wine_vkGetPhysicalDeviceImageFormatProperties2(VkPhysicalDevice phys_de return res; }
-VkResult wine_vkGetPhysicalDeviceImageFormatProperties2KHR(VkPhysicalDevice phys_dev_handle, +VkResult wine_vkGetPhysicalDeviceImageFormatProperties2KHR(VkPhysicalDevice client_physical_device, const VkPhysicalDeviceImageFormatInfo2 *format_info, VkImageFormatProperties2 *properties) { - struct wine_phys_dev *phys_dev = wine_phys_dev_from_handle(phys_dev_handle); + struct vulkan_physical_device *physical_device = vulkan_physical_device_from_handle(client_physical_device); + struct vulkan_instance *instance = physical_device->instance; VkExternalImageFormatProperties *external_image_properties; VkResult res;
- res = phys_dev->instance->funcs.p_vkGetPhysicalDeviceImageFormatProperties2KHR(phys_dev->host_physical_device, - format_info, properties); + res = instance->funcs.p_vkGetPhysicalDeviceImageFormatProperties2KHR(physical_device->host.physical_device, format_info, properties);
if ((external_image_properties = find_next_struct(properties, VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES))) @@ -1527,7 +1535,7 @@ static VkResult wine_vk_get_timestamps(struct wine_device *device, uint32_t time return res; }
-static VkResult wine_vk_get_time_domains(struct wine_phys_dev *phys_dev, +static VkResult wine_vk_get_time_domains(struct vulkan_physical_device *physical_device, uint32_t *time_domain_count, VkTimeDomainEXT *time_domains, VkResult (*get_domains)(VkPhysicalDevice, uint32_t *, VkTimeDomainEXT *)) @@ -1542,14 +1550,14 @@ static VkResult wine_vk_get_time_domains(struct wine_phys_dev *phys_dev, VkResult res;
/* Find out the time domains supported on the host */ - res = get_domains(phys_dev->host_physical_device, &host_time_domain_count, NULL); + res = get_domains(physical_device->host.physical_device, &host_time_domain_count, NULL); if (res != VK_SUCCESS) return res;
if (!(host_time_domains = malloc(sizeof(VkTimeDomainEXT) * host_time_domain_count))) return VK_ERROR_OUT_OF_HOST_MEMORY;
- res = get_domains(phys_dev->host_physical_device, &host_time_domain_count, host_time_domains); + res = get_domains(physical_device->host.physical_device, &host_time_domain_count, host_time_domains); if (res != VK_SUCCESS) { free(host_time_domains); @@ -1623,33 +1631,35 @@ VkResult wine_vkGetCalibratedTimestampsKHR(VkDevice handle, uint32_t timestamp_c device->funcs.p_vkGetCalibratedTimestampsKHR); }
-VkResult wine_vkGetPhysicalDeviceCalibrateableTimeDomainsEXT(VkPhysicalDevice handle, +VkResult wine_vkGetPhysicalDeviceCalibrateableTimeDomainsEXT(VkPhysicalDevice client_physical_device, uint32_t *time_domain_count, VkTimeDomainEXT *time_domains) { - struct wine_phys_dev *phys_dev = wine_phys_dev_from_handle(handle); + struct vulkan_physical_device *physical_device = vulkan_physical_device_from_handle(client_physical_device); + struct vulkan_instance *instance = physical_device->instance;
- TRACE("%p, %p, %p\n", phys_dev, time_domain_count, time_domains); + TRACE("%p, %p, %p\n", physical_device, time_domain_count, time_domains);
- return wine_vk_get_time_domains(phys_dev, time_domain_count, time_domains, - phys_dev->instance->funcs.p_vkGetPhysicalDeviceCalibrateableTimeDomainsEXT); + return wine_vk_get_time_domains(physical_device, time_domain_count, time_domains, + instance->funcs.p_vkGetPhysicalDeviceCalibrateableTimeDomainsEXT); }
-VkResult wine_vkGetPhysicalDeviceCalibrateableTimeDomainsKHR(VkPhysicalDevice handle, +VkResult wine_vkGetPhysicalDeviceCalibrateableTimeDomainsKHR(VkPhysicalDevice client_physical_device, uint32_t *time_domain_count, VkTimeDomainKHR *time_domains) { - struct wine_phys_dev *phys_dev = wine_phys_dev_from_handle(handle); + struct vulkan_physical_device *physical_device = vulkan_physical_device_from_handle(client_physical_device); + struct vulkan_instance *instance = physical_device->instance;
- TRACE("%p, %p, %p\n", phys_dev, time_domain_count, time_domains); + TRACE("%p, %p, %p\n", physical_device, time_domain_count, time_domains);
- return wine_vk_get_time_domains(phys_dev, time_domain_count, time_domains, - phys_dev->instance->funcs.p_vkGetPhysicalDeviceCalibrateableTimeDomainsKHR); + return wine_vk_get_time_domains(physical_device, time_domain_count, time_domains, + instance->funcs.p_vkGetPhysicalDeviceCalibrateableTimeDomainsKHR); }
-void wine_vkGetPhysicalDeviceExternalSemaphoreProperties(VkPhysicalDevice phys_dev, +void wine_vkGetPhysicalDeviceExternalSemaphoreProperties(VkPhysicalDevice client_physical_device, const VkPhysicalDeviceExternalSemaphoreInfo *info, VkExternalSemaphoreProperties *properties) { @@ -1658,7 +1668,7 @@ void wine_vkGetPhysicalDeviceExternalSemaphoreProperties(VkPhysicalDevice phys_d properties->externalSemaphoreFeatures = 0; }
-void wine_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR(VkPhysicalDevice phys_dev, +void wine_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR(VkPhysicalDevice client_physical_device, const VkPhysicalDeviceExternalSemaphoreInfo *info, VkExternalSemaphoreProperties *properties) { @@ -1784,7 +1794,7 @@ VkResult wine_vkCreateSwapchainKHR(VkDevice device_handle, const VkSwapchainCrea struct wine_swapchain *object, *old_swapchain = wine_swapchain_from_handle(create_info->oldSwapchain); struct wine_surface *surface = wine_surface_from_handle(create_info->surface); struct wine_device *device = wine_device_from_handle(device_handle); - struct wine_phys_dev *physical_device = device->phys_dev; + struct vulkan_physical_device *physical_device = device->physical_device; struct vulkan_instance *instance = physical_device->instance; VkSwapchainCreateInfoKHR create_info_host = *create_info; VkSurfaceCapabilitiesKHR capabilities; @@ -1803,7 +1813,7 @@ VkResult wine_vkCreateSwapchainKHR(VkDevice device_handle, const VkSwapchainCrea vk_funcs->p_vulkan_surface_update( surface->driver_surface );
/* Windows allows client rect to be empty, but host Vulkan often doesn't, adjust extents back to the host capabilities */ - res = instance->funcs.p_vkGetPhysicalDeviceSurfaceCapabilitiesKHR(physical_device->host_physical_device, + res = instance->funcs.p_vkGetPhysicalDeviceSurfaceCapabilitiesKHR(physical_device->host.physical_device, surface->host_surface, &capabilities); if (res != VK_SUCCESS) return res;
@@ -1830,13 +1840,14 @@ void wine_vkDestroySwapchainKHR(VkDevice device_handle, VkSwapchainKHR swapchain const VkAllocationCallbacks *allocator) { struct wine_device *device = wine_device_from_handle(device_handle); + struct vulkan_instance *instance = device->physical_device->instance; struct wine_swapchain *swapchain = wine_swapchain_from_handle(swapchain_handle);
if (allocator) FIXME("Support for allocation callbacks not implemented yet\n"); if (!swapchain) return;
device->funcs.p_vkDestroySwapchainKHR(device->host_device, swapchain->host_swapchain, NULL); - remove_handle_mapping(device->phys_dev->instance, &swapchain->wrapper_entry); + remove_handle_mapping(instance, &swapchain->wrapper_entry);
free(swapchain); } @@ -1927,6 +1938,8 @@ VkResult wine_vkAllocateMemory(VkDevice handle, const VkMemoryAllocateInfo *allo const VkAllocationCallbacks *allocator, VkDeviceMemory *ret) { struct wine_device *device = wine_device_from_handle(handle); + struct wine_phys_dev *physical_device = CONTAINING_RECORD(device->physical_device, struct wine_phys_dev, obj); + struct vulkan_instance *instance = device->physical_device->instance; struct wine_device_memory *memory; VkMemoryAllocateInfo info = *alloc_info; VkImportMemoryHostPointerInfoEXT host_pointer_info; @@ -1936,15 +1949,15 @@ VkResult wine_vkAllocateMemory(VkDevice handle, const VkMemoryAllocateInfo *allo
/* For host visible memory, we try to use VK_EXT_external_memory_host on wow64 * to ensure that mapped pointer is 32-bit. */ - mem_flags = device->phys_dev->memory_properties.memoryTypes[alloc_info->memoryTypeIndex].propertyFlags; - if (device->phys_dev->external_memory_align && (mem_flags & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT) && + mem_flags = physical_device->memory_properties.memoryTypes[alloc_info->memoryTypeIndex].propertyFlags; + if (physical_device->external_memory_align && (mem_flags & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT) && !find_next_struct(alloc_info->pNext, VK_STRUCTURE_TYPE_IMPORT_MEMORY_HOST_POINTER_INFO_EXT)) { VkMemoryHostPointerPropertiesEXT props = { .sType = VK_STRUCTURE_TYPE_MEMORY_HOST_POINTER_PROPERTIES_EXT, }; - uint32_t i, align = device->phys_dev->external_memory_align - 1; + uint32_t i, align = physical_device->external_memory_align - 1; SIZE_T alloc_size = info.allocationSize; static int once;
@@ -1971,18 +1984,18 @@ VkResult wine_vkAllocateMemory(VkDevice handle, const VkMemoryAllocateInfo *allo /* If requested memory type is not allowed to use external memory, * try to find a supported compatible type. */ uint32_t mask = mem_flags & ~VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT; - for (i = 0; i < device->phys_dev->memory_properties.memoryTypeCount; i++) + for (i = 0; i < physical_device->memory_properties.memoryTypeCount; i++) { if (!(props.memoryTypeBits & (1u << i))) continue; - if ((device->phys_dev->memory_properties.memoryTypes[i].propertyFlags & mask) != mask) + if ((physical_device->memory_properties.memoryTypes[i].propertyFlags & mask) != mask) continue;
TRACE("Memory type not compatible with host memory, using %u instead\n", i); info.memoryTypeIndex = i; break; } - if (i == device->phys_dev->memory_properties.memoryTypeCount) + if (i == physical_device->memory_properties.memoryTypeCount) { FIXME("Not found compatible memory type\n"); alloc_size = 0; @@ -2016,20 +2029,22 @@ VkResult wine_vkAllocateMemory(VkDevice handle, const VkMemoryAllocateInfo *allo memory->vm_map = mapping;
*ret = (VkDeviceMemory)(uintptr_t)memory; - add_handle_mapping(device->phys_dev->instance, *ret, memory->host_memory, &memory->wrapper_entry); + add_handle_mapping(instance, *ret, memory->host_memory, &memory->wrapper_entry); return VK_SUCCESS; }
void wine_vkFreeMemory(VkDevice handle, VkDeviceMemory memory_handle, const VkAllocationCallbacks *allocator) { struct wine_device *device = wine_device_from_handle(handle); + struct wine_phys_dev *physical_device = CONTAINING_RECORD(device->physical_device, struct wine_phys_dev, obj); + struct vulkan_instance *instance = device->physical_device->instance; struct wine_device_memory *memory;
if (!memory_handle) return; memory = wine_device_memory_from_handle(memory_handle);
- if (memory->vm_map && !device->phys_dev->external_memory_align) + if (memory->vm_map && !physical_device->external_memory_align) { const VkMemoryUnmapInfoKHR info = { @@ -2041,7 +2056,7 @@ void wine_vkFreeMemory(VkDevice handle, VkDeviceMemory memory_handle, const VkAl }
device->funcs.p_vkFreeMemory(device->host_device, memory->host_memory, NULL); - remove_handle_mapping(device->phys_dev->instance, &memory->wrapper_entry); + remove_handle_mapping(instance, &memory->wrapper_entry);
if (memory->vm_map) { @@ -2070,6 +2085,7 @@ VkResult wine_vkMapMemory(VkDevice device, VkDeviceMemory memory, VkDeviceSize o VkResult wine_vkMapMemory2KHR(VkDevice handle, const VkMemoryMapInfoKHR *map_info, void **data) { struct wine_device *device = wine_device_from_handle(handle); + struct wine_phys_dev *physical_device = CONTAINING_RECORD(device->physical_device, struct wine_phys_dev, obj); struct wine_device_memory *memory = wine_device_memory_from_handle(map_info->memory); VkMemoryMapInfoKHR info = *map_info; VkMemoryMapPlacedInfoEXT placed_info = @@ -2086,7 +2102,7 @@ VkResult wine_vkMapMemory2KHR(VkDevice handle, const VkMemoryMapInfoKHR *map_inf return VK_SUCCESS; }
- if (device->phys_dev->map_placed_align) + if (physical_device->map_placed_align) { SIZE_T alloc_size = memory->size;
@@ -2156,11 +2172,12 @@ void wine_vkUnmapMemory(VkDevice device, VkDeviceMemory memory) VkResult wine_vkUnmapMemory2KHR(VkDevice handle, const VkMemoryUnmapInfoKHR *unmap_info) { struct wine_device *device = wine_device_from_handle(handle); + struct wine_phys_dev *physical_device = CONTAINING_RECORD(device->physical_device, struct wine_phys_dev, obj); struct wine_device_memory *memory = wine_device_memory_from_handle(unmap_info->memory); VkMemoryUnmapInfoKHR info; VkResult result;
- if (memory->vm_map && device->phys_dev->external_memory_align) + if (memory->vm_map && physical_device->external_memory_align) return VK_SUCCESS;
if (!device->funcs.p_vkUnmapMemory2KHR) @@ -2190,10 +2207,11 @@ VkResult wine_vkCreateBuffer(VkDevice handle, const VkBufferCreateInfo *create_i const VkAllocationCallbacks *allocator, VkBuffer *buffer) { struct wine_device *device = wine_device_from_handle(handle); + struct wine_phys_dev *physical_device = CONTAINING_RECORD(device->physical_device, struct wine_phys_dev, obj); VkExternalMemoryBufferCreateInfo external_memory_info; VkBufferCreateInfo info = *create_info;
- if (device->phys_dev->external_memory_align && + if (physical_device->external_memory_align && !find_next_struct(info.pNext, VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO)) { external_memory_info.sType = VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO; @@ -2209,10 +2227,11 @@ VkResult wine_vkCreateImage(VkDevice handle, const VkImageCreateInfo *create_inf const VkAllocationCallbacks *allocator, VkImage *image) { struct wine_device *device = wine_device_from_handle(handle); + struct wine_phys_dev *physical_device = CONTAINING_RECORD(device->physical_device, struct wine_phys_dev, obj); VkExternalMemoryImageCreateInfo external_memory_info; VkImageCreateInfo info = *create_info;
- if (device->phys_dev->external_memory_align && + if (physical_device->external_memory_align && !find_next_struct(info.pNext, VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO)) { external_memory_info.sType = VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO; @@ -2250,25 +2269,25 @@ static void adjust_surface_capabilities(struct vulkan_instance *instance, struct capabilities->currentExtent.height = client_rect.bottom - client_rect.top; }
-VkResult wine_vkGetPhysicalDeviceSurfaceCapabilitiesKHR(VkPhysicalDevice device_handle, VkSurfaceKHR surface_handle, +VkResult wine_vkGetPhysicalDeviceSurfaceCapabilitiesKHR(VkPhysicalDevice client_physical_device, VkSurfaceKHR surface_handle, VkSurfaceCapabilitiesKHR *capabilities) { - struct wine_phys_dev *physical_device = wine_phys_dev_from_handle(device_handle); + struct vulkan_physical_device *physical_device = vulkan_physical_device_from_handle(client_physical_device); struct wine_surface *surface = wine_surface_from_handle(surface_handle); struct vulkan_instance *instance = physical_device->instance; VkResult res;
if (!NtUserIsWindow(surface->hwnd)) return VK_ERROR_SURFACE_LOST_KHR; - res = instance->funcs.p_vkGetPhysicalDeviceSurfaceCapabilitiesKHR(physical_device->host_physical_device, + res = instance->funcs.p_vkGetPhysicalDeviceSurfaceCapabilitiesKHR(physical_device->host.physical_device, surface->host_surface, capabilities); if (res == VK_SUCCESS) adjust_surface_capabilities(instance, surface, capabilities); return res; }
-VkResult wine_vkGetPhysicalDeviceSurfaceCapabilities2KHR(VkPhysicalDevice device_handle, const VkPhysicalDeviceSurfaceInfo2KHR *surface_info, +VkResult wine_vkGetPhysicalDeviceSurfaceCapabilities2KHR(VkPhysicalDevice client_physical_device, const VkPhysicalDeviceSurfaceInfo2KHR *surface_info, VkSurfaceCapabilities2KHR *capabilities) { - struct wine_phys_dev *physical_device = wine_phys_dev_from_handle(device_handle); + struct vulkan_physical_device *physical_device = vulkan_physical_device_from_handle(client_physical_device); struct wine_surface *surface = wine_surface_from_handle(surface_info->surface); VkPhysicalDeviceSurfaceInfo2KHR surface_info_host = *surface_info; struct vulkan_instance *instance = physical_device->instance; @@ -2278,23 +2297,23 @@ VkResult wine_vkGetPhysicalDeviceSurfaceCapabilities2KHR(VkPhysicalDevice device { /* Until the loader version exporting this function is common, emulate it using the older non-2 version. */ if (surface_info->pNext || capabilities->pNext) FIXME("Emulating vkGetPhysicalDeviceSurfaceCapabilities2KHR, ignoring pNext.\n"); - return wine_vkGetPhysicalDeviceSurfaceCapabilitiesKHR(device_handle, surface_info->surface, + return wine_vkGetPhysicalDeviceSurfaceCapabilitiesKHR(client_physical_device, surface_info->surface, &capabilities->surfaceCapabilities); }
surface_info_host.surface = surface->host_surface;
if (!NtUserIsWindow(surface->hwnd)) return VK_ERROR_SURFACE_LOST_KHR; - res = instance->funcs.p_vkGetPhysicalDeviceSurfaceCapabilities2KHR(physical_device->host_physical_device, + res = instance->funcs.p_vkGetPhysicalDeviceSurfaceCapabilities2KHR(physical_device->host.physical_device, &surface_info_host, capabilities); if (res == VK_SUCCESS) adjust_surface_capabilities(instance, surface, &capabilities->surfaceCapabilities); return res; }
-VkResult wine_vkGetPhysicalDevicePresentRectanglesKHR(VkPhysicalDevice device_handle, VkSurfaceKHR surface_handle, +VkResult wine_vkGetPhysicalDevicePresentRectanglesKHR(VkPhysicalDevice client_physical_device, VkSurfaceKHR surface_handle, uint32_t *rect_count, VkRect2D *rects) { - struct wine_phys_dev *physical_device = wine_phys_dev_from_handle(device_handle); + struct vulkan_physical_device *physical_device = vulkan_physical_device_from_handle(client_physical_device); struct wine_surface *surface = wine_surface_from_handle(surface_handle); struct vulkan_instance *instance = physical_device->instance;
@@ -2306,31 +2325,31 @@ VkResult wine_vkGetPhysicalDevicePresentRectanglesKHR(VkPhysicalDevice device_ha return VK_SUCCESS; }
- return instance->funcs.p_vkGetPhysicalDevicePresentRectanglesKHR(physical_device->host_physical_device, + return instance->funcs.p_vkGetPhysicalDevicePresentRectanglesKHR(physical_device->host.physical_device, surface->host_surface, rect_count, rects); }
-VkResult wine_vkGetPhysicalDeviceSurfaceFormatsKHR(VkPhysicalDevice device_handle, VkSurfaceKHR surface_handle, +VkResult wine_vkGetPhysicalDeviceSurfaceFormatsKHR(VkPhysicalDevice client_physical_device, VkSurfaceKHR surface_handle, uint32_t *format_count, VkSurfaceFormatKHR *formats) { - struct wine_phys_dev *physical_device = wine_phys_dev_from_handle(device_handle); + struct vulkan_physical_device *physical_device = vulkan_physical_device_from_handle(client_physical_device); struct wine_surface *surface = wine_surface_from_handle(surface_handle); struct vulkan_instance *instance = physical_device->instance;
- return instance->funcs.p_vkGetPhysicalDeviceSurfaceFormatsKHR(physical_device->host_physical_device, surface->host_surface, + return instance->funcs.p_vkGetPhysicalDeviceSurfaceFormatsKHR(physical_device->host.physical_device, surface->host_surface, format_count, formats); }
-VkResult wine_vkGetPhysicalDeviceSurfaceFormats2KHR(VkPhysicalDevice device_handle, const VkPhysicalDeviceSurfaceInfo2KHR *surface_info, +VkResult wine_vkGetPhysicalDeviceSurfaceFormats2KHR(VkPhysicalDevice client_physical_device, const VkPhysicalDeviceSurfaceInfo2KHR *surface_info, uint32_t *format_count, VkSurfaceFormat2KHR *formats) { - struct wine_phys_dev *physical_device = wine_phys_dev_from_handle(device_handle); + struct vulkan_physical_device *physical_device = vulkan_physical_device_from_handle(client_physical_device); struct wine_surface *surface = wine_surface_from_handle(surface_info->surface); VkPhysicalDeviceSurfaceInfo2KHR surface_info_host = *surface_info; struct vulkan_instance *instance = physical_device->instance; VkResult res;
- if (!physical_device->instance->funcs.p_vkGetPhysicalDeviceSurfaceFormats2KHR) + if (!instance->funcs.p_vkGetPhysicalDeviceSurfaceFormats2KHR) { VkSurfaceFormatKHR *surface_formats; UINT i; @@ -2338,12 +2357,12 @@ VkResult wine_vkGetPhysicalDeviceSurfaceFormats2KHR(VkPhysicalDevice device_hand /* Until the loader version exporting this function is common, emulate it using the older non-2 version. */ if (surface_info->pNext) FIXME("Emulating vkGetPhysicalDeviceSurfaceFormats2KHR, ignoring pNext.\n");
- if (!formats) return wine_vkGetPhysicalDeviceSurfaceFormatsKHR(device_handle, surface_info->surface, format_count, NULL); + if (!formats) return wine_vkGetPhysicalDeviceSurfaceFormatsKHR(client_physical_device, surface_info->surface, format_count, NULL);
surface_formats = calloc(*format_count, sizeof(*surface_formats)); if (!surface_formats) return VK_ERROR_OUT_OF_HOST_MEMORY;
- res = wine_vkGetPhysicalDeviceSurfaceFormatsKHR(device_handle, surface_info->surface, format_count, surface_formats); + res = wine_vkGetPhysicalDeviceSurfaceFormatsKHR(client_physical_device, surface_info->surface, format_count, surface_formats); if (res == VK_SUCCESS || res == VK_INCOMPLETE) { for (i = 0; i < *format_count; i++) @@ -2356,7 +2375,7 @@ VkResult wine_vkGetPhysicalDeviceSurfaceFormats2KHR(VkPhysicalDevice device_hand
surface_info_host.surface = surface->host_surface;
- return instance->funcs.p_vkGetPhysicalDeviceSurfaceFormats2KHR(physical_device->host_physical_device, + return instance->funcs.p_vkGetPhysicalDeviceSurfaceFormats2KHR(physical_device->host.physical_device, &surface_info_host, format_count, formats); }
@@ -2477,6 +2496,8 @@ VkResult wine_vkCreateDeferredOperationKHR(VkDevice handle, VkDeferredOperationKHR* operation) { struct wine_device *device = wine_device_from_handle(handle); + struct vulkan_instance *instance = device->physical_device->instance; + VkDeferredOperationKHR host_deferred_operation; struct wine_deferred_operation *object; VkResult res;
@@ -2486,7 +2507,7 @@ VkResult wine_vkCreateDeferredOperationKHR(VkDevice handle, if (!(object = calloc(1, sizeof(*object)))) return VK_ERROR_OUT_OF_HOST_MEMORY;
- res = device->funcs.p_vkCreateDeferredOperationKHR(device->host_device, NULL, &object->host_deferred_operation); + res = device->funcs.p_vkCreateDeferredOperationKHR(device->host_device, NULL, &host_deferred_operation);
if (res != VK_SUCCESS) { @@ -2494,10 +2515,11 @@ VkResult wine_vkCreateDeferredOperationKHR(VkDevice handle, return res; }
+ object->host_deferred_operation = host_deferred_operation; init_conversion_context(&object->ctx);
*operation = wine_deferred_operation_to_handle(object); - add_handle_mapping(device->phys_dev->instance, *operation, object->host_deferred_operation, &object->wrapper_entry); + add_handle_mapping(instance, *operation, object->host_deferred_operation, &object->wrapper_entry); return VK_SUCCESS; }
@@ -2506,6 +2528,7 @@ void wine_vkDestroyDeferredOperationKHR(VkDevice handle, const VkAllocationCallbacks* allocator) { struct wine_device *device = wine_device_from_handle(handle); + struct vulkan_instance *instance = device->physical_device->instance; struct wine_deferred_operation *object;
object = wine_deferred_operation_from_handle(operation); @@ -2514,7 +2537,7 @@ void wine_vkDestroyDeferredOperationKHR(VkDevice handle, return;
device->funcs.p_vkDestroyDeferredOperationKHR(device->host_device, object->host_deferred_operation, NULL); - remove_handle_mapping(device->phys_dev->instance, &object->wrapper_entry); + remove_handle_mapping(instance, &object->wrapper_entry);
free_conversion_context(&object->ctx); free(object); diff --git a/dlls/winevulkan/vulkan_private.h b/dlls/winevulkan/vulkan_private.h index 224348b4863..22b6413d557 100644 --- a/dlls/winevulkan/vulkan_private.h +++ b/dlls/winevulkan/vulkan_private.h @@ -77,7 +77,7 @@ static inline struct wine_queue *wine_queue_from_handle(VkQueue handle) struct wine_device { struct vulkan_device_funcs funcs; - struct wine_phys_dev *phys_dev; /* parent */ + struct vulkan_physical_device *physical_device; /* parent */
VkDevice handle; /* client device */ VkDevice host_device; @@ -110,10 +110,7 @@ struct wine_debug_report_callback
struct wine_phys_dev { - struct vulkan_instance *instance; /* parent */ - - VkPhysicalDevice handle; /* client physical device */ - VkPhysicalDevice host_physical_device; + struct vulkan_physical_device obj;
VkPhysicalDeviceMemoryProperties memory_properties; VkExtensionProperties *extensions; @@ -125,11 +122,6 @@ struct wine_phys_dev struct wrapper_entry wrapper_entry; };
-static inline struct wine_phys_dev *wine_phys_dev_from_handle(VkPhysicalDevice handle) -{ - return (struct wine_phys_dev *)(uintptr_t)handle->obj.unix_handle; -} - struct wine_debug_report_callback;
struct wine_instance diff --git a/dlls/winevulkan/vulkan_thunks.c b/dlls/winevulkan/vulkan_thunks.c index 10eba93c9ac..0db0862e161 100644 --- a/dlls/winevulkan/vulkan_thunks.c +++ b/dlls/winevulkan/vulkan_thunks.c @@ -8873,7 +8873,7 @@ static uint64_t wine_vk_unwrap_handle(uint32_t type, uint64_t handle) case VK_OBJECT_TYPE_INSTANCE: return (uint64_t) (uintptr_t) vulkan_instance_from_handle(((VkInstance) (uintptr_t) handle))->host.instance; case VK_OBJECT_TYPE_PHYSICAL_DEVICE: - return (uint64_t) (uintptr_t) wine_phys_dev_from_handle(((VkPhysicalDevice) (uintptr_t) handle))->host_physical_device; + return (uint64_t) (uintptr_t) vulkan_physical_device_from_handle(((VkPhysicalDevice) (uintptr_t) handle))->host.physical_device; case VK_OBJECT_TYPE_QUEUE: return (uint64_t) (uintptr_t) wine_queue_from_handle(((VkQueue) (uintptr_t) handle))->host_queue; case VK_OBJECT_TYPE_SURFACE_KHR: @@ -14448,7 +14448,7 @@ static inline const VkPhysicalDevice *convert_VkPhysicalDevice_array_win64_to_ho out = conversion_context_alloc(ctx, count * sizeof(*out)); for (i = 0; i < count; i++) { - out[i] = wine_phys_dev_from_handle(in[i])->host_physical_device; + out[i] = vulkan_physical_device_from_handle(in[i])->host.physical_device; }
return out; @@ -14465,7 +14465,7 @@ static inline const VkPhysicalDevice *convert_VkPhysicalDevice_array_win32_to_ho out = conversion_context_alloc(ctx, count * sizeof(*out)); for (i = 0; i < count; i++) { - out[i] = wine_phys_dev_from_handle(UlongToPtr(in[i]))->host_physical_device; + out[i] = vulkan_physical_device_from_handle(UlongToPtr(in[i]))->host.physical_device; }
return out; @@ -46955,7 +46955,7 @@ static NTSTATUS thunk64_vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCoun
TRACE("%p, %u, %p, %p, %p\n", params->physicalDevice, params->queueFamilyIndex, params->pCounterCount, params->pCounters, params->pCounterDescriptions);
- params->result = wine_phys_dev_from_handle(params->physicalDevice)->instance->funcs.p_vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR(wine_phys_dev_from_handle(params->physicalDevice)->host_physical_device, params->queueFamilyIndex, params->pCounterCount, params->pCounters, params->pCounterDescriptions); + params->result = vulkan_physical_device_from_handle(params->physicalDevice)->instance->funcs.p_vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR(vulkan_physical_device_from_handle(params->physicalDevice)->host.physical_device, params->queueFamilyIndex, params->pCounterCount, params->pCounters, params->pCounterDescriptions); return STATUS_SUCCESS; } #endif /* _WIN64 */ @@ -46981,7 +46981,7 @@ static NTSTATUS thunk32_vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCoun init_conversion_context(ctx); pCounters_host = convert_VkPerformanceCounterKHR_array_win32_to_host(ctx, (VkPerformanceCounterKHR32 *)UlongToPtr(params->pCounters), *(uint32_t *)UlongToPtr(params->pCounterCount)); pCounterDescriptions_host = convert_VkPerformanceCounterDescriptionKHR_array_win32_to_host(ctx, (VkPerformanceCounterDescriptionKHR32 *)UlongToPtr(params->pCounterDescriptions), *(uint32_t *)UlongToPtr(params->pCounterCount)); - params->result = wine_phys_dev_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->instance->funcs.p_vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR(wine_phys_dev_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->host_physical_device, params->queueFamilyIndex, (uint32_t *)UlongToPtr(params->pCounterCount), pCounters_host, pCounterDescriptions_host); + params->result = vulkan_physical_device_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->instance->funcs.p_vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR(vulkan_physical_device_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->host.physical_device, params->queueFamilyIndex, (uint32_t *)UlongToPtr(params->pCounterCount), pCounters_host, pCounterDescriptions_host); convert_VkPerformanceCounterKHR_array_host_to_win32(pCounters_host, (VkPerformanceCounterKHR32 *)UlongToPtr(params->pCounters), *(uint32_t *)UlongToPtr(params->pCounterCount)); convert_VkPerformanceCounterDescriptionKHR_array_host_to_win32(pCounterDescriptions_host, (VkPerformanceCounterDescriptionKHR32 *)UlongToPtr(params->pCounterDescriptions), *(uint32_t *)UlongToPtr(params->pCounterCount)); free_conversion_context(ctx); @@ -49547,7 +49547,7 @@ static NTSTATUS thunk64_vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPr
TRACE("%p, %p, %p\n", params->physicalDevice, params->pPropertyCount, params->pProperties);
- params->result = wine_phys_dev_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV(wine_phys_dev_from_handle(params->physicalDevice)->host_physical_device, params->pPropertyCount, params->pProperties); + params->result = vulkan_physical_device_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV(vulkan_physical_device_from_handle(params->physicalDevice)->host.physical_device, params->pPropertyCount, params->pProperties); return STATUS_SUCCESS; } #endif /* _WIN64 */ @@ -49569,7 +49569,7 @@ static NTSTATUS thunk32_vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPr
init_conversion_context(ctx); pProperties_host = convert_VkCooperativeMatrixFlexibleDimensionsPropertiesNV_array_win32_to_host(ctx, (VkCooperativeMatrixFlexibleDimensionsPropertiesNV32 *)UlongToPtr(params->pProperties), *(uint32_t *)UlongToPtr(params->pPropertyCount)); - params->result = wine_phys_dev_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->instance->funcs.p_vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV(wine_phys_dev_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->host_physical_device, (uint32_t *)UlongToPtr(params->pPropertyCount), pProperties_host); + params->result = vulkan_physical_device_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->instance->funcs.p_vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV(vulkan_physical_device_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->host.physical_device, (uint32_t *)UlongToPtr(params->pPropertyCount), pProperties_host); convert_VkCooperativeMatrixFlexibleDimensionsPropertiesNV_array_host_to_win32(pProperties_host, (VkCooperativeMatrixFlexibleDimensionsPropertiesNV32 *)UlongToPtr(params->pProperties), *(uint32_t *)UlongToPtr(params->pPropertyCount)); free_conversion_context(ctx); return STATUS_SUCCESS; @@ -49582,7 +49582,7 @@ static NTSTATUS thunk64_vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR(void *
TRACE("%p, %p, %p\n", params->physicalDevice, params->pPropertyCount, params->pProperties);
- params->result = wine_phys_dev_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR(wine_phys_dev_from_handle(params->physicalDevice)->host_physical_device, params->pPropertyCount, params->pProperties); + params->result = vulkan_physical_device_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR(vulkan_physical_device_from_handle(params->physicalDevice)->host.physical_device, params->pPropertyCount, params->pProperties); return STATUS_SUCCESS; } #endif /* _WIN64 */ @@ -49604,7 +49604,7 @@ static NTSTATUS thunk32_vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR(void *
init_conversion_context(ctx); pProperties_host = convert_VkCooperativeMatrixPropertiesKHR_array_win32_to_host(ctx, (VkCooperativeMatrixPropertiesKHR32 *)UlongToPtr(params->pProperties), *(uint32_t *)UlongToPtr(params->pPropertyCount)); - params->result = wine_phys_dev_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->instance->funcs.p_vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR(wine_phys_dev_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->host_physical_device, (uint32_t *)UlongToPtr(params->pPropertyCount), pProperties_host); + params->result = vulkan_physical_device_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->instance->funcs.p_vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR(vulkan_physical_device_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->host.physical_device, (uint32_t *)UlongToPtr(params->pPropertyCount), pProperties_host); convert_VkCooperativeMatrixPropertiesKHR_array_host_to_win32(pProperties_host, (VkCooperativeMatrixPropertiesKHR32 *)UlongToPtr(params->pProperties), *(uint32_t *)UlongToPtr(params->pPropertyCount)); free_conversion_context(ctx); return STATUS_SUCCESS; @@ -49617,7 +49617,7 @@ static NTSTATUS thunk64_vkGetPhysicalDeviceCooperativeMatrixPropertiesNV(void *a
TRACE("%p, %p, %p\n", params->physicalDevice, params->pPropertyCount, params->pProperties);
- params->result = wine_phys_dev_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceCooperativeMatrixPropertiesNV(wine_phys_dev_from_handle(params->physicalDevice)->host_physical_device, params->pPropertyCount, params->pProperties); + params->result = vulkan_physical_device_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceCooperativeMatrixPropertiesNV(vulkan_physical_device_from_handle(params->physicalDevice)->host.physical_device, params->pPropertyCount, params->pProperties); return STATUS_SUCCESS; } #endif /* _WIN64 */ @@ -49639,7 +49639,7 @@ static NTSTATUS thunk32_vkGetPhysicalDeviceCooperativeMatrixPropertiesNV(void *a
init_conversion_context(ctx); pProperties_host = convert_VkCooperativeMatrixPropertiesNV_array_win32_to_host(ctx, (VkCooperativeMatrixPropertiesNV32 *)UlongToPtr(params->pProperties), *(uint32_t *)UlongToPtr(params->pPropertyCount)); - params->result = wine_phys_dev_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->instance->funcs.p_vkGetPhysicalDeviceCooperativeMatrixPropertiesNV(wine_phys_dev_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->host_physical_device, (uint32_t *)UlongToPtr(params->pPropertyCount), pProperties_host); + params->result = vulkan_physical_device_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->instance->funcs.p_vkGetPhysicalDeviceCooperativeMatrixPropertiesNV(vulkan_physical_device_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->host.physical_device, (uint32_t *)UlongToPtr(params->pPropertyCount), pProperties_host); convert_VkCooperativeMatrixPropertiesNV_array_host_to_win32(pProperties_host, (VkCooperativeMatrixPropertiesNV32 *)UlongToPtr(params->pProperties), *(uint32_t *)UlongToPtr(params->pPropertyCount)); free_conversion_context(ctx); return STATUS_SUCCESS; @@ -49860,7 +49860,7 @@ static NTSTATUS thunk64_vkGetPhysicalDeviceFeatures(void *args)
TRACE("%p, %p\n", params->physicalDevice, params->pFeatures);
- wine_phys_dev_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceFeatures(wine_phys_dev_from_handle(params->physicalDevice)->host_physical_device, params->pFeatures); + vulkan_physical_device_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceFeatures(vulkan_physical_device_from_handle(params->physicalDevice)->host.physical_device, params->pFeatures); return STATUS_SUCCESS; } #endif /* _WIN64 */ @@ -49875,7 +49875,7 @@ static NTSTATUS thunk32_vkGetPhysicalDeviceFeatures(void *args)
TRACE("%#x, %#x\n", params->physicalDevice, params->pFeatures);
- wine_phys_dev_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->instance->funcs.p_vkGetPhysicalDeviceFeatures(wine_phys_dev_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->host_physical_device, (VkPhysicalDeviceFeatures *)UlongToPtr(params->pFeatures)); + vulkan_physical_device_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->instance->funcs.p_vkGetPhysicalDeviceFeatures(vulkan_physical_device_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->host.physical_device, (VkPhysicalDeviceFeatures *)UlongToPtr(params->pFeatures)); return STATUS_SUCCESS; }
@@ -49886,7 +49886,7 @@ static NTSTATUS thunk64_vkGetPhysicalDeviceFeatures2(void *args)
TRACE("%p, %p\n", params->physicalDevice, params->pFeatures);
- wine_phys_dev_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceFeatures2(wine_phys_dev_from_handle(params->physicalDevice)->host_physical_device, params->pFeatures); + vulkan_physical_device_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceFeatures2(vulkan_physical_device_from_handle(params->physicalDevice)->host.physical_device, params->pFeatures); return STATUS_SUCCESS; } #endif /* _WIN64 */ @@ -49906,7 +49906,7 @@ static NTSTATUS thunk32_vkGetPhysicalDeviceFeatures2(void *args)
init_conversion_context(ctx); convert_VkPhysicalDeviceFeatures2_win32_to_host(ctx, (VkPhysicalDeviceFeatures232 *)UlongToPtr(params->pFeatures), &pFeatures_host); - wine_phys_dev_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->instance->funcs.p_vkGetPhysicalDeviceFeatures2(wine_phys_dev_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->host_physical_device, &pFeatures_host); + vulkan_physical_device_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->instance->funcs.p_vkGetPhysicalDeviceFeatures2(vulkan_physical_device_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->host.physical_device, &pFeatures_host); convert_VkPhysicalDeviceFeatures2_host_to_win32(&pFeatures_host, (VkPhysicalDeviceFeatures232 *)UlongToPtr(params->pFeatures)); free_conversion_context(ctx); return STATUS_SUCCESS; @@ -49919,7 +49919,7 @@ static NTSTATUS thunk64_vkGetPhysicalDeviceFeatures2KHR(void *args)
TRACE("%p, %p\n", params->physicalDevice, params->pFeatures);
- wine_phys_dev_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceFeatures2KHR(wine_phys_dev_from_handle(params->physicalDevice)->host_physical_device, params->pFeatures); + vulkan_physical_device_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceFeatures2KHR(vulkan_physical_device_from_handle(params->physicalDevice)->host.physical_device, params->pFeatures); return STATUS_SUCCESS; } #endif /* _WIN64 */ @@ -49939,7 +49939,7 @@ static NTSTATUS thunk32_vkGetPhysicalDeviceFeatures2KHR(void *args)
init_conversion_context(ctx); convert_VkPhysicalDeviceFeatures2_win32_to_host(ctx, (VkPhysicalDeviceFeatures232 *)UlongToPtr(params->pFeatures), &pFeatures_host); - wine_phys_dev_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->instance->funcs.p_vkGetPhysicalDeviceFeatures2KHR(wine_phys_dev_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->host_physical_device, &pFeatures_host); + vulkan_physical_device_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->instance->funcs.p_vkGetPhysicalDeviceFeatures2KHR(vulkan_physical_device_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->host.physical_device, &pFeatures_host); convert_VkPhysicalDeviceFeatures2_host_to_win32(&pFeatures_host, (VkPhysicalDeviceFeatures232 *)UlongToPtr(params->pFeatures)); free_conversion_context(ctx); return STATUS_SUCCESS; @@ -49952,7 +49952,7 @@ static NTSTATUS thunk64_vkGetPhysicalDeviceFormatProperties(void *args)
TRACE("%p, %#x, %p\n", params->physicalDevice, params->format, params->pFormatProperties);
- wine_phys_dev_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceFormatProperties(wine_phys_dev_from_handle(params->physicalDevice)->host_physical_device, params->format, params->pFormatProperties); + vulkan_physical_device_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceFormatProperties(vulkan_physical_device_from_handle(params->physicalDevice)->host.physical_device, params->format, params->pFormatProperties); return STATUS_SUCCESS; } #endif /* _WIN64 */ @@ -49968,7 +49968,7 @@ static NTSTATUS thunk32_vkGetPhysicalDeviceFormatProperties(void *args)
TRACE("%#x, %#x, %#x\n", params->physicalDevice, params->format, params->pFormatProperties);
- wine_phys_dev_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->instance->funcs.p_vkGetPhysicalDeviceFormatProperties(wine_phys_dev_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->host_physical_device, params->format, (VkFormatProperties *)UlongToPtr(params->pFormatProperties)); + vulkan_physical_device_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->instance->funcs.p_vkGetPhysicalDeviceFormatProperties(vulkan_physical_device_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->host.physical_device, params->format, (VkFormatProperties *)UlongToPtr(params->pFormatProperties)); return STATUS_SUCCESS; }
@@ -49979,7 +49979,7 @@ static NTSTATUS thunk64_vkGetPhysicalDeviceFormatProperties2(void *args)
TRACE("%p, %#x, %p\n", params->physicalDevice, params->format, params->pFormatProperties);
- wine_phys_dev_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceFormatProperties2(wine_phys_dev_from_handle(params->physicalDevice)->host_physical_device, params->format, params->pFormatProperties); + vulkan_physical_device_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceFormatProperties2(vulkan_physical_device_from_handle(params->physicalDevice)->host.physical_device, params->format, params->pFormatProperties); return STATUS_SUCCESS; } #endif /* _WIN64 */ @@ -50000,7 +50000,7 @@ static NTSTATUS thunk32_vkGetPhysicalDeviceFormatProperties2(void *args)
init_conversion_context(ctx); convert_VkFormatProperties2_win32_to_host(ctx, (VkFormatProperties232 *)UlongToPtr(params->pFormatProperties), &pFormatProperties_host); - wine_phys_dev_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->instance->funcs.p_vkGetPhysicalDeviceFormatProperties2(wine_phys_dev_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->host_physical_device, params->format, &pFormatProperties_host); + vulkan_physical_device_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->instance->funcs.p_vkGetPhysicalDeviceFormatProperties2(vulkan_physical_device_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->host.physical_device, params->format, &pFormatProperties_host); convert_VkFormatProperties2_host_to_win32(&pFormatProperties_host, (VkFormatProperties232 *)UlongToPtr(params->pFormatProperties)); free_conversion_context(ctx); return STATUS_SUCCESS; @@ -50013,7 +50013,7 @@ static NTSTATUS thunk64_vkGetPhysicalDeviceFormatProperties2KHR(void *args)
TRACE("%p, %#x, %p\n", params->physicalDevice, params->format, params->pFormatProperties);
- wine_phys_dev_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceFormatProperties2KHR(wine_phys_dev_from_handle(params->physicalDevice)->host_physical_device, params->format, params->pFormatProperties); + vulkan_physical_device_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceFormatProperties2KHR(vulkan_physical_device_from_handle(params->physicalDevice)->host.physical_device, params->format, params->pFormatProperties); return STATUS_SUCCESS; } #endif /* _WIN64 */ @@ -50034,7 +50034,7 @@ static NTSTATUS thunk32_vkGetPhysicalDeviceFormatProperties2KHR(void *args)
init_conversion_context(ctx); convert_VkFormatProperties2_win32_to_host(ctx, (VkFormatProperties232 *)UlongToPtr(params->pFormatProperties), &pFormatProperties_host); - wine_phys_dev_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->instance->funcs.p_vkGetPhysicalDeviceFormatProperties2KHR(wine_phys_dev_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->host_physical_device, params->format, &pFormatProperties_host); + vulkan_physical_device_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->instance->funcs.p_vkGetPhysicalDeviceFormatProperties2KHR(vulkan_physical_device_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->host.physical_device, params->format, &pFormatProperties_host); convert_VkFormatProperties2_host_to_win32(&pFormatProperties_host, (VkFormatProperties232 *)UlongToPtr(params->pFormatProperties)); free_conversion_context(ctx); return STATUS_SUCCESS; @@ -50047,7 +50047,7 @@ static NTSTATUS thunk64_vkGetPhysicalDeviceFragmentShadingRatesKHR(void *args)
TRACE("%p, %p, %p\n", params->physicalDevice, params->pFragmentShadingRateCount, params->pFragmentShadingRates);
- params->result = wine_phys_dev_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceFragmentShadingRatesKHR(wine_phys_dev_from_handle(params->physicalDevice)->host_physical_device, params->pFragmentShadingRateCount, params->pFragmentShadingRates); + params->result = vulkan_physical_device_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceFragmentShadingRatesKHR(vulkan_physical_device_from_handle(params->physicalDevice)->host.physical_device, params->pFragmentShadingRateCount, params->pFragmentShadingRates); return STATUS_SUCCESS; } #endif /* _WIN64 */ @@ -50069,7 +50069,7 @@ static NTSTATUS thunk32_vkGetPhysicalDeviceFragmentShadingRatesKHR(void *args)
init_conversion_context(ctx); pFragmentShadingRates_host = convert_VkPhysicalDeviceFragmentShadingRateKHR_array_win32_to_host(ctx, (VkPhysicalDeviceFragmentShadingRateKHR32 *)UlongToPtr(params->pFragmentShadingRates), *(uint32_t *)UlongToPtr(params->pFragmentShadingRateCount)); - params->result = wine_phys_dev_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->instance->funcs.p_vkGetPhysicalDeviceFragmentShadingRatesKHR(wine_phys_dev_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->host_physical_device, (uint32_t *)UlongToPtr(params->pFragmentShadingRateCount), pFragmentShadingRates_host); + params->result = vulkan_physical_device_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->instance->funcs.p_vkGetPhysicalDeviceFragmentShadingRatesKHR(vulkan_physical_device_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->host.physical_device, (uint32_t *)UlongToPtr(params->pFragmentShadingRateCount), pFragmentShadingRates_host); convert_VkPhysicalDeviceFragmentShadingRateKHR_array_host_to_win32(pFragmentShadingRates_host, (VkPhysicalDeviceFragmentShadingRateKHR32 *)UlongToPtr(params->pFragmentShadingRates), *(uint32_t *)UlongToPtr(params->pFragmentShadingRateCount)); free_conversion_context(ctx); return STATUS_SUCCESS; @@ -50082,7 +50082,7 @@ static NTSTATUS thunk64_vkGetPhysicalDeviceImageFormatProperties(void *args)
TRACE("%p, %#x, %#x, %#x, %#x, %#x, %p\n", params->physicalDevice, params->format, params->type, params->tiling, params->usage, params->flags, params->pImageFormatProperties);
- params->result = wine_phys_dev_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceImageFormatProperties(wine_phys_dev_from_handle(params->physicalDevice)->host_physical_device, params->format, params->type, params->tiling, params->usage, params->flags, params->pImageFormatProperties); + params->result = vulkan_physical_device_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceImageFormatProperties(vulkan_physical_device_from_handle(params->physicalDevice)->host.physical_device, params->format, params->type, params->tiling, params->usage, params->flags, params->pImageFormatProperties); return STATUS_SUCCESS; } #endif /* _WIN64 */ @@ -50104,7 +50104,7 @@ static NTSTATUS thunk32_vkGetPhysicalDeviceImageFormatProperties(void *args)
TRACE("%#x, %#x, %#x, %#x, %#x, %#x, %#x\n", params->physicalDevice, params->format, params->type, params->tiling, params->usage, params->flags, params->pImageFormatProperties);
- params->result = wine_phys_dev_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->instance->funcs.p_vkGetPhysicalDeviceImageFormatProperties(wine_phys_dev_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->host_physical_device, params->format, params->type, params->tiling, params->usage, params->flags, &pImageFormatProperties_host); + params->result = vulkan_physical_device_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->instance->funcs.p_vkGetPhysicalDeviceImageFormatProperties(vulkan_physical_device_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->host.physical_device, params->format, params->type, params->tiling, params->usage, params->flags, &pImageFormatProperties_host); convert_VkImageFormatProperties_host_to_win32(&pImageFormatProperties_host, (VkImageFormatProperties32 *)UlongToPtr(params->pImageFormatProperties)); return STATUS_SUCCESS; } @@ -50190,7 +50190,7 @@ static NTSTATUS thunk64_vkGetPhysicalDeviceMemoryProperties(void *args)
TRACE("%p, %p\n", params->physicalDevice, params->pMemoryProperties);
- wine_phys_dev_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceMemoryProperties(wine_phys_dev_from_handle(params->physicalDevice)->host_physical_device, params->pMemoryProperties); + vulkan_physical_device_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceMemoryProperties(vulkan_physical_device_from_handle(params->physicalDevice)->host.physical_device, params->pMemoryProperties); return STATUS_SUCCESS; } #endif /* _WIN64 */ @@ -50206,7 +50206,7 @@ static NTSTATUS thunk32_vkGetPhysicalDeviceMemoryProperties(void *args)
TRACE("%#x, %#x\n", params->physicalDevice, params->pMemoryProperties);
- wine_phys_dev_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->instance->funcs.p_vkGetPhysicalDeviceMemoryProperties(wine_phys_dev_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->host_physical_device, &pMemoryProperties_host); + vulkan_physical_device_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->instance->funcs.p_vkGetPhysicalDeviceMemoryProperties(vulkan_physical_device_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->host.physical_device, &pMemoryProperties_host); convert_VkPhysicalDeviceMemoryProperties_host_to_win32(&pMemoryProperties_host, (VkPhysicalDeviceMemoryProperties32 *)UlongToPtr(params->pMemoryProperties)); return STATUS_SUCCESS; } @@ -50218,7 +50218,7 @@ static NTSTATUS thunk64_vkGetPhysicalDeviceMemoryProperties2(void *args)
TRACE("%p, %p\n", params->physicalDevice, params->pMemoryProperties);
- wine_phys_dev_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceMemoryProperties2(wine_phys_dev_from_handle(params->physicalDevice)->host_physical_device, params->pMemoryProperties); + vulkan_physical_device_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceMemoryProperties2(vulkan_physical_device_from_handle(params->physicalDevice)->host.physical_device, params->pMemoryProperties); return STATUS_SUCCESS; } #endif /* _WIN64 */ @@ -50238,7 +50238,7 @@ static NTSTATUS thunk32_vkGetPhysicalDeviceMemoryProperties2(void *args)
init_conversion_context(ctx); convert_VkPhysicalDeviceMemoryProperties2_win32_to_host(ctx, (VkPhysicalDeviceMemoryProperties232 *)UlongToPtr(params->pMemoryProperties), &pMemoryProperties_host); - wine_phys_dev_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->instance->funcs.p_vkGetPhysicalDeviceMemoryProperties2(wine_phys_dev_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->host_physical_device, &pMemoryProperties_host); + vulkan_physical_device_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->instance->funcs.p_vkGetPhysicalDeviceMemoryProperties2(vulkan_physical_device_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->host.physical_device, &pMemoryProperties_host); convert_VkPhysicalDeviceMemoryProperties2_host_to_win32(&pMemoryProperties_host, (VkPhysicalDeviceMemoryProperties232 *)UlongToPtr(params->pMemoryProperties)); free_conversion_context(ctx); return STATUS_SUCCESS; @@ -50251,7 +50251,7 @@ static NTSTATUS thunk64_vkGetPhysicalDeviceMemoryProperties2KHR(void *args)
TRACE("%p, %p\n", params->physicalDevice, params->pMemoryProperties);
- wine_phys_dev_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceMemoryProperties2KHR(wine_phys_dev_from_handle(params->physicalDevice)->host_physical_device, params->pMemoryProperties); + vulkan_physical_device_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceMemoryProperties2KHR(vulkan_physical_device_from_handle(params->physicalDevice)->host.physical_device, params->pMemoryProperties); return STATUS_SUCCESS; } #endif /* _WIN64 */ @@ -50271,7 +50271,7 @@ static NTSTATUS thunk32_vkGetPhysicalDeviceMemoryProperties2KHR(void *args)
init_conversion_context(ctx); convert_VkPhysicalDeviceMemoryProperties2_win32_to_host(ctx, (VkPhysicalDeviceMemoryProperties232 *)UlongToPtr(params->pMemoryProperties), &pMemoryProperties_host); - wine_phys_dev_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->instance->funcs.p_vkGetPhysicalDeviceMemoryProperties2KHR(wine_phys_dev_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->host_physical_device, &pMemoryProperties_host); + vulkan_physical_device_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->instance->funcs.p_vkGetPhysicalDeviceMemoryProperties2KHR(vulkan_physical_device_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->host.physical_device, &pMemoryProperties_host); convert_VkPhysicalDeviceMemoryProperties2_host_to_win32(&pMemoryProperties_host, (VkPhysicalDeviceMemoryProperties232 *)UlongToPtr(params->pMemoryProperties)); free_conversion_context(ctx); return STATUS_SUCCESS; @@ -50284,7 +50284,7 @@ static NTSTATUS thunk64_vkGetPhysicalDeviceMultisamplePropertiesEXT(void *args)
TRACE("%p, %#x, %p\n", params->physicalDevice, params->samples, params->pMultisampleProperties);
- wine_phys_dev_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceMultisamplePropertiesEXT(wine_phys_dev_from_handle(params->physicalDevice)->host_physical_device, params->samples, params->pMultisampleProperties); + vulkan_physical_device_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceMultisamplePropertiesEXT(vulkan_physical_device_from_handle(params->physicalDevice)->host.physical_device, params->samples, params->pMultisampleProperties); return STATUS_SUCCESS; } #endif /* _WIN64 */ @@ -50302,7 +50302,7 @@ static NTSTATUS thunk32_vkGetPhysicalDeviceMultisamplePropertiesEXT(void *args) TRACE("%#x, %#x, %#x\n", params->physicalDevice, params->samples, params->pMultisampleProperties);
convert_VkMultisamplePropertiesEXT_win32_to_host((VkMultisamplePropertiesEXT32 *)UlongToPtr(params->pMultisampleProperties), &pMultisampleProperties_host); - wine_phys_dev_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->instance->funcs.p_vkGetPhysicalDeviceMultisamplePropertiesEXT(wine_phys_dev_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->host_physical_device, params->samples, &pMultisampleProperties_host); + vulkan_physical_device_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->instance->funcs.p_vkGetPhysicalDeviceMultisamplePropertiesEXT(vulkan_physical_device_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->host.physical_device, params->samples, &pMultisampleProperties_host); convert_VkMultisamplePropertiesEXT_host_to_win32(&pMultisampleProperties_host, (VkMultisamplePropertiesEXT32 *)UlongToPtr(params->pMultisampleProperties)); return STATUS_SUCCESS; } @@ -50314,7 +50314,7 @@ static NTSTATUS thunk64_vkGetPhysicalDeviceOpticalFlowImageFormatsNV(void *args)
TRACE("%p, %p, %p, %p\n", params->physicalDevice, params->pOpticalFlowImageFormatInfo, params->pFormatCount, params->pImageFormatProperties);
- params->result = wine_phys_dev_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceOpticalFlowImageFormatsNV(wine_phys_dev_from_handle(params->physicalDevice)->host_physical_device, params->pOpticalFlowImageFormatInfo, params->pFormatCount, params->pImageFormatProperties); + params->result = vulkan_physical_device_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceOpticalFlowImageFormatsNV(vulkan_physical_device_from_handle(params->physicalDevice)->host.physical_device, params->pOpticalFlowImageFormatInfo, params->pFormatCount, params->pImageFormatProperties); return STATUS_SUCCESS; } #endif /* _WIN64 */ @@ -50339,7 +50339,7 @@ static NTSTATUS thunk32_vkGetPhysicalDeviceOpticalFlowImageFormatsNV(void *args) init_conversion_context(ctx); convert_VkOpticalFlowImageFormatInfoNV_win32_to_host((const VkOpticalFlowImageFormatInfoNV32 *)UlongToPtr(params->pOpticalFlowImageFormatInfo), &pOpticalFlowImageFormatInfo_host); pImageFormatProperties_host = convert_VkOpticalFlowImageFormatPropertiesNV_array_win32_to_host(ctx, (VkOpticalFlowImageFormatPropertiesNV32 *)UlongToPtr(params->pImageFormatProperties), *(uint32_t *)UlongToPtr(params->pFormatCount)); - params->result = wine_phys_dev_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->instance->funcs.p_vkGetPhysicalDeviceOpticalFlowImageFormatsNV(wine_phys_dev_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->host_physical_device, &pOpticalFlowImageFormatInfo_host, (uint32_t *)UlongToPtr(params->pFormatCount), pImageFormatProperties_host); + params->result = vulkan_physical_device_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->instance->funcs.p_vkGetPhysicalDeviceOpticalFlowImageFormatsNV(vulkan_physical_device_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->host.physical_device, &pOpticalFlowImageFormatInfo_host, (uint32_t *)UlongToPtr(params->pFormatCount), pImageFormatProperties_host); convert_VkOpticalFlowImageFormatPropertiesNV_array_host_to_win32(pImageFormatProperties_host, (VkOpticalFlowImageFormatPropertiesNV32 *)UlongToPtr(params->pImageFormatProperties), *(uint32_t *)UlongToPtr(params->pFormatCount)); free_conversion_context(ctx); return STATUS_SUCCESS; @@ -50381,7 +50381,7 @@ static NTSTATUS thunk64_vkGetPhysicalDeviceProperties(void *args)
TRACE("%p, %p\n", params->physicalDevice, params->pProperties);
- wine_phys_dev_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceProperties(wine_phys_dev_from_handle(params->physicalDevice)->host_physical_device, params->pProperties); + vulkan_physical_device_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceProperties(vulkan_physical_device_from_handle(params->physicalDevice)->host.physical_device, params->pProperties); return STATUS_SUCCESS; } #endif /* _WIN64 */ @@ -50397,7 +50397,7 @@ static NTSTATUS thunk32_vkGetPhysicalDeviceProperties(void *args)
TRACE("%#x, %#x\n", params->physicalDevice, params->pProperties);
- wine_phys_dev_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->instance->funcs.p_vkGetPhysicalDeviceProperties(wine_phys_dev_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->host_physical_device, &pProperties_host); + vulkan_physical_device_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->instance->funcs.p_vkGetPhysicalDeviceProperties(vulkan_physical_device_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->host.physical_device, &pProperties_host); convert_VkPhysicalDeviceProperties_host_to_win32(&pProperties_host, (VkPhysicalDeviceProperties32 *)UlongToPtr(params->pProperties)); return STATUS_SUCCESS; } @@ -50409,7 +50409,7 @@ static NTSTATUS thunk64_vkGetPhysicalDeviceProperties2(void *args)
TRACE("%p, %p\n", params->physicalDevice, params->pProperties);
- wine_phys_dev_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceProperties2(wine_phys_dev_from_handle(params->physicalDevice)->host_physical_device, params->pProperties); + vulkan_physical_device_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceProperties2(vulkan_physical_device_from_handle(params->physicalDevice)->host.physical_device, params->pProperties); return STATUS_SUCCESS; } #endif /* _WIN64 */ @@ -50429,7 +50429,7 @@ static NTSTATUS thunk32_vkGetPhysicalDeviceProperties2(void *args)
init_conversion_context(ctx); convert_VkPhysicalDeviceProperties2_win32_to_host(ctx, (VkPhysicalDeviceProperties232 *)UlongToPtr(params->pProperties), &pProperties_host); - wine_phys_dev_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->instance->funcs.p_vkGetPhysicalDeviceProperties2(wine_phys_dev_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->host_physical_device, &pProperties_host); + vulkan_physical_device_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->instance->funcs.p_vkGetPhysicalDeviceProperties2(vulkan_physical_device_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->host.physical_device, &pProperties_host); convert_VkPhysicalDeviceProperties2_host_to_win32(&pProperties_host, (VkPhysicalDeviceProperties232 *)UlongToPtr(params->pProperties)); free_conversion_context(ctx); return STATUS_SUCCESS; @@ -50442,7 +50442,7 @@ static NTSTATUS thunk64_vkGetPhysicalDeviceProperties2KHR(void *args)
TRACE("%p, %p\n", params->physicalDevice, params->pProperties);
- wine_phys_dev_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceProperties2KHR(wine_phys_dev_from_handle(params->physicalDevice)->host_physical_device, params->pProperties); + vulkan_physical_device_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceProperties2KHR(vulkan_physical_device_from_handle(params->physicalDevice)->host.physical_device, params->pProperties); return STATUS_SUCCESS; } #endif /* _WIN64 */ @@ -50462,7 +50462,7 @@ static NTSTATUS thunk32_vkGetPhysicalDeviceProperties2KHR(void *args)
init_conversion_context(ctx); convert_VkPhysicalDeviceProperties2_win32_to_host(ctx, (VkPhysicalDeviceProperties232 *)UlongToPtr(params->pProperties), &pProperties_host); - wine_phys_dev_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->instance->funcs.p_vkGetPhysicalDeviceProperties2KHR(wine_phys_dev_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->host_physical_device, &pProperties_host); + vulkan_physical_device_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->instance->funcs.p_vkGetPhysicalDeviceProperties2KHR(vulkan_physical_device_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->host.physical_device, &pProperties_host); convert_VkPhysicalDeviceProperties2_host_to_win32(&pProperties_host, (VkPhysicalDeviceProperties232 *)UlongToPtr(params->pProperties)); free_conversion_context(ctx); return STATUS_SUCCESS; @@ -50475,7 +50475,7 @@ static NTSTATUS thunk64_vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR(
TRACE("%p, %p, %p\n", params->physicalDevice, params->pPerformanceQueryCreateInfo, params->pNumPasses);
- wine_phys_dev_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR(wine_phys_dev_from_handle(params->physicalDevice)->host_physical_device, params->pPerformanceQueryCreateInfo, params->pNumPasses); + vulkan_physical_device_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR(vulkan_physical_device_from_handle(params->physicalDevice)->host.physical_device, params->pPerformanceQueryCreateInfo, params->pNumPasses); return STATUS_SUCCESS; } #endif /* _WIN64 */ @@ -50493,7 +50493,7 @@ static NTSTATUS thunk32_vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR( TRACE("%#x, %#x, %#x\n", params->physicalDevice, params->pPerformanceQueryCreateInfo, params->pNumPasses);
convert_VkQueryPoolPerformanceCreateInfoKHR_win32_to_host((const VkQueryPoolPerformanceCreateInfoKHR32 *)UlongToPtr(params->pPerformanceQueryCreateInfo), &pPerformanceQueryCreateInfo_host); - wine_phys_dev_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->instance->funcs.p_vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR(wine_phys_dev_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->host_physical_device, &pPerformanceQueryCreateInfo_host, (uint32_t *)UlongToPtr(params->pNumPasses)); + vulkan_physical_device_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->instance->funcs.p_vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR(vulkan_physical_device_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->host.physical_device, &pPerformanceQueryCreateInfo_host, (uint32_t *)UlongToPtr(params->pNumPasses)); return STATUS_SUCCESS; }
@@ -50504,7 +50504,7 @@ static NTSTATUS thunk64_vkGetPhysicalDeviceQueueFamilyProperties(void *args)
TRACE("%p, %p, %p\n", params->physicalDevice, params->pQueueFamilyPropertyCount, params->pQueueFamilyProperties);
- wine_phys_dev_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceQueueFamilyProperties(wine_phys_dev_from_handle(params->physicalDevice)->host_physical_device, params->pQueueFamilyPropertyCount, params->pQueueFamilyProperties); + vulkan_physical_device_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceQueueFamilyProperties(vulkan_physical_device_from_handle(params->physicalDevice)->host.physical_device, params->pQueueFamilyPropertyCount, params->pQueueFamilyProperties); return STATUS_SUCCESS; } #endif /* _WIN64 */ @@ -50520,7 +50520,7 @@ static NTSTATUS thunk32_vkGetPhysicalDeviceQueueFamilyProperties(void *args)
TRACE("%#x, %#x, %#x\n", params->physicalDevice, params->pQueueFamilyPropertyCount, params->pQueueFamilyProperties);
- wine_phys_dev_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->instance->funcs.p_vkGetPhysicalDeviceQueueFamilyProperties(wine_phys_dev_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->host_physical_device, (uint32_t *)UlongToPtr(params->pQueueFamilyPropertyCount), (VkQueueFamilyProperties *)UlongToPtr(params->pQueueFamilyProperties)); + vulkan_physical_device_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->instance->funcs.p_vkGetPhysicalDeviceQueueFamilyProperties(vulkan_physical_device_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->host.physical_device, (uint32_t *)UlongToPtr(params->pQueueFamilyPropertyCount), (VkQueueFamilyProperties *)UlongToPtr(params->pQueueFamilyProperties)); return STATUS_SUCCESS; }
@@ -50531,7 +50531,7 @@ static NTSTATUS thunk64_vkGetPhysicalDeviceQueueFamilyProperties2(void *args)
TRACE("%p, %p, %p\n", params->physicalDevice, params->pQueueFamilyPropertyCount, params->pQueueFamilyProperties);
- wine_phys_dev_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceQueueFamilyProperties2(wine_phys_dev_from_handle(params->physicalDevice)->host_physical_device, params->pQueueFamilyPropertyCount, params->pQueueFamilyProperties); + vulkan_physical_device_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceQueueFamilyProperties2(vulkan_physical_device_from_handle(params->physicalDevice)->host.physical_device, params->pQueueFamilyPropertyCount, params->pQueueFamilyProperties); return STATUS_SUCCESS; } #endif /* _WIN64 */ @@ -50552,7 +50552,7 @@ static NTSTATUS thunk32_vkGetPhysicalDeviceQueueFamilyProperties2(void *args)
init_conversion_context(ctx); pQueueFamilyProperties_host = convert_VkQueueFamilyProperties2_array_win32_to_host(ctx, (VkQueueFamilyProperties232 *)UlongToPtr(params->pQueueFamilyProperties), *(uint32_t *)UlongToPtr(params->pQueueFamilyPropertyCount)); - wine_phys_dev_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->instance->funcs.p_vkGetPhysicalDeviceQueueFamilyProperties2(wine_phys_dev_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->host_physical_device, (uint32_t *)UlongToPtr(params->pQueueFamilyPropertyCount), pQueueFamilyProperties_host); + vulkan_physical_device_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->instance->funcs.p_vkGetPhysicalDeviceQueueFamilyProperties2(vulkan_physical_device_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->host.physical_device, (uint32_t *)UlongToPtr(params->pQueueFamilyPropertyCount), pQueueFamilyProperties_host); convert_VkQueueFamilyProperties2_array_host_to_win32(pQueueFamilyProperties_host, (VkQueueFamilyProperties232 *)UlongToPtr(params->pQueueFamilyProperties), *(uint32_t *)UlongToPtr(params->pQueueFamilyPropertyCount)); free_conversion_context(ctx); return STATUS_SUCCESS; @@ -50565,7 +50565,7 @@ static NTSTATUS thunk64_vkGetPhysicalDeviceQueueFamilyProperties2KHR(void *args)
TRACE("%p, %p, %p\n", params->physicalDevice, params->pQueueFamilyPropertyCount, params->pQueueFamilyProperties);
- wine_phys_dev_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceQueueFamilyProperties2KHR(wine_phys_dev_from_handle(params->physicalDevice)->host_physical_device, params->pQueueFamilyPropertyCount, params->pQueueFamilyProperties); + vulkan_physical_device_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceQueueFamilyProperties2KHR(vulkan_physical_device_from_handle(params->physicalDevice)->host.physical_device, params->pQueueFamilyPropertyCount, params->pQueueFamilyProperties); return STATUS_SUCCESS; } #endif /* _WIN64 */ @@ -50586,7 +50586,7 @@ static NTSTATUS thunk32_vkGetPhysicalDeviceQueueFamilyProperties2KHR(void *args)
init_conversion_context(ctx); pQueueFamilyProperties_host = convert_VkQueueFamilyProperties2_array_win32_to_host(ctx, (VkQueueFamilyProperties232 *)UlongToPtr(params->pQueueFamilyProperties), *(uint32_t *)UlongToPtr(params->pQueueFamilyPropertyCount)); - wine_phys_dev_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->instance->funcs.p_vkGetPhysicalDeviceQueueFamilyProperties2KHR(wine_phys_dev_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->host_physical_device, (uint32_t *)UlongToPtr(params->pQueueFamilyPropertyCount), pQueueFamilyProperties_host); + vulkan_physical_device_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->instance->funcs.p_vkGetPhysicalDeviceQueueFamilyProperties2KHR(vulkan_physical_device_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->host.physical_device, (uint32_t *)UlongToPtr(params->pQueueFamilyPropertyCount), pQueueFamilyProperties_host); convert_VkQueueFamilyProperties2_array_host_to_win32(pQueueFamilyProperties_host, (VkQueueFamilyProperties232 *)UlongToPtr(params->pQueueFamilyProperties), *(uint32_t *)UlongToPtr(params->pQueueFamilyPropertyCount)); free_conversion_context(ctx); return STATUS_SUCCESS; @@ -50599,7 +50599,7 @@ static NTSTATUS thunk64_vkGetPhysicalDeviceSparseImageFormatProperties(void *arg
TRACE("%p, %#x, %#x, %#x, %#x, %#x, %p, %p\n", params->physicalDevice, params->format, params->type, params->samples, params->usage, params->tiling, params->pPropertyCount, params->pProperties);
- wine_phys_dev_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceSparseImageFormatProperties(wine_phys_dev_from_handle(params->physicalDevice)->host_physical_device, params->format, params->type, params->samples, params->usage, params->tiling, params->pPropertyCount, params->pProperties); + vulkan_physical_device_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceSparseImageFormatProperties(vulkan_physical_device_from_handle(params->physicalDevice)->host.physical_device, params->format, params->type, params->samples, params->usage, params->tiling, params->pPropertyCount, params->pProperties); return STATUS_SUCCESS; } #endif /* _WIN64 */ @@ -50620,7 +50620,7 @@ static NTSTATUS thunk32_vkGetPhysicalDeviceSparseImageFormatProperties(void *arg
TRACE("%#x, %#x, %#x, %#x, %#x, %#x, %#x, %#x\n", params->physicalDevice, params->format, params->type, params->samples, params->usage, params->tiling, params->pPropertyCount, params->pProperties);
- wine_phys_dev_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->instance->funcs.p_vkGetPhysicalDeviceSparseImageFormatProperties(wine_phys_dev_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->host_physical_device, params->format, params->type, params->samples, params->usage, params->tiling, (uint32_t *)UlongToPtr(params->pPropertyCount), (VkSparseImageFormatProperties *)UlongToPtr(params->pProperties)); + vulkan_physical_device_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->instance->funcs.p_vkGetPhysicalDeviceSparseImageFormatProperties(vulkan_physical_device_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->host.physical_device, params->format, params->type, params->samples, params->usage, params->tiling, (uint32_t *)UlongToPtr(params->pPropertyCount), (VkSparseImageFormatProperties *)UlongToPtr(params->pProperties)); return STATUS_SUCCESS; }
@@ -50631,7 +50631,7 @@ static NTSTATUS thunk64_vkGetPhysicalDeviceSparseImageFormatProperties2(void *ar
TRACE("%p, %p, %p, %p\n", params->physicalDevice, params->pFormatInfo, params->pPropertyCount, params->pProperties);
- wine_phys_dev_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceSparseImageFormatProperties2(wine_phys_dev_from_handle(params->physicalDevice)->host_physical_device, params->pFormatInfo, params->pPropertyCount, params->pProperties); + vulkan_physical_device_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceSparseImageFormatProperties2(vulkan_physical_device_from_handle(params->physicalDevice)->host.physical_device, params->pFormatInfo, params->pPropertyCount, params->pProperties); return STATUS_SUCCESS; } #endif /* _WIN64 */ @@ -50655,7 +50655,7 @@ static NTSTATUS thunk32_vkGetPhysicalDeviceSparseImageFormatProperties2(void *ar init_conversion_context(ctx); convert_VkPhysicalDeviceSparseImageFormatInfo2_win32_to_host((const VkPhysicalDeviceSparseImageFormatInfo232 *)UlongToPtr(params->pFormatInfo), &pFormatInfo_host); pProperties_host = convert_VkSparseImageFormatProperties2_array_win32_to_host(ctx, (VkSparseImageFormatProperties232 *)UlongToPtr(params->pProperties), *(uint32_t *)UlongToPtr(params->pPropertyCount)); - wine_phys_dev_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->instance->funcs.p_vkGetPhysicalDeviceSparseImageFormatProperties2(wine_phys_dev_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->host_physical_device, &pFormatInfo_host, (uint32_t *)UlongToPtr(params->pPropertyCount), pProperties_host); + vulkan_physical_device_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->instance->funcs.p_vkGetPhysicalDeviceSparseImageFormatProperties2(vulkan_physical_device_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->host.physical_device, &pFormatInfo_host, (uint32_t *)UlongToPtr(params->pPropertyCount), pProperties_host); convert_VkSparseImageFormatProperties2_array_host_to_win32(pProperties_host, (VkSparseImageFormatProperties232 *)UlongToPtr(params->pProperties), *(uint32_t *)UlongToPtr(params->pPropertyCount)); free_conversion_context(ctx); return STATUS_SUCCESS; @@ -50668,7 +50668,7 @@ static NTSTATUS thunk64_vkGetPhysicalDeviceSparseImageFormatProperties2KHR(void
TRACE("%p, %p, %p, %p\n", params->physicalDevice, params->pFormatInfo, params->pPropertyCount, params->pProperties);
- wine_phys_dev_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceSparseImageFormatProperties2KHR(wine_phys_dev_from_handle(params->physicalDevice)->host_physical_device, params->pFormatInfo, params->pPropertyCount, params->pProperties); + vulkan_physical_device_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceSparseImageFormatProperties2KHR(vulkan_physical_device_from_handle(params->physicalDevice)->host.physical_device, params->pFormatInfo, params->pPropertyCount, params->pProperties); return STATUS_SUCCESS; } #endif /* _WIN64 */ @@ -50692,7 +50692,7 @@ static NTSTATUS thunk32_vkGetPhysicalDeviceSparseImageFormatProperties2KHR(void init_conversion_context(ctx); convert_VkPhysicalDeviceSparseImageFormatInfo2_win32_to_host((const VkPhysicalDeviceSparseImageFormatInfo232 *)UlongToPtr(params->pFormatInfo), &pFormatInfo_host); pProperties_host = convert_VkSparseImageFormatProperties2_array_win32_to_host(ctx, (VkSparseImageFormatProperties232 *)UlongToPtr(params->pProperties), *(uint32_t *)UlongToPtr(params->pPropertyCount)); - wine_phys_dev_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->instance->funcs.p_vkGetPhysicalDeviceSparseImageFormatProperties2KHR(wine_phys_dev_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->host_physical_device, &pFormatInfo_host, (uint32_t *)UlongToPtr(params->pPropertyCount), pProperties_host); + vulkan_physical_device_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->instance->funcs.p_vkGetPhysicalDeviceSparseImageFormatProperties2KHR(vulkan_physical_device_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->host.physical_device, &pFormatInfo_host, (uint32_t *)UlongToPtr(params->pPropertyCount), pProperties_host); convert_VkSparseImageFormatProperties2_array_host_to_win32(pProperties_host, (VkSparseImageFormatProperties232 *)UlongToPtr(params->pProperties), *(uint32_t *)UlongToPtr(params->pPropertyCount)); free_conversion_context(ctx); return STATUS_SUCCESS; @@ -50705,7 +50705,7 @@ static NTSTATUS thunk64_vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombi
TRACE("%p, %p, %p\n", params->physicalDevice, params->pCombinationCount, params->pCombinations);
- params->result = wine_phys_dev_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV(wine_phys_dev_from_handle(params->physicalDevice)->host_physical_device, params->pCombinationCount, params->pCombinations); + params->result = vulkan_physical_device_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV(vulkan_physical_device_from_handle(params->physicalDevice)->host.physical_device, params->pCombinationCount, params->pCombinations); return STATUS_SUCCESS; } #endif /* _WIN64 */ @@ -50727,7 +50727,7 @@ static NTSTATUS thunk32_vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombi
init_conversion_context(ctx); pCombinations_host = convert_VkFramebufferMixedSamplesCombinationNV_array_win32_to_host(ctx, (VkFramebufferMixedSamplesCombinationNV32 *)UlongToPtr(params->pCombinations), *(uint32_t *)UlongToPtr(params->pCombinationCount)); - params->result = wine_phys_dev_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->instance->funcs.p_vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV(wine_phys_dev_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->host_physical_device, (uint32_t *)UlongToPtr(params->pCombinationCount), pCombinations_host); + params->result = vulkan_physical_device_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->instance->funcs.p_vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV(vulkan_physical_device_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->host.physical_device, (uint32_t *)UlongToPtr(params->pCombinationCount), pCombinations_host); convert_VkFramebufferMixedSamplesCombinationNV_array_host_to_win32(pCombinations_host, (VkFramebufferMixedSamplesCombinationNV32 *)UlongToPtr(params->pCombinations), *(uint32_t *)UlongToPtr(params->pCombinationCount)); free_conversion_context(ctx); return STATUS_SUCCESS; @@ -50872,7 +50872,7 @@ static NTSTATUS thunk64_vkGetPhysicalDeviceSurfacePresentModesKHR(void *args)
TRACE("%p, 0x%s, %p, %p\n", params->physicalDevice, wine_dbgstr_longlong(params->surface), params->pPresentModeCount, params->pPresentModes);
- params->result = wine_phys_dev_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceSurfacePresentModesKHR(wine_phys_dev_from_handle(params->physicalDevice)->host_physical_device, params->surface ? wine_surface_from_handle(params->surface)->host_surface : 0, params->pPresentModeCount, params->pPresentModes); + params->result = vulkan_physical_device_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceSurfacePresentModesKHR(vulkan_physical_device_from_handle(params->physicalDevice)->host.physical_device, params->surface ? wine_surface_from_handle(params->surface)->host_surface : 0, params->pPresentModeCount, params->pPresentModes); return STATUS_SUCCESS; } #endif /* _WIN64 */ @@ -50890,7 +50890,7 @@ static NTSTATUS thunk32_vkGetPhysicalDeviceSurfacePresentModesKHR(void *args)
TRACE("%#x, 0x%s, %#x, %#x\n", params->physicalDevice, wine_dbgstr_longlong(params->surface), params->pPresentModeCount, params->pPresentModes);
- params->result = wine_phys_dev_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->instance->funcs.p_vkGetPhysicalDeviceSurfacePresentModesKHR(wine_phys_dev_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->host_physical_device, params->surface ? wine_surface_from_handle(params->surface)->host_surface : 0, (uint32_t *)UlongToPtr(params->pPresentModeCount), (VkPresentModeKHR *)UlongToPtr(params->pPresentModes)); + params->result = vulkan_physical_device_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->instance->funcs.p_vkGetPhysicalDeviceSurfacePresentModesKHR(vulkan_physical_device_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->host.physical_device, params->surface ? wine_surface_from_handle(params->surface)->host_surface : 0, (uint32_t *)UlongToPtr(params->pPresentModeCount), (VkPresentModeKHR *)UlongToPtr(params->pPresentModes)); return STATUS_SUCCESS; }
@@ -50901,7 +50901,7 @@ static NTSTATUS thunk64_vkGetPhysicalDeviceSurfaceSupportKHR(void *args)
TRACE("%p, %u, 0x%s, %p\n", params->physicalDevice, params->queueFamilyIndex, wine_dbgstr_longlong(params->surface), params->pSupported);
- params->result = wine_phys_dev_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceSurfaceSupportKHR(wine_phys_dev_from_handle(params->physicalDevice)->host_physical_device, params->queueFamilyIndex, wine_surface_from_handle(params->surface)->host_surface, params->pSupported); + params->result = vulkan_physical_device_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceSurfaceSupportKHR(vulkan_physical_device_from_handle(params->physicalDevice)->host.physical_device, params->queueFamilyIndex, wine_surface_from_handle(params->surface)->host_surface, params->pSupported); return STATUS_SUCCESS; } #endif /* _WIN64 */ @@ -50919,7 +50919,7 @@ static NTSTATUS thunk32_vkGetPhysicalDeviceSurfaceSupportKHR(void *args)
TRACE("%#x, %u, 0x%s, %#x\n", params->physicalDevice, params->queueFamilyIndex, wine_dbgstr_longlong(params->surface), params->pSupported);
- params->result = wine_phys_dev_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->instance->funcs.p_vkGetPhysicalDeviceSurfaceSupportKHR(wine_phys_dev_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->host_physical_device, params->queueFamilyIndex, wine_surface_from_handle(params->surface)->host_surface, (VkBool32 *)UlongToPtr(params->pSupported)); + params->result = vulkan_physical_device_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->instance->funcs.p_vkGetPhysicalDeviceSurfaceSupportKHR(vulkan_physical_device_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->host.physical_device, params->queueFamilyIndex, wine_surface_from_handle(params->surface)->host_surface, (VkBool32 *)UlongToPtr(params->pSupported)); return STATUS_SUCCESS; }
@@ -50930,7 +50930,7 @@ static NTSTATUS thunk64_vkGetPhysicalDeviceToolProperties(void *args)
TRACE("%p, %p, %p\n", params->physicalDevice, params->pToolCount, params->pToolProperties);
- params->result = wine_phys_dev_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceToolProperties(wine_phys_dev_from_handle(params->physicalDevice)->host_physical_device, params->pToolCount, params->pToolProperties); + params->result = vulkan_physical_device_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceToolProperties(vulkan_physical_device_from_handle(params->physicalDevice)->host.physical_device, params->pToolCount, params->pToolProperties); return STATUS_SUCCESS; } #endif /* _WIN64 */ @@ -50952,7 +50952,7 @@ static NTSTATUS thunk32_vkGetPhysicalDeviceToolProperties(void *args)
init_conversion_context(ctx); pToolProperties_host = convert_VkPhysicalDeviceToolProperties_array_win32_to_host(ctx, (VkPhysicalDeviceToolProperties32 *)UlongToPtr(params->pToolProperties), *(uint32_t *)UlongToPtr(params->pToolCount)); - params->result = wine_phys_dev_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->instance->funcs.p_vkGetPhysicalDeviceToolProperties(wine_phys_dev_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->host_physical_device, (uint32_t *)UlongToPtr(params->pToolCount), pToolProperties_host); + params->result = vulkan_physical_device_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->instance->funcs.p_vkGetPhysicalDeviceToolProperties(vulkan_physical_device_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->host.physical_device, (uint32_t *)UlongToPtr(params->pToolCount), pToolProperties_host); convert_VkPhysicalDeviceToolProperties_array_host_to_win32(pToolProperties_host, (VkPhysicalDeviceToolProperties32 *)UlongToPtr(params->pToolProperties), *(uint32_t *)UlongToPtr(params->pToolCount)); free_conversion_context(ctx); return STATUS_SUCCESS; @@ -50965,7 +50965,7 @@ static NTSTATUS thunk64_vkGetPhysicalDeviceToolPropertiesEXT(void *args)
TRACE("%p, %p, %p\n", params->physicalDevice, params->pToolCount, params->pToolProperties);
- params->result = wine_phys_dev_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceToolPropertiesEXT(wine_phys_dev_from_handle(params->physicalDevice)->host_physical_device, params->pToolCount, params->pToolProperties); + params->result = vulkan_physical_device_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceToolPropertiesEXT(vulkan_physical_device_from_handle(params->physicalDevice)->host.physical_device, params->pToolCount, params->pToolProperties); return STATUS_SUCCESS; } #endif /* _WIN64 */ @@ -50987,7 +50987,7 @@ static NTSTATUS thunk32_vkGetPhysicalDeviceToolPropertiesEXT(void *args)
init_conversion_context(ctx); pToolProperties_host = convert_VkPhysicalDeviceToolProperties_array_win32_to_host(ctx, (VkPhysicalDeviceToolProperties32 *)UlongToPtr(params->pToolProperties), *(uint32_t *)UlongToPtr(params->pToolCount)); - params->result = wine_phys_dev_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->instance->funcs.p_vkGetPhysicalDeviceToolPropertiesEXT(wine_phys_dev_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->host_physical_device, (uint32_t *)UlongToPtr(params->pToolCount), pToolProperties_host); + params->result = vulkan_physical_device_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->instance->funcs.p_vkGetPhysicalDeviceToolPropertiesEXT(vulkan_physical_device_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->host.physical_device, (uint32_t *)UlongToPtr(params->pToolCount), pToolProperties_host); convert_VkPhysicalDeviceToolProperties_array_host_to_win32(pToolProperties_host, (VkPhysicalDeviceToolProperties32 *)UlongToPtr(params->pToolProperties), *(uint32_t *)UlongToPtr(params->pToolCount)); free_conversion_context(ctx); return STATUS_SUCCESS; @@ -51000,7 +51000,7 @@ static NTSTATUS thunk64_vkGetPhysicalDeviceVideoCapabilitiesKHR(void *args)
TRACE("%p, %p, %p\n", params->physicalDevice, params->pVideoProfile, params->pCapabilities);
- params->result = wine_phys_dev_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceVideoCapabilitiesKHR(wine_phys_dev_from_handle(params->physicalDevice)->host_physical_device, params->pVideoProfile, params->pCapabilities); + params->result = vulkan_physical_device_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceVideoCapabilitiesKHR(vulkan_physical_device_from_handle(params->physicalDevice)->host.physical_device, params->pVideoProfile, params->pCapabilities); return STATUS_SUCCESS; } #endif /* _WIN64 */ @@ -51024,7 +51024,7 @@ static NTSTATUS thunk32_vkGetPhysicalDeviceVideoCapabilitiesKHR(void *args) init_conversion_context(ctx); convert_VkVideoProfileInfoKHR_win32_to_host(ctx, (const VkVideoProfileInfoKHR32 *)UlongToPtr(params->pVideoProfile), &pVideoProfile_host); convert_VkVideoCapabilitiesKHR_win32_to_host(ctx, (VkVideoCapabilitiesKHR32 *)UlongToPtr(params->pCapabilities), &pCapabilities_host); - params->result = wine_phys_dev_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->instance->funcs.p_vkGetPhysicalDeviceVideoCapabilitiesKHR(wine_phys_dev_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->host_physical_device, &pVideoProfile_host, &pCapabilities_host); + params->result = vulkan_physical_device_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->instance->funcs.p_vkGetPhysicalDeviceVideoCapabilitiesKHR(vulkan_physical_device_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->host.physical_device, &pVideoProfile_host, &pCapabilities_host); convert_VkVideoCapabilitiesKHR_host_to_win32(&pCapabilities_host, (VkVideoCapabilitiesKHR32 *)UlongToPtr(params->pCapabilities)); free_conversion_context(ctx); return STATUS_SUCCESS; @@ -51037,7 +51037,7 @@ static NTSTATUS thunk64_vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR(
TRACE("%p, %p, %p\n", params->physicalDevice, params->pQualityLevelInfo, params->pQualityLevelProperties);
- params->result = wine_phys_dev_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR(wine_phys_dev_from_handle(params->physicalDevice)->host_physical_device, params->pQualityLevelInfo, params->pQualityLevelProperties); + params->result = vulkan_physical_device_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR(vulkan_physical_device_from_handle(params->physicalDevice)->host.physical_device, params->pQualityLevelInfo, params->pQualityLevelProperties); return STATUS_SUCCESS; } #endif /* _WIN64 */ @@ -51061,7 +51061,7 @@ static NTSTATUS thunk32_vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR( init_conversion_context(ctx); convert_VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR_win32_to_host(ctx, (const VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR32 *)UlongToPtr(params->pQualityLevelInfo), &pQualityLevelInfo_host); convert_VkVideoEncodeQualityLevelPropertiesKHR_win32_to_host(ctx, (VkVideoEncodeQualityLevelPropertiesKHR32 *)UlongToPtr(params->pQualityLevelProperties), &pQualityLevelProperties_host); - params->result = wine_phys_dev_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->instance->funcs.p_vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR(wine_phys_dev_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->host_physical_device, &pQualityLevelInfo_host, &pQualityLevelProperties_host); + params->result = vulkan_physical_device_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->instance->funcs.p_vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR(vulkan_physical_device_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->host.physical_device, &pQualityLevelInfo_host, &pQualityLevelProperties_host); convert_VkVideoEncodeQualityLevelPropertiesKHR_host_to_win32(&pQualityLevelProperties_host, (VkVideoEncodeQualityLevelPropertiesKHR32 *)UlongToPtr(params->pQualityLevelProperties)); free_conversion_context(ctx); return STATUS_SUCCESS; @@ -51074,7 +51074,7 @@ static NTSTATUS thunk64_vkGetPhysicalDeviceVideoFormatPropertiesKHR(void *args)
TRACE("%p, %p, %p, %p\n", params->physicalDevice, params->pVideoFormatInfo, params->pVideoFormatPropertyCount, params->pVideoFormatProperties);
- params->result = wine_phys_dev_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceVideoFormatPropertiesKHR(wine_phys_dev_from_handle(params->physicalDevice)->host_physical_device, params->pVideoFormatInfo, params->pVideoFormatPropertyCount, params->pVideoFormatProperties); + params->result = vulkan_physical_device_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceVideoFormatPropertiesKHR(vulkan_physical_device_from_handle(params->physicalDevice)->host.physical_device, params->pVideoFormatInfo, params->pVideoFormatPropertyCount, params->pVideoFormatProperties); return STATUS_SUCCESS; } #endif /* _WIN64 */ @@ -51099,7 +51099,7 @@ static NTSTATUS thunk32_vkGetPhysicalDeviceVideoFormatPropertiesKHR(void *args) init_conversion_context(ctx); convert_VkPhysicalDeviceVideoFormatInfoKHR_win32_to_host(ctx, (const VkPhysicalDeviceVideoFormatInfoKHR32 *)UlongToPtr(params->pVideoFormatInfo), &pVideoFormatInfo_host); pVideoFormatProperties_host = convert_VkVideoFormatPropertiesKHR_array_win32_to_host(ctx, (VkVideoFormatPropertiesKHR32 *)UlongToPtr(params->pVideoFormatProperties), *(uint32_t *)UlongToPtr(params->pVideoFormatPropertyCount)); - params->result = wine_phys_dev_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->instance->funcs.p_vkGetPhysicalDeviceVideoFormatPropertiesKHR(wine_phys_dev_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->host_physical_device, &pVideoFormatInfo_host, (uint32_t *)UlongToPtr(params->pVideoFormatPropertyCount), pVideoFormatProperties_host); + params->result = vulkan_physical_device_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->instance->funcs.p_vkGetPhysicalDeviceVideoFormatPropertiesKHR(vulkan_physical_device_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->host.physical_device, &pVideoFormatInfo_host, (uint32_t *)UlongToPtr(params->pVideoFormatPropertyCount), pVideoFormatProperties_host); convert_VkVideoFormatPropertiesKHR_array_host_to_win32(pVideoFormatProperties_host, (VkVideoFormatPropertiesKHR32 *)UlongToPtr(params->pVideoFormatProperties), *(uint32_t *)UlongToPtr(params->pVideoFormatPropertyCount)); free_conversion_context(ctx); return STATUS_SUCCESS; @@ -51112,7 +51112,7 @@ static NTSTATUS thunk64_vkGetPhysicalDeviceWin32PresentationSupportKHR(void *arg
TRACE("%p, %u\n", params->physicalDevice, params->queueFamilyIndex);
- params->result = wine_phys_dev_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceWin32PresentationSupportKHR(wine_phys_dev_from_handle(params->physicalDevice)->host_physical_device, params->queueFamilyIndex); + params->result = vulkan_physical_device_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDeviceWin32PresentationSupportKHR(vulkan_physical_device_from_handle(params->physicalDevice)->host.physical_device, params->queueFamilyIndex); return STATUS_SUCCESS; } #endif /* _WIN64 */ @@ -51128,7 +51128,7 @@ static NTSTATUS thunk32_vkGetPhysicalDeviceWin32PresentationSupportKHR(void *arg
TRACE("%#x, %u\n", params->physicalDevice, params->queueFamilyIndex);
- params->result = wine_phys_dev_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->instance->funcs.p_vkGetPhysicalDeviceWin32PresentationSupportKHR(wine_phys_dev_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->host_physical_device, params->queueFamilyIndex); + params->result = vulkan_physical_device_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->instance->funcs.p_vkGetPhysicalDeviceWin32PresentationSupportKHR(vulkan_physical_device_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->host.physical_device, params->queueFamilyIndex); return STATUS_SUCCESS; }
diff --git a/include/wine/vulkan_driver.h b/include/wine/vulkan_driver.h index 2a9d67b72e9..236df250432 100644 --- a/include/wine/vulkan_driver.h +++ b/include/wine/vulkan_driver.h @@ -52,20 +52,22 @@ struct vulkan_object { UINT64 host_handle; UINT64 client_handle; + struct vulkan_object *parent; };
-#define VULKAN_OBJECT_HEADER( type, name ) \ +#define VULKAN_OBJECT_HEADER( type, name, parent_type, parent_name ) \ union { \ struct vulkan_object obj; \ struct { \ union { type name; UINT64 handle; } host; \ union { type name; UINT64 handle; } client; \ + parent_type *parent_name; \ }; \ }
struct vulkan_instance { - VULKAN_OBJECT_HEADER( VkInstance, instance ); + VULKAN_OBJECT_HEADER( VkInstance, instance, void, unused ); struct vulkan_instance_funcs funcs; };
@@ -75,6 +77,17 @@ static inline struct vulkan_instance *vulkan_instance_from_handle( VkInstance ha return (struct vulkan_instance *)(UINT_PTR)client->unix_handle; }
+struct vulkan_physical_device +{ + VULKAN_OBJECT_HEADER( VkPhysicalDevice, physical_device, struct vulkan_instance, instance ); +}; + +static inline struct vulkan_physical_device *vulkan_physical_device_from_handle( VkPhysicalDevice handle ) +{ + struct vulkan_client_object *client = (struct vulkan_client_object *)handle; + return (struct vulkan_physical_device *)(UINT_PTR)client->unix_handle; +} + struct vulkan_funcs { /* Vulkan global functions. These are the only calls at this point a graphics driver