mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-01 18:58:29 +00:00
winevulkan: Remove now unnecessary vkCreateSwapchainKHR driver entry.
This commit is contained in:
parent
381125f749
commit
b395d9ec9f
|
@ -70,7 +70,6 @@ static void *win32u_vkGetDeviceProcAddr( VkDevice device, const char *name )
|
|||
{
|
||||
TRACE( "device %p, name %s\n", device, debugstr_a(name) );
|
||||
|
||||
if (!strcmp( name, "vkCreateSwapchainKHR" )) return vulkan_funcs.p_vkCreateSwapchainKHR;
|
||||
if (!strcmp( name, "vkGetDeviceProcAddr" )) return win32u_vkGetDeviceProcAddr;
|
||||
if (!strcmp( name, "vkQueuePresentKHR" )) return vulkan_funcs.p_vkQueuePresentKHR;
|
||||
|
||||
|
@ -89,7 +88,6 @@ static void *win32u_vkGetInstanceProcAddr( VkInstance instance, const char *name
|
|||
if (!strcmp( name, "vkGetPhysicalDeviceWin32PresentationSupportKHR" )) return vulkan_funcs.p_vkGetPhysicalDeviceWin32PresentationSupportKHR;
|
||||
|
||||
/* vkGetInstanceProcAddr also loads any children of instance, so device functions as well. */
|
||||
if (!strcmp( name, "vkCreateSwapchainKHR" )) return vulkan_funcs.p_vkCreateSwapchainKHR;
|
||||
if (!strcmp( name, "vkGetDeviceProcAddr" )) return win32u_vkGetDeviceProcAddr;
|
||||
if (!strcmp( name, "vkQueuePresentKHR" )) return vulkan_funcs.p_vkQueuePresentKHR;
|
||||
|
||||
|
|
|
@ -75,7 +75,6 @@ typedef struct VkMetalSurfaceCreateInfoEXT
|
|||
const void *pLayer; /* CAMetalLayer */
|
||||
} VkMetalSurfaceCreateInfoEXT;
|
||||
|
||||
static VkResult (*pvkCreateSwapchainKHR)(VkDevice, const VkSwapchainCreateInfoKHR *, const VkAllocationCallbacks *, VkSwapchainKHR *);
|
||||
static VkResult (*pvkCreateMacOSSurfaceMVK)(VkInstance, const VkMacOSSurfaceCreateInfoMVK*, const VkAllocationCallbacks *, VkSurfaceKHR *);
|
||||
static VkResult (*pvkCreateMetalSurfaceEXT)(VkInstance, const VkMetalSurfaceCreateInfoEXT*, const VkAllocationCallbacks *, VkSurfaceKHR *);
|
||||
static void (*pvkDestroySurfaceKHR)(VkInstance, VkSurfaceKHR, const VkAllocationCallbacks *);
|
||||
|
@ -101,23 +100,6 @@ static void wine_vk_surface_destroy(VkInstance instance, struct wine_vk_surface
|
|||
free(surface);
|
||||
}
|
||||
|
||||
static VkResult macdrv_vkCreateSwapchainKHR(VkDevice device,
|
||||
const VkSwapchainCreateInfoKHR *create_info,
|
||||
const VkAllocationCallbacks *allocator, VkSwapchainKHR *swapchain)
|
||||
{
|
||||
VkSwapchainCreateInfoKHR create_info_host;
|
||||
TRACE("%p %p %p %p\n", device, create_info, allocator, swapchain);
|
||||
|
||||
if (allocator)
|
||||
FIXME("Support for allocation callbacks not implemented yet\n");
|
||||
|
||||
create_info_host = *create_info;
|
||||
create_info_host.surface = surface_from_handle(create_info->surface)->host_surface;
|
||||
|
||||
return pvkCreateSwapchainKHR(device, &create_info_host, NULL /* allocator */,
|
||||
swapchain);
|
||||
}
|
||||
|
||||
static VkResult macdrv_vkCreateWin32SurfaceKHR(VkInstance instance,
|
||||
const VkWin32SurfaceCreateInfoKHR *create_info,
|
||||
const VkAllocationCallbacks *allocator, VkSurfaceKHR *surface)
|
||||
|
@ -242,7 +224,6 @@ static void macdrv_vulkan_surface_presented(HWND hwnd, VkResult result)
|
|||
|
||||
static const struct vulkan_funcs vulkan_funcs =
|
||||
{
|
||||
macdrv_vkCreateSwapchainKHR,
|
||||
macdrv_vkCreateWin32SurfaceKHR,
|
||||
macdrv_vkDestroySurfaceKHR,
|
||||
NULL,
|
||||
|
@ -264,7 +245,6 @@ UINT macdrv_VulkanInit(UINT version, void *vulkan_handle, struct vulkan_funcs *d
|
|||
}
|
||||
|
||||
#define LOAD_FUNCPTR(f) if ((p##f = dlsym(vulkan_handle, #f)) == NULL) return STATUS_PROCEDURE_NOT_FOUND;
|
||||
LOAD_FUNCPTR(vkCreateSwapchainKHR)
|
||||
LOAD_FUNCPTR(vkCreateMacOSSurfaceMVK)
|
||||
LOAD_FUNCPTR(vkCreateMetalSurfaceEXT)
|
||||
LOAD_FUNCPTR(vkDestroySurfaceKHR)
|
||||
|
|
|
@ -195,7 +195,6 @@ FUNCTION_OVERRIDES = {
|
|||
|
||||
# functions for which a user driver entry must be generated
|
||||
USER_DRIVER_FUNCS = {
|
||||
"vkCreateSwapchainKHR",
|
||||
"vkCreateWin32SurfaceKHR",
|
||||
"vkDestroySurfaceKHR",
|
||||
"vkGetDeviceProcAddr",
|
||||
|
|
|
@ -1695,7 +1695,7 @@ VkResult wine_vkCreateSwapchainKHR(VkDevice device_handle, const VkSwapchainCrea
|
|||
return VK_ERROR_INITIALIZATION_FAILED;
|
||||
}
|
||||
|
||||
if (surface) create_info_host.surface = surface->driver_surface;
|
||||
if (surface) create_info_host.surface = surface->host_surface;
|
||||
if (old_swapchain) create_info_host.oldSwapchain = old_swapchain->host_swapchain;
|
||||
|
||||
/* Windows allows client rect to be empty, but host Vulkan often doesn't, adjust extents back to the host capabilities */
|
||||
|
|
|
@ -53,7 +53,6 @@ typedef struct VkWaylandSurfaceCreateInfoKHR
|
|||
struct wl_surface *surface;
|
||||
} VkWaylandSurfaceCreateInfoKHR;
|
||||
|
||||
static VkResult (*pvkCreateSwapchainKHR)(VkDevice, const VkSwapchainCreateInfoKHR *, const VkAllocationCallbacks *, VkSwapchainKHR *);
|
||||
static VkResult (*pvkCreateWaylandSurfaceKHR)(VkInstance, const VkWaylandSurfaceCreateInfoKHR *, const VkAllocationCallbacks *, VkSurfaceKHR *);
|
||||
static void (*pvkDestroySurfaceKHR)(VkInstance, VkSurfaceKHR, const VkAllocationCallbacks *);
|
||||
static VkBool32 (*pvkGetPhysicalDeviceWaylandPresentationSupportKHR)(VkPhysicalDevice, uint32_t, struct wl_display *);
|
||||
|
@ -95,26 +94,6 @@ static void wine_vk_surface_destroy(struct wine_vk_surface *wine_vk_surface)
|
|||
free(wine_vk_surface);
|
||||
}
|
||||
|
||||
static VkResult wayland_vkCreateSwapchainKHR(VkDevice device,
|
||||
const VkSwapchainCreateInfoKHR *create_info,
|
||||
const VkAllocationCallbacks *allocator,
|
||||
VkSwapchainKHR *swapchain)
|
||||
{
|
||||
VkSwapchainCreateInfoKHR create_info_host;
|
||||
struct wine_vk_surface *wine_vk_surface = wine_vk_surface_from_handle(create_info->surface);
|
||||
|
||||
TRACE("%p %p %p %p\n", device, create_info, allocator, swapchain);
|
||||
|
||||
if (allocator)
|
||||
FIXME("Support for allocation callbacks not implemented yet\n");
|
||||
|
||||
create_info_host = *create_info;
|
||||
create_info_host.surface = wine_vk_surface->host_surface;
|
||||
|
||||
return pvkCreateSwapchainKHR(device, &create_info_host, NULL /* allocator */,
|
||||
swapchain);
|
||||
}
|
||||
|
||||
static VkResult wayland_vkCreateWin32SurfaceKHR(VkInstance instance,
|
||||
const VkWin32SurfaceCreateInfoKHR *create_info,
|
||||
const VkAllocationCallbacks *allocator,
|
||||
|
@ -239,7 +218,6 @@ static void wayland_vulkan_surface_presented(HWND hwnd, VkResult result)
|
|||
|
||||
static const struct vulkan_funcs vulkan_funcs =
|
||||
{
|
||||
.p_vkCreateSwapchainKHR = wayland_vkCreateSwapchainKHR,
|
||||
.p_vkCreateWin32SurfaceKHR = wayland_vkCreateWin32SurfaceKHR,
|
||||
.p_vkDestroySurfaceKHR = wayland_vkDestroySurfaceKHR,
|
||||
.p_vkGetPhysicalDeviceWin32PresentationSupportKHR = wayland_vkGetPhysicalDeviceWin32PresentationSupportKHR,
|
||||
|
@ -260,7 +238,6 @@ UINT WAYLAND_VulkanInit(UINT version, void *vulkan_handle, struct vulkan_funcs *
|
|||
}
|
||||
|
||||
#define LOAD_FUNCPTR(f) if (!(p##f = dlsym(vulkan_handle, #f))) return STATUS_PROCEDURE_NOT_FOUND;
|
||||
LOAD_FUNCPTR(vkCreateSwapchainKHR);
|
||||
LOAD_FUNCPTR(vkCreateWaylandSurfaceKHR);
|
||||
LOAD_FUNCPTR(vkDestroySurfaceKHR);
|
||||
LOAD_FUNCPTR(vkGetPhysicalDeviceWaylandPresentationSupportKHR);
|
||||
|
|
|
@ -73,7 +73,6 @@ typedef struct VkXlibSurfaceCreateInfoKHR
|
|||
Window window;
|
||||
} VkXlibSurfaceCreateInfoKHR;
|
||||
|
||||
static VkResult (*pvkCreateSwapchainKHR)(VkDevice, const VkSwapchainCreateInfoKHR *, const VkAllocationCallbacks *, VkSwapchainKHR *);
|
||||
static VkResult (*pvkCreateXlibSurfaceKHR)(VkInstance, const VkXlibSurfaceCreateInfoKHR *, const VkAllocationCallbacks *, VkSurfaceKHR *);
|
||||
static void (*pvkDestroySurfaceKHR)(VkInstance, VkSurfaceKHR, const VkAllocationCallbacks *);
|
||||
static VkBool32 (*pvkGetPhysicalDeviceXlibPresentationSupportKHR)(VkPhysicalDevice, uint32_t, Display *, VisualID);
|
||||
|
@ -133,26 +132,6 @@ void vulkan_thread_detach(void)
|
|||
pthread_mutex_unlock(&vulkan_mutex);
|
||||
}
|
||||
|
||||
static VkResult X11DRV_vkCreateSwapchainKHR(VkDevice device,
|
||||
const VkSwapchainCreateInfoKHR *create_info,
|
||||
const VkAllocationCallbacks *allocator, VkSwapchainKHR *swapchain)
|
||||
{
|
||||
struct wine_vk_surface *x11_surface = surface_from_handle(create_info->surface);
|
||||
VkSwapchainCreateInfoKHR create_info_host;
|
||||
TRACE("%p %p %p %p\n", device, create_info, allocator, swapchain);
|
||||
|
||||
if (allocator)
|
||||
FIXME("Support for allocation callbacks not implemented yet\n");
|
||||
|
||||
if (!x11_surface->hwnd)
|
||||
return VK_ERROR_SURFACE_LOST_KHR;
|
||||
|
||||
create_info_host = *create_info;
|
||||
create_info_host.surface = x11_surface->host_surface;
|
||||
|
||||
return pvkCreateSwapchainKHR(device, &create_info_host, NULL /* allocator */, swapchain);
|
||||
}
|
||||
|
||||
static VkResult X11DRV_vkCreateWin32SurfaceKHR(VkInstance instance,
|
||||
const VkWin32SurfaceCreateInfoKHR *create_info,
|
||||
const VkAllocationCallbacks *allocator, VkSurfaceKHR *surface)
|
||||
|
@ -259,7 +238,6 @@ static void X11DRV_vulkan_surface_presented(HWND hwnd, VkResult result)
|
|||
|
||||
static const struct vulkan_funcs vulkan_funcs =
|
||||
{
|
||||
X11DRV_vkCreateSwapchainKHR,
|
||||
X11DRV_vkCreateWin32SurfaceKHR,
|
||||
X11DRV_vkDestroySurfaceKHR,
|
||||
NULL,
|
||||
|
@ -283,7 +261,6 @@ UINT X11DRV_VulkanInit( UINT version, void *vulkan_handle, struct vulkan_funcs *
|
|||
init_recursive_mutex( &vulkan_mutex );
|
||||
|
||||
#define LOAD_FUNCPTR( f ) if (!(p##f = dlsym( vulkan_handle, #f ))) return STATUS_PROCEDURE_NOT_FOUND;
|
||||
LOAD_FUNCPTR( vkCreateSwapchainKHR );
|
||||
LOAD_FUNCPTR( vkCreateXlibSurfaceKHR );
|
||||
LOAD_FUNCPTR( vkDestroySurfaceKHR );
|
||||
LOAD_FUNCPTR( vkGetPhysicalDeviceXlibPresentationSupportKHR );
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#define __WINE_VULKAN_DRIVER_H
|
||||
|
||||
/* Wine internal vulkan driver version, needs to be bumped upon vulkan_funcs changes. */
|
||||
#define WINE_VULKAN_DRIVER_VERSION 26
|
||||
#define WINE_VULKAN_DRIVER_VERSION 27
|
||||
|
||||
struct vulkan_funcs
|
||||
{
|
||||
|
@ -29,7 +29,6 @@ struct vulkan_funcs
|
|||
* needs to provide. Other function calls will be provided indirectly by dispatch
|
||||
* tables part of dispatchable Vulkan objects such as VkInstance or vkDevice.
|
||||
*/
|
||||
VkResult (*p_vkCreateSwapchainKHR)(VkDevice, const VkSwapchainCreateInfoKHR *, const VkAllocationCallbacks *, VkSwapchainKHR *);
|
||||
VkResult (*p_vkCreateWin32SurfaceKHR)(VkInstance, const VkWin32SurfaceCreateInfoKHR *, const VkAllocationCallbacks *, VkSurfaceKHR *);
|
||||
void (*p_vkDestroySurfaceKHR)(VkInstance, VkSurfaceKHR, const VkAllocationCallbacks *);
|
||||
void * (*p_vkGetDeviceProcAddr)(VkDevice, const char *);
|
||||
|
|
Loading…
Reference in a new issue