[Mesa-dev] [PATCH 09/22] anv/wsi: drop device from get format

Dave Airlie airlied at gmail.com
Mon Oct 17 04:24:32 UTC 2016


From: Dave Airlie <airlied at redhat.com>

Just use the wsi_device instead.
---
 src/intel/vulkan/anv_wsi.c         | 2 +-
 src/intel/vulkan/anv_wsi.h         | 2 +-
 src/intel/vulkan/anv_wsi_wayland.c | 4 ++--
 src/intel/vulkan/anv_wsi_x11.c     | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/intel/vulkan/anv_wsi.c b/src/intel/vulkan/anv_wsi.c
index a77cfe9..5b94e75 100644
--- a/src/intel/vulkan/anv_wsi.c
+++ b/src/intel/vulkan/anv_wsi.c
@@ -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);
 }
 
diff --git a/src/intel/vulkan/anv_wsi.h b/src/intel/vulkan/anv_wsi.h
index 7bd938b..8b1f106 100644
--- a/src/intel/vulkan/anv_wsi.h
+++ b/src/intel/vulkan/anv_wsi.h
@@ -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,
diff --git a/src/intel/vulkan/anv_wsi_wayland.c b/src/intel/vulkan/anv_wsi_wayland.c
index d0b7606..0c55ad2 100644
--- a/src/intel/vulkan/anv_wsi_wayland.c
+++ b/src/intel/vulkan/anv_wsi_wayland.c
@@ -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);
 
diff --git a/src/intel/vulkan/anv_wsi_x11.c b/src/intel/vulkan/anv_wsi_x11.c
index f438e5b..1a8058f 100644
--- a/src/intel/vulkan/anv_wsi_x11.c
+++ b/src/intel/vulkan/anv_wsi_x11.c
@@ -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)
 {
-- 
2.5.5



More information about the mesa-dev mailing list