anv/wsi: drop device from get format
authorDave Airlie <airlied@redhat.com>
Thu, 13 Oct 2016 04:32:41 +0000 (05:32 +0100)
committerDave Airlie <airlied@redhat.com>
Wed, 19 Oct 2016 00:15:42 +0000 (10:15 +1000)
Just use the wsi_device instead.

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 a77cfe9c94bb3730237cf64aae9e53f8a421372f..5b94e755751052f3f15e66734b83046f621e811c 100644 (file)
@@ -108,7 +108,7 @@ VkResult anv_GetPhysicalDeviceSurfaceFormatsKHR(
    ANV_FROM_HANDLE(_VkIcdSurfaceBase, surface, _surface);
    struct anv_wsi_interface *iface = device->wsi_device.wsi[surface->platform];
 
-   return iface->get_formats(surface, device, pSurfaceFormatCount,
+   return iface->get_formats(surface, &device->wsi_device, pSurfaceFormatCount,
                              pSurfaceFormats);
 }
 
index 7bd938b2d91869aa0ca98ee1f8f9e8c4c29441c6..8b1f106fe5ff0b36aedeb7b97f361337205abf9a 100644 (file)
@@ -37,7 +37,7 @@ struct anv_wsi_interface {
    VkResult (*get_capabilities)(VkIcdSurfaceBase *surface,
                                 VkSurfaceCapabilitiesKHR* pSurfaceCapabilities);
    VkResult (*get_formats)(VkIcdSurfaceBase *surface,
-                           struct anv_physical_device *device,
+                           struct anv_wsi_device *wsi_device,
                            uint32_t* pSurfaceFormatCount,
                            VkSurfaceFormatKHR* pSurfaceFormats);
    VkResult (*get_present_modes)(VkIcdSurfaceBase *surface,
index d0b7606ecae215f4da1c609f939678131ea9704d..0c55ad2efa24c49327858740bca77f274fea7f79 100644 (file)
@@ -375,13 +375,13 @@ wsi_wl_surface_get_capabilities(VkIcdSurfaceBase *surface,
 
 static VkResult
 wsi_wl_surface_get_formats(VkIcdSurfaceBase *icd_surface,
-                           struct anv_physical_device *device,
+                           struct anv_wsi_device *wsi_device,
                            uint32_t* pSurfaceFormatCount,
                            VkSurfaceFormatKHR* pSurfaceFormats)
 {
    VkIcdSurfaceWayland *surface = (VkIcdSurfaceWayland *)icd_surface;
    struct wsi_wl_display *display =
-      wsi_wl_get_display(&device->wsi_device, surface->display);
+      wsi_wl_get_display(wsi_device, surface->display);
 
    uint32_t count = u_vector_length(&display->formats);
 
index f438e5b78e1825e5e195c13b5195073da5231806..1a8058f44ad79be9cef26b5b335ca4fd9ec4061d 100644 (file)
@@ -401,7 +401,7 @@ x11_surface_get_capabilities(VkIcdSurfaceBase *icd_surface,
 
 static VkResult
 x11_surface_get_formats(VkIcdSurfaceBase *surface,
-                        struct anv_physical_device *device,
+                        struct anv_wsi_device *wsi_device,
                         uint32_t *pSurfaceFormatCount,
                         VkSurfaceFormatKHR *pSurfaceFormats)
 {