anv/wsi: remove device from get_support interface
authorDave Airlie <airlied@redhat.com>
Thu, 13 Oct 2016 04:26:03 +0000 (05:26 +0100)
committerDave Airlie <airlied@redhat.com>
Wed, 19 Oct 2016 00:15:42 +0000 (10:15 +1000)
replace with wsi_device and allocator.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/intel/vulkan/anv_wsi.c
src/intel/vulkan/anv_wsi.h
src/intel/vulkan/anv_wsi_wayland.c
src/intel/vulkan/anv_wsi_x11.c

index 767fa79f7af1fc41f24eb2513fd0a65aa1420b16..a77cfe9c94bb3730237cf64aae9e53f8a421372f 100644 (file)
@@ -81,7 +81,9 @@ VkResult anv_GetPhysicalDeviceSurfaceSupportKHR(
    ANV_FROM_HANDLE(_VkIcdSurfaceBase, surface, _surface);
    struct anv_wsi_interface *iface = device->wsi_device.wsi[surface->platform];
 
-   return iface->get_support(surface, device, queueFamilyIndex, pSupported);
+   return iface->get_support(surface, &device->wsi_device,
+                             &device->instance->alloc,
+                             queueFamilyIndex, pSupported);
 }
 
 VkResult anv_GetPhysicalDeviceSurfaceCapabilitiesKHR(
index e1c8d021ad632e4e8ad6225bcf7e7977b53207da..7bd938b2d91869aa0ca98ee1f8f9e8c4c29441c6 100644 (file)
@@ -30,7 +30,8 @@ struct anv_swapchain;
 
 struct anv_wsi_interface {
    VkResult (*get_support)(VkIcdSurfaceBase *surface,
-                           struct anv_physical_device *device,
+                           struct anv_wsi_device *wsi_device,
+                           const VkAllocationCallbacks *alloc,
                            uint32_t queueFamilyIndex,
                            VkBool32* pSupported);
    VkResult (*get_capabilities)(VkIcdSurfaceBase *surface,
index 2c9eecfa64a48a1594c9ed75eb9ceead9cb1488f..d0b7606ecae215f4da1c609f939678131ea9704d 100644 (file)
@@ -332,7 +332,8 @@ VkBool32 anv_GetPhysicalDeviceWaylandPresentationSupportKHR(
 
 static VkResult
 wsi_wl_surface_get_support(VkIcdSurfaceBase *surface,
-                           struct anv_physical_device *device,
+                           struct anv_wsi_device *wsi_device,
+                           const VkAllocationCallbacks *alloc,
                            uint32_t queueFamilyIndex,
                            VkBool32* pSupported)
 {
index 6eb06c31eaaea4df74f888a26ed4cb5b8fb0ef6b..f438e5b78e1825e5e195c13b5195073da5231806 100644 (file)
@@ -306,7 +306,8 @@ x11_surface_get_window(VkIcdSurfaceBase *icd_surface)
 
 static VkResult
 x11_surface_get_support(VkIcdSurfaceBase *icd_surface,
-                        struct anv_physical_device *device,
+                        struct anv_wsi_device *wsi_device,
+                        const VkAllocationCallbacks *alloc,
                         uint32_t queueFamilyIndex,
                         VkBool32* pSupported)
 {
@@ -314,7 +315,7 @@ x11_surface_get_support(VkIcdSurfaceBase *icd_surface,
    xcb_window_t window = x11_surface_get_window(icd_surface);
 
    struct wsi_x11_connection *wsi_conn =
-      wsi_x11_get_connection(&device->wsi_device, &device->instance->alloc, conn);
+      wsi_x11_get_connection(wsi_device, alloc, conn);
    if (!wsi_conn)
       return vk_error(VK_ERROR_OUT_OF_HOST_MEMORY);