anv/wsi: Add the GetSurfacePresentModesKHR stub
authorJason Ekstrand <jason.ekstrand@intel.com>
Tue, 13 Oct 2015 18:45:58 +0000 (11:45 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Tue, 13 Oct 2015 18:47:03 +0000 (11:47 -0700)
Support has existed in the X11 and Wayland backends for a while but,
somehow, the entrypoint got missed in the API shuffle.

src/vulkan/anv_wsi.c

index 241481b9895874d026ca3ec2d4eda850b9f9a83a..f5c2d3716a50b99d380010c8a6db8fc8d9d5e0a0 100644 (file)
@@ -125,6 +125,30 @@ anv_GetSurfaceFormatsKHR(
                                     pCount, pSurfaceFormats);
 }
 
+VkResult
+anv_GetSurfacePresentModesKHR(
+    VkDevice                                 _device,
+    const VkSurfaceDescriptionKHR*           pSurfaceDescription,
+    uint32_t*                                pCount,
+    VkPresentModeKHR*                        pPresentModes)
+{
+   ANV_FROM_HANDLE(anv_device, device, _device);
+
+   assert(pSurfaceDescription->sType ==
+          VK_STRUCTURE_TYPE_SURFACE_DESCRIPTION_WINDOW_KHR);
+   VkSurfaceDescriptionWindowKHR *window =
+      (VkSurfaceDescriptionWindowKHR *)pSurfaceDescription;
+
+   struct anv_wsi_implementation *impl =
+      device->instance->wsi_impl[window->platform];
+
+   assert(impl);
+
+   return impl->get_surface_present_modes(impl, device, window,
+                                          pCount, pPresentModes);
+}
+
+
 VkResult
 anv_CreateSwapchainKHR(
     VkDevice                                 _device,