diff --git a/dlls/winevulkan/make_vulkan b/dlls/winevulkan/make_vulkan index 146b48595cf..2858309c063 100755 --- a/dlls/winevulkan/make_vulkan +++ b/dlls/winevulkan/make_vulkan @@ -141,22 +141,22 @@ FUNCTION_OVERRIDES = { "vkQueueSubmit" : {"dispatch": True, "driver" : False, "thunk" : False}, # VK_KHR_surface - "vkDestroySurfaceKHR" : {"dispatch" : False, "driver" : True, "thunk" : False}, - "vkGetPhysicalDeviceSurfaceSupportKHR" : {"dispatch" : False, "driver" : True, "thunk" : False}, - "vkGetPhysicalDeviceSurfaceCapabilitiesKHR" : {"dispatch" : False, "driver" : True, "thunk" : False}, - "vkGetPhysicalDeviceSurfaceFormatsKHR" : {"dispatch" : False, "driver" : True, "thunk" : False}, - "vkGetPhysicalDeviceSurfacePresentModesKHR" : {"dispatch" : False, "driver" : True, "thunk" : False}, + "vkDestroySurfaceKHR" : {"dispatch" : True, "driver" : True, "thunk" : True}, + "vkGetPhysicalDeviceSurfaceSupportKHR" : {"dispatch" : True, "driver" : True, "thunk" : True}, + "vkGetPhysicalDeviceSurfaceCapabilitiesKHR" : {"dispatch" : True, "driver" : True, "thunk" : True}, + "vkGetPhysicalDeviceSurfaceFormatsKHR" : {"dispatch" : True, "driver" : True, "thunk" : True}, + "vkGetPhysicalDeviceSurfacePresentModesKHR" : {"dispatch" : True, "driver" : True, "thunk" : True}, # VK_KHR_win32_surface - "vkCreateWin32SurfaceKHR" : {"dispatch" : False, "driver" : True, "thunk" : False}, - "vkGetPhysicalDeviceWin32PresentationSupportKHR" : {"dispatch" : False, "driver" : True, "thunk" : False}, + "vkCreateWin32SurfaceKHR" : {"dispatch" : True, "driver" : True, "thunk" : True}, + "vkGetPhysicalDeviceWin32PresentationSupportKHR" : {"dispatch" : True, "driver" : True, "thunk" : True}, # VK_KHR_swapchain - "vkAcquireNextImageKHR": {"dispatch" : False, "driver" : True, "thunk" : False}, - "vkCreateSwapchainKHR" : {"dispatch" : False, "driver" : True, "thunk" : False}, - "vkDestroySwapchainKHR" : {"dispatch" : False, "driver" : True, "thunk" : False}, - "vkGetSwapchainImagesKHR": {"dispatch" : False, "driver" : True, "thunk" : False}, - "vkQueuePresentKHR": {"dispatch" : False, "driver" : True, "thunk" : False}, + "vkAcquireNextImageKHR": {"dispatch" : True, "driver" : True, "thunk" : True}, + "vkCreateSwapchainKHR" : {"dispatch" : True, "driver" : True, "thunk" : True}, + "vkDestroySwapchainKHR" : {"dispatch" : True, "driver" : True, "thunk" : True}, + "vkGetSwapchainImagesKHR": {"dispatch" : True, "driver" : True, "thunk" : True}, + "vkQueuePresentKHR": {"dispatch" : True, "driver" : True, "thunk" : True}, } diff --git a/dlls/winevulkan/vulkan.c b/dlls/winevulkan/vulkan.c index aebd20567ad..ad1a35c9342 100644 --- a/dlls/winevulkan/vulkan.c +++ b/dlls/winevulkan/vulkan.c @@ -421,17 +421,6 @@ static void wine_vk_instance_free(struct VkInstance_T *instance) heap_free(instance); } -VkResult WINAPI wine_vkAcquireNextImageKHR(VkDevice device, VkSwapchainKHR swapchain, - uint64_t timeout, VkSemaphore semaphore, VkFence fence, uint32_t *image_index) -{ - TRACE("%p, 0x%s, 0x%s, 0x%s, 0x%s, %p\n", device, wine_dbgstr_longlong(swapchain), - wine_dbgstr_longlong(timeout), wine_dbgstr_longlong(semaphore), - wine_dbgstr_longlong(fence), image_index); - - return vk_funcs->p_vkAcquireNextImageKHR(device->device, swapchain, timeout, - semaphore, fence, image_index); -} - VkResult WINAPI wine_vkAllocateCommandBuffers(VkDevice device, const VkCommandBufferAllocateInfo *allocate_info, VkCommandBuffer *buffers) { @@ -660,72 +649,6 @@ err: return res; } -#if defined(USE_STRUCT_CONVERSION) -static inline void convert_VkSwapchainCreateInfoKHR_win_to_host(const VkSwapchainCreateInfoKHR *in, - VkSwapchainCreateInfoKHR_host *out) -{ - if (!in) return; - - out->sType = in->sType; - out->pNext = in->pNext; - out->flags = in->flags; - out->surface = in->surface; - out->minImageCount = in->minImageCount; - out->imageFormat = in->imageFormat; - out->imageColorSpace = in->imageColorSpace; - out->imageExtent = in->imageExtent; - out->imageArrayLayers = in->imageArrayLayers; - out->imageUsage = in->imageUsage; - out->imageSharingMode = in->imageSharingMode; - out->queueFamilyIndexCount = in->queueFamilyIndexCount; - out->pQueueFamilyIndices = in->pQueueFamilyIndices; - out->preTransform = in->preTransform; - out->compositeAlpha = in->compositeAlpha; - out->presentMode = in->presentMode; - out->clipped = in->clipped; - out->oldSwapchain = in->oldSwapchain; -} -#endif - -VkResult WINAPI wine_vkCreateSwapchainKHR(VkDevice device, - const VkSwapchainCreateInfoKHR *create_info, - const VkAllocationCallbacks *allocator, VkSwapchainKHR *swapchain) -{ -#if defined(USE_STRUCT_CONVERSION) - VkSwapchainCreateInfoKHR_host create_info_host; - TRACE("%p %p %p %p\n", device, create_info, allocator, swapchain); - - if (allocator) - FIXME("Support allocation allocators\n"); - - convert_VkSwapchainCreateInfoKHR_win_to_host(create_info, &create_info_host); - - /* Wine graphics driver only uses structs in host format. */ - return vk_funcs->p_vkCreateSwapchainKHR(device->device, - (VkSwapchainCreateInfoKHR *)&create_info_host, allocator, swapchain); -#else - TRACE("%p %p %p %p\n", device, create_info, allocator, swapchain); - - if (allocator) - FIXME("Support allocation allocators\n"); - - return vk_funcs->p_vkCreateSwapchainKHR(device->device, create_info, allocator, swapchain); -#endif -} - -VkResult WINAPI wine_vkCreateWin32SurfaceKHR(VkInstance instance, - const VkWin32SurfaceCreateInfoKHR *create_info, - const VkAllocationCallbacks* allocator, VkSurfaceKHR* surface) -{ - TRACE("%p %p %p %p\n", instance, create_info, allocator, surface); - - if (allocator) - FIXME("Support allocation allocators\n"); - - return vk_funcs->p_vkCreateWin32SurfaceKHR(instance->instance, create_info, - NULL /* allocator */, surface); -} - void WINAPI wine_vkDestroyDevice(VkDevice device, const VkAllocationCallbacks *allocator) { TRACE("%p %p\n", device, allocator); @@ -746,28 +669,6 @@ void WINAPI wine_vkDestroyInstance(VkInstance instance, const VkAllocationCallba wine_vk_instance_free(instance); } -void WINAPI wine_vkDestroySurfaceKHR(VkInstance instance, VkSurfaceKHR surface, - const VkAllocationCallbacks *allocator) -{ - TRACE("%p, 0x%s, %p\n", instance, wine_dbgstr_longlong(surface), allocator); - - if (allocator) - FIXME("Support allocation allocators\n"); - - vk_funcs->p_vkDestroySurfaceKHR(instance->instance, surface, NULL /* allocator */); -} - -void WINAPI wine_vkDestroySwapchainKHR(VkDevice device, VkSwapchainKHR swapchain, - const VkAllocationCallbacks *allocator) -{ - TRACE("%p, 0x%s %p\n", device, wine_dbgstr_longlong(swapchain), allocator); - - if (allocator) - FIXME("Support allocation allocators\n"); - - vk_funcs->p_vkDestroySwapchainKHR(device->device, swapchain, NULL /* allocator */); -} - VkResult WINAPI wine_vkEnumerateDeviceExtensionProperties(VkPhysicalDevice phys_dev, const char *layer_name, uint32_t *count, VkExtensionProperties *properties) { @@ -994,60 +895,6 @@ static PFN_vkVoidFunction WINAPI wine_vkGetInstanceProcAddr(VkInstance instance, return NULL; } -VkResult WINAPI wine_vkGetPhysicalDeviceSurfaceCapabilitiesKHR(VkPhysicalDevice phys_dev, - VkSurfaceKHR surface, VkSurfaceCapabilitiesKHR *capabilities) -{ - TRACE("%p, 0x%s, %p\n", phys_dev, wine_dbgstr_longlong(surface), capabilities); - return vk_funcs->p_vkGetPhysicalDeviceSurfaceCapabilitiesKHR(phys_dev->phys_dev, - surface, capabilities); -} - -VkResult WINAPI wine_vkGetPhysicalDeviceSurfaceFormatsKHR(VkPhysicalDevice phys_dev, - VkSurfaceKHR surface, uint32_t *format_count, VkSurfaceFormatKHR *formats) -{ - TRACE("%p, 0x%s, %p, %p\n", phys_dev, wine_dbgstr_longlong(surface), format_count, formats); - return vk_funcs->p_vkGetPhysicalDeviceSurfaceFormatsKHR(phys_dev->phys_dev, - surface, format_count, formats); -} - -VkResult WINAPI wine_vkGetPhysicalDeviceSurfacePresentModesKHR(VkPhysicalDevice phys_dev, - VkSurfaceKHR surface, uint32_t *mode_count, VkPresentModeKHR *modes) -{ - TRACE("%p, 0x%s, %p, %p\n", phys_dev, wine_dbgstr_longlong(surface), mode_count, modes); - return vk_funcs->p_vkGetPhysicalDeviceSurfacePresentModesKHR(phys_dev->phys_dev, - surface, mode_count, modes); -} - -VkResult WINAPI wine_vkGetPhysicalDeviceSurfaceSupportKHR(VkPhysicalDevice phys_dev, - uint32_t queue_family_index, VkSurfaceKHR surface, VkBool32 *supported) -{ - TRACE("%p, %u, 0x%s, %p\n", phys_dev, queue_family_index, wine_dbgstr_longlong(surface), supported); - return vk_funcs->p_vkGetPhysicalDeviceSurfaceSupportKHR(phys_dev->phys_dev, - queue_family_index, surface, supported); -} - -VkBool32 WINAPI wine_vkGetPhysicalDeviceWin32PresentationSupportKHR(VkPhysicalDevice phys_dev, - uint32_t queue_family_index) -{ - TRACE("%p %u\n", phys_dev, queue_family_index); - return vk_funcs->p_vkGetPhysicalDeviceWin32PresentationSupportKHR(phys_dev->phys_dev, - queue_family_index); -} - -VkResult WINAPI wine_vkGetSwapchainImagesKHR(VkDevice device, VkSwapchainKHR swapchain, - uint32_t *image_count, VkImage *images) -{ - TRACE("%p, 0x%s %p %p\n", device, wine_dbgstr_longlong(swapchain), image_count, images); - return vk_funcs->p_vkGetSwapchainImagesKHR(device->device, swapchain, - image_count, images); -} - -VkResult WINAPI wine_vkQueuePresentKHR(VkQueue queue, const VkPresentInfoKHR *present_info) -{ - TRACE("%p, %p\n", queue, present_info); - return vk_funcs->p_vkQueuePresentKHR(queue->queue, present_info); -} - void * WINAPI wine_vk_icdGetInstanceProcAddr(VkInstance instance, const char *name) { TRACE("%p %s\n", instance, debugstr_a(name)); diff --git a/dlls/winevulkan/vulkan_thunks.c b/dlls/winevulkan/vulkan_thunks.c index 463a04a78f2..2f2b8c196f1 100644 --- a/dlls/winevulkan/vulkan_thunks.c +++ b/dlls/winevulkan/vulkan_thunks.c @@ -486,6 +486,30 @@ static inline void convert_VkImageViewCreateInfo_win_to_host(const VkImageViewCr out->subresourceRange = in->subresourceRange; } +static inline void convert_VkSwapchainCreateInfoKHR_win_to_host(const VkSwapchainCreateInfoKHR *in, VkSwapchainCreateInfoKHR_host *out) +{ + if (!in) return; + + out->sType = in->sType; + out->pNext = in->pNext; + out->flags = in->flags; + out->surface = in->surface; + out->minImageCount = in->minImageCount; + out->imageFormat = in->imageFormat; + out->imageColorSpace = in->imageColorSpace; + out->imageExtent = in->imageExtent; + out->imageArrayLayers = in->imageArrayLayers; + out->imageUsage = in->imageUsage; + out->imageSharingMode = in->imageSharingMode; + out->queueFamilyIndexCount = in->queueFamilyIndexCount; + out->pQueueFamilyIndices = in->pQueueFamilyIndices; + out->preTransform = in->preTransform; + out->compositeAlpha = in->compositeAlpha; + out->presentMode = in->presentMode; + out->clipped = in->clipped; + out->oldSwapchain = in->oldSwapchain; +} + static inline VkMappedMemoryRange_host *convert_VkMappedMemoryRange_array_win_to_host(const VkMappedMemoryRange *in, uint32_t count) { VkMappedMemoryRange_host *out; @@ -968,6 +992,12 @@ static inline void free_VkCopyDescriptorSet_array(VkCopyDescriptorSet_host *in, #endif /* USE_STRUCT_CONVERSION */ +static VkResult WINAPI wine_vkAcquireNextImageKHR(VkDevice device, VkSwapchainKHR swapchain, uint64_t timeout, VkSemaphore semaphore, VkFence fence, uint32_t *pImageIndex) +{ + TRACE("%p, 0x%s, 0x%s, 0x%s, 0x%s, %p\n", device, wine_dbgstr_longlong(swapchain), wine_dbgstr_longlong(timeout), wine_dbgstr_longlong(semaphore), wine_dbgstr_longlong(fence), pImageIndex); + return device->funcs.p_vkAcquireNextImageKHR(device->device, swapchain, timeout, semaphore, fence, pImageIndex); +} + static VkResult WINAPI wine_vkAllocateDescriptorSets(VkDevice device, const VkDescriptorSetAllocateInfo *pAllocateInfo, VkDescriptorSet *pDescriptorSets) { #if defined(USE_STRUCT_CONVERSION) @@ -1600,6 +1630,29 @@ static VkResult WINAPI wine_vkCreateShaderModule(VkDevice device, const VkShader return device->funcs.p_vkCreateShaderModule(device->device, pCreateInfo, NULL, pShaderModule); } +static VkResult WINAPI wine_vkCreateSwapchainKHR(VkDevice device, const VkSwapchainCreateInfoKHR *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkSwapchainKHR *pSwapchain) +{ +#if defined(USE_STRUCT_CONVERSION) + VkResult result; + VkSwapchainCreateInfoKHR_host pCreateInfo_host; + TRACE("%p, %p, %p, %p\n", device, pCreateInfo, pAllocator, pSwapchain); + + convert_VkSwapchainCreateInfoKHR_win_to_host(pCreateInfo, &pCreateInfo_host); + result = device->funcs.p_vkCreateSwapchainKHR(device->device, &pCreateInfo_host, NULL, pSwapchain); + + return result; +#else + TRACE("%p, %p, %p, %p\n", device, pCreateInfo, pAllocator, pSwapchain); + return device->funcs.p_vkCreateSwapchainKHR(device->device, pCreateInfo, NULL, pSwapchain); +#endif +} + +static VkResult WINAPI wine_vkCreateWin32SurfaceKHR(VkInstance instance, const VkWin32SurfaceCreateInfoKHR *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface) +{ + TRACE("%p, %p, %p, %p\n", instance, pCreateInfo, pAllocator, pSurface); + return instance->funcs.p_vkCreateWin32SurfaceKHR(instance->instance, pCreateInfo, NULL, pSurface); +} + static void WINAPI wine_vkDestroyBuffer(VkDevice device, VkBuffer buffer, const VkAllocationCallbacks *pAllocator) { TRACE("%p, 0x%s, %p\n", device, wine_dbgstr_longlong(buffer), pAllocator); @@ -1714,6 +1767,18 @@ static void WINAPI wine_vkDestroyShaderModule(VkDevice device, VkShaderModule sh device->funcs.p_vkDestroyShaderModule(device->device, shaderModule, NULL); } +static void WINAPI wine_vkDestroySurfaceKHR(VkInstance instance, VkSurfaceKHR surface, const VkAllocationCallbacks *pAllocator) +{ + TRACE("%p, 0x%s, %p\n", instance, wine_dbgstr_longlong(surface), pAllocator); + instance->funcs.p_vkDestroySurfaceKHR(instance->instance, surface, NULL); +} + +static void WINAPI wine_vkDestroySwapchainKHR(VkDevice device, VkSwapchainKHR swapchain, const VkAllocationCallbacks *pAllocator) +{ + TRACE("%p, 0x%s, %p\n", device, wine_dbgstr_longlong(swapchain), pAllocator); + device->funcs.p_vkDestroySwapchainKHR(device->device, swapchain, NULL); +} + static VkResult WINAPI wine_vkDeviceWaitIdle(VkDevice device) { TRACE("%p\n", device); @@ -1976,6 +2041,36 @@ static void WINAPI wine_vkGetPhysicalDeviceSparseImageFormatProperties2KHR(VkPhy physicalDevice->instance->funcs.p_vkGetPhysicalDeviceSparseImageFormatProperties2KHR(physicalDevice->phys_dev, pFormatInfo, pPropertyCount, pProperties); } +static VkResult WINAPI wine_vkGetPhysicalDeviceSurfaceCapabilitiesKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, VkSurfaceCapabilitiesKHR *pSurfaceCapabilities) +{ + TRACE("%p, 0x%s, %p\n", physicalDevice, wine_dbgstr_longlong(surface), pSurfaceCapabilities); + return physicalDevice->instance->funcs.p_vkGetPhysicalDeviceSurfaceCapabilitiesKHR(physicalDevice->phys_dev, surface, pSurfaceCapabilities); +} + +static VkResult WINAPI wine_vkGetPhysicalDeviceSurfaceFormatsKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t *pSurfaceFormatCount, VkSurfaceFormatKHR *pSurfaceFormats) +{ + TRACE("%p, 0x%s, %p, %p\n", physicalDevice, wine_dbgstr_longlong(surface), pSurfaceFormatCount, pSurfaceFormats); + return physicalDevice->instance->funcs.p_vkGetPhysicalDeviceSurfaceFormatsKHR(physicalDevice->phys_dev, surface, pSurfaceFormatCount, pSurfaceFormats); +} + +static VkResult WINAPI wine_vkGetPhysicalDeviceSurfacePresentModesKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t *pPresentModeCount, VkPresentModeKHR *pPresentModes) +{ + TRACE("%p, 0x%s, %p, %p\n", physicalDevice, wine_dbgstr_longlong(surface), pPresentModeCount, pPresentModes); + return physicalDevice->instance->funcs.p_vkGetPhysicalDeviceSurfacePresentModesKHR(physicalDevice->phys_dev, surface, pPresentModeCount, pPresentModes); +} + +static VkResult WINAPI wine_vkGetPhysicalDeviceSurfaceSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, VkSurfaceKHR surface, VkBool32 *pSupported) +{ + TRACE("%p, %u, 0x%s, %p\n", physicalDevice, queueFamilyIndex, wine_dbgstr_longlong(surface), pSupported); + return physicalDevice->instance->funcs.p_vkGetPhysicalDeviceSurfaceSupportKHR(physicalDevice->phys_dev, queueFamilyIndex, surface, pSupported); +} + +static VkBool32 WINAPI wine_vkGetPhysicalDeviceWin32PresentationSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex) +{ + TRACE("%p, %u\n", physicalDevice, queueFamilyIndex); + return physicalDevice->instance->funcs.p_vkGetPhysicalDeviceWin32PresentationSupportKHR(physicalDevice->phys_dev, queueFamilyIndex); +} + static VkResult WINAPI wine_vkGetPipelineCacheData(VkDevice device, VkPipelineCache pipelineCache, size_t *pDataSize, void *pData) { TRACE("%p, 0x%s, %p, %p\n", device, wine_dbgstr_longlong(pipelineCache), pDataSize, pData); @@ -1994,6 +2089,12 @@ static void WINAPI wine_vkGetRenderAreaGranularity(VkDevice device, VkRenderPass device->funcs.p_vkGetRenderAreaGranularity(device->device, renderPass, pGranularity); } +static VkResult WINAPI wine_vkGetSwapchainImagesKHR(VkDevice device, VkSwapchainKHR swapchain, uint32_t *pSwapchainImageCount, VkImage *pSwapchainImages) +{ + TRACE("%p, 0x%s, %p, %p\n", device, wine_dbgstr_longlong(swapchain), pSwapchainImageCount, pSwapchainImages); + return device->funcs.p_vkGetSwapchainImagesKHR(device->device, swapchain, pSwapchainImageCount, pSwapchainImages); +} + static VkResult WINAPI wine_vkInvalidateMappedMemoryRanges(VkDevice device, uint32_t memoryRangeCount, const VkMappedMemoryRange *pMemoryRanges) { #if defined(USE_STRUCT_CONVERSION) @@ -2042,6 +2143,12 @@ static VkResult WINAPI wine_vkQueueBindSparse(VkQueue queue, uint32_t bindInfoCo #endif } +static VkResult WINAPI wine_vkQueuePresentKHR(VkQueue queue, const VkPresentInfoKHR *pPresentInfo) +{ + TRACE("%p, %p\n", queue, pPresentInfo); + return queue->device->funcs.p_vkQueuePresentKHR(queue->queue, pPresentInfo); +} + static VkResult WINAPI wine_vkQueueWaitIdle(VkQueue queue) { TRACE("%p\n", queue); diff --git a/dlls/winevulkan/vulkan_thunks.h b/dlls/winevulkan/vulkan_thunks.h index cca1026037b..fb9afdf5243 100644 --- a/dlls/winevulkan/vulkan_thunks.h +++ b/dlls/winevulkan/vulkan_thunks.h @@ -16,28 +16,16 @@ BOOL wine_vk_device_extension_supported(const char *name) DECLSPEC_HIDDEN; BOOL wine_vk_instance_extension_supported(const char *name) DECLSPEC_HIDDEN; /* Functions for which we have custom implementations outside of the thunks. */ -VkResult WINAPI wine_vkAcquireNextImageKHR(VkDevice device, VkSwapchainKHR swapchain, uint64_t timeout, VkSemaphore semaphore, VkFence fence, uint32_t *pImageIndex) DECLSPEC_HIDDEN; VkResult WINAPI wine_vkAllocateCommandBuffers(VkDevice device, const VkCommandBufferAllocateInfo *pAllocateInfo, VkCommandBuffer *pCommandBuffers) DECLSPEC_HIDDEN; void WINAPI wine_vkCmdExecuteCommands(VkCommandBuffer commandBuffer, uint32_t commandBufferCount, const VkCommandBuffer *pCommandBuffers) DECLSPEC_HIDDEN; VkResult WINAPI wine_vkCreateDevice(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkDevice *pDevice) DECLSPEC_HIDDEN; -VkResult WINAPI wine_vkCreateSwapchainKHR(VkDevice device, const VkSwapchainCreateInfoKHR *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkSwapchainKHR *pSwapchain) DECLSPEC_HIDDEN; -VkResult WINAPI wine_vkCreateWin32SurfaceKHR(VkInstance instance, const VkWin32SurfaceCreateInfoKHR *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface) DECLSPEC_HIDDEN; void WINAPI wine_vkDestroyDevice(VkDevice device, const VkAllocationCallbacks *pAllocator) DECLSPEC_HIDDEN; void WINAPI wine_vkDestroyInstance(VkInstance instance, const VkAllocationCallbacks *pAllocator) DECLSPEC_HIDDEN; -void WINAPI wine_vkDestroySurfaceKHR(VkInstance instance, VkSurfaceKHR surface, const VkAllocationCallbacks *pAllocator) DECLSPEC_HIDDEN; -void WINAPI wine_vkDestroySwapchainKHR(VkDevice device, VkSwapchainKHR swapchain, const VkAllocationCallbacks *pAllocator) DECLSPEC_HIDDEN; VkResult WINAPI wine_vkEnumerateDeviceExtensionProperties(VkPhysicalDevice physicalDevice, const char *pLayerName, uint32_t *pPropertyCount, VkExtensionProperties *pProperties) DECLSPEC_HIDDEN; VkResult WINAPI wine_vkEnumeratePhysicalDevices(VkInstance instance, uint32_t *pPhysicalDeviceCount, VkPhysicalDevice *pPhysicalDevices) DECLSPEC_HIDDEN; void WINAPI wine_vkFreeCommandBuffers(VkDevice device, VkCommandPool commandPool, uint32_t commandBufferCount, const VkCommandBuffer *pCommandBuffers) DECLSPEC_HIDDEN; PFN_vkVoidFunction WINAPI wine_vkGetDeviceProcAddr(VkDevice device, const char *pName) DECLSPEC_HIDDEN; void WINAPI wine_vkGetDeviceQueue(VkDevice device, uint32_t queueFamilyIndex, uint32_t queueIndex, VkQueue *pQueue) DECLSPEC_HIDDEN; -VkResult WINAPI wine_vkGetPhysicalDeviceSurfaceCapabilitiesKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, VkSurfaceCapabilitiesKHR *pSurfaceCapabilities) DECLSPEC_HIDDEN; -VkResult WINAPI wine_vkGetPhysicalDeviceSurfaceFormatsKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t *pSurfaceFormatCount, VkSurfaceFormatKHR *pSurfaceFormats) DECLSPEC_HIDDEN; -VkResult WINAPI wine_vkGetPhysicalDeviceSurfacePresentModesKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t *pPresentModeCount, VkPresentModeKHR *pPresentModes) DECLSPEC_HIDDEN; -VkResult WINAPI wine_vkGetPhysicalDeviceSurfaceSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, VkSurfaceKHR surface, VkBool32 *pSupported) DECLSPEC_HIDDEN; -VkBool32 WINAPI wine_vkGetPhysicalDeviceWin32PresentationSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex) DECLSPEC_HIDDEN; -VkResult WINAPI wine_vkGetSwapchainImagesKHR(VkDevice device, VkSwapchainKHR swapchain, uint32_t *pSwapchainImageCount, VkImage *pSwapchainImages) DECLSPEC_HIDDEN; -VkResult WINAPI wine_vkQueuePresentKHR(VkQueue queue, const VkPresentInfoKHR *pPresentInfo) DECLSPEC_HIDDEN; VkResult WINAPI wine_vkQueueSubmit(VkQueue queue, uint32_t submitCount, const VkSubmitInfo *pSubmits, VkFence fence) DECLSPEC_HIDDEN; typedef struct VkCommandBufferAllocateInfo_host @@ -563,6 +551,7 @@ typedef struct VkCopyDescriptorSet_host /* For use by vkDevice and children */ struct vulkan_device_funcs { + VkResult (*p_vkAcquireNextImageKHR)(VkDevice, VkSwapchainKHR, uint64_t, VkSemaphore, VkFence, uint32_t *); #if defined(USE_STRUCT_CONVERSION) VkResult (*p_vkAllocateCommandBuffers)(VkDevice, const VkCommandBufferAllocateInfo_host *, VkCommandBuffer *); #else @@ -711,6 +700,11 @@ struct vulkan_device_funcs VkResult (*p_vkCreateSampler)(VkDevice, const VkSamplerCreateInfo *, const VkAllocationCallbacks *, VkSampler *); VkResult (*p_vkCreateSemaphore)(VkDevice, const VkSemaphoreCreateInfo *, const VkAllocationCallbacks *, VkSemaphore *); VkResult (*p_vkCreateShaderModule)(VkDevice, const VkShaderModuleCreateInfo *, const VkAllocationCallbacks *, VkShaderModule *); +#if defined(USE_STRUCT_CONVERSION) + VkResult (*p_vkCreateSwapchainKHR)(VkDevice, const VkSwapchainCreateInfoKHR_host *, const VkAllocationCallbacks *, VkSwapchainKHR *); +#else + VkResult (*p_vkCreateSwapchainKHR)(VkDevice, const VkSwapchainCreateInfoKHR *, const VkAllocationCallbacks *, VkSwapchainKHR *); +#endif void (*p_vkDestroyBuffer)(VkDevice, VkBuffer, const VkAllocationCallbacks *); void (*p_vkDestroyBufferView)(VkDevice, VkBufferView, const VkAllocationCallbacks *); void (*p_vkDestroyCommandPool)(VkDevice, VkCommandPool, const VkAllocationCallbacks *); @@ -731,6 +725,7 @@ struct vulkan_device_funcs void (*p_vkDestroySampler)(VkDevice, VkSampler, const VkAllocationCallbacks *); void (*p_vkDestroySemaphore)(VkDevice, VkSemaphore, const VkAllocationCallbacks *); void (*p_vkDestroyShaderModule)(VkDevice, VkShaderModule, const VkAllocationCallbacks *); + void (*p_vkDestroySwapchainKHR)(VkDevice, VkSwapchainKHR, const VkAllocationCallbacks *); VkResult (*p_vkDeviceWaitIdle)(VkDevice); VkResult (*p_vkEndCommandBuffer)(VkCommandBuffer); #if defined(USE_STRUCT_CONVERSION) @@ -764,6 +759,7 @@ struct vulkan_device_funcs VkResult (*p_vkGetPipelineCacheData)(VkDevice, VkPipelineCache, size_t *, void *); VkResult (*p_vkGetQueryPoolResults)(VkDevice, VkQueryPool, uint32_t, uint32_t, size_t, void *, VkDeviceSize, VkQueryResultFlags); void (*p_vkGetRenderAreaGranularity)(VkDevice, VkRenderPass, VkExtent2D *); + VkResult (*p_vkGetSwapchainImagesKHR)(VkDevice, VkSwapchainKHR, uint32_t *, VkImage *); #if defined(USE_STRUCT_CONVERSION) VkResult (*p_vkInvalidateMappedMemoryRanges)(VkDevice, uint32_t, const VkMappedMemoryRange_host *); #else @@ -776,6 +772,7 @@ struct vulkan_device_funcs #else VkResult (*p_vkQueueBindSparse)(VkQueue, uint32_t, const VkBindSparseInfo *, VkFence); #endif + VkResult (*p_vkQueuePresentKHR)(VkQueue, const VkPresentInfoKHR *); VkResult (*p_vkQueueSubmit)(VkQueue, uint32_t, const VkSubmitInfo *, VkFence); VkResult (*p_vkQueueWaitIdle)(VkQueue); VkResult (*p_vkResetCommandBuffer)(VkCommandBuffer, VkCommandBufferResetFlags); @@ -799,6 +796,8 @@ struct vulkan_device_funcs struct vulkan_instance_funcs { VkResult (*p_vkCreateDevice)(VkPhysicalDevice, const VkDeviceCreateInfo *, const VkAllocationCallbacks *, VkDevice *); + VkResult (*p_vkCreateWin32SurfaceKHR)(VkInstance, const VkWin32SurfaceCreateInfoKHR *, const VkAllocationCallbacks *, VkSurfaceKHR *); + void (*p_vkDestroySurfaceKHR)(VkInstance, VkSurfaceKHR, const VkAllocationCallbacks *); VkResult (*p_vkEnumerateDeviceExtensionProperties)(VkPhysicalDevice, const char *, uint32_t *, VkExtensionProperties *); VkResult (*p_vkEnumerateDeviceLayerProperties)(VkPhysicalDevice, uint32_t *, VkLayerProperties *); VkResult (*p_vkEnumeratePhysicalDevices)(VkInstance, uint32_t *, VkPhysicalDevice *); @@ -840,9 +839,15 @@ struct vulkan_instance_funcs void (*p_vkGetPhysicalDeviceQueueFamilyProperties2KHR)(VkPhysicalDevice, uint32_t *, VkQueueFamilyProperties2KHR *); void (*p_vkGetPhysicalDeviceSparseImageFormatProperties)(VkPhysicalDevice, VkFormat, VkImageType, VkSampleCountFlagBits, VkImageUsageFlags, VkImageTiling, uint32_t *, VkSparseImageFormatProperties *); void (*p_vkGetPhysicalDeviceSparseImageFormatProperties2KHR)(VkPhysicalDevice, const VkPhysicalDeviceSparseImageFormatInfo2KHR *, uint32_t *, VkSparseImageFormatProperties2KHR *); + VkResult (*p_vkGetPhysicalDeviceSurfaceCapabilitiesKHR)(VkPhysicalDevice, VkSurfaceKHR, VkSurfaceCapabilitiesKHR *); + VkResult (*p_vkGetPhysicalDeviceSurfaceFormatsKHR)(VkPhysicalDevice, VkSurfaceKHR, uint32_t *, VkSurfaceFormatKHR *); + VkResult (*p_vkGetPhysicalDeviceSurfacePresentModesKHR)(VkPhysicalDevice, VkSurfaceKHR, uint32_t *, VkPresentModeKHR *); + VkResult (*p_vkGetPhysicalDeviceSurfaceSupportKHR)(VkPhysicalDevice, uint32_t, VkSurfaceKHR, VkBool32 *); + VkBool32 (*p_vkGetPhysicalDeviceWin32PresentationSupportKHR)(VkPhysicalDevice, uint32_t); }; #define ALL_VK_DEVICE_FUNCS() \ + USE_VK_FUNC(vkAcquireNextImageKHR) \ USE_VK_FUNC(vkAllocateCommandBuffers) \ USE_VK_FUNC(vkAllocateDescriptorSets) \ USE_VK_FUNC(vkAllocateMemory) \ @@ -919,6 +924,7 @@ struct vulkan_instance_funcs USE_VK_FUNC(vkCreateSampler) \ USE_VK_FUNC(vkCreateSemaphore) \ USE_VK_FUNC(vkCreateShaderModule) \ + USE_VK_FUNC(vkCreateSwapchainKHR) \ USE_VK_FUNC(vkDestroyBuffer) \ USE_VK_FUNC(vkDestroyBufferView) \ USE_VK_FUNC(vkDestroyCommandPool) \ @@ -939,6 +945,7 @@ struct vulkan_instance_funcs USE_VK_FUNC(vkDestroySampler) \ USE_VK_FUNC(vkDestroySemaphore) \ USE_VK_FUNC(vkDestroyShaderModule) \ + USE_VK_FUNC(vkDestroySwapchainKHR) \ USE_VK_FUNC(vkDeviceWaitIdle) \ USE_VK_FUNC(vkEndCommandBuffer) \ USE_VK_FUNC(vkFlushMappedMemoryRanges) \ @@ -956,10 +963,12 @@ struct vulkan_instance_funcs USE_VK_FUNC(vkGetPipelineCacheData) \ USE_VK_FUNC(vkGetQueryPoolResults) \ USE_VK_FUNC(vkGetRenderAreaGranularity) \ + USE_VK_FUNC(vkGetSwapchainImagesKHR) \ USE_VK_FUNC(vkInvalidateMappedMemoryRanges) \ USE_VK_FUNC(vkMapMemory) \ USE_VK_FUNC(vkMergePipelineCaches) \ USE_VK_FUNC(vkQueueBindSparse) \ + USE_VK_FUNC(vkQueuePresentKHR) \ USE_VK_FUNC(vkQueueSubmit) \ USE_VK_FUNC(vkQueueWaitIdle) \ USE_VK_FUNC(vkResetCommandBuffer) \ @@ -976,6 +985,8 @@ struct vulkan_instance_funcs #define ALL_VK_INSTANCE_FUNCS() \ USE_VK_FUNC(vkCreateDevice) \ + USE_VK_FUNC(vkCreateWin32SurfaceKHR) \ + USE_VK_FUNC(vkDestroySurfaceKHR) \ USE_VK_FUNC(vkEnumerateDeviceExtensionProperties) \ USE_VK_FUNC(vkEnumerateDeviceLayerProperties) \ USE_VK_FUNC(vkEnumeratePhysicalDevices) \ @@ -992,6 +1003,11 @@ struct vulkan_instance_funcs USE_VK_FUNC(vkGetPhysicalDeviceQueueFamilyProperties) \ USE_VK_FUNC(vkGetPhysicalDeviceQueueFamilyProperties2KHR) \ USE_VK_FUNC(vkGetPhysicalDeviceSparseImageFormatProperties) \ - USE_VK_FUNC(vkGetPhysicalDeviceSparseImageFormatProperties2KHR) + USE_VK_FUNC(vkGetPhysicalDeviceSparseImageFormatProperties2KHR) \ + USE_VK_FUNC(vkGetPhysicalDeviceSurfaceCapabilitiesKHR) \ + USE_VK_FUNC(vkGetPhysicalDeviceSurfaceFormatsKHR) \ + USE_VK_FUNC(vkGetPhysicalDeviceSurfacePresentModesKHR) \ + USE_VK_FUNC(vkGetPhysicalDeviceSurfaceSupportKHR) \ + USE_VK_FUNC(vkGetPhysicalDeviceWin32PresentationSupportKHR) #endif /* __WINE_VULKAN_THUNKS_H */