summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/anv_wsi.c
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2017-11-15 18:50:44 -0800
committerJason Ekstrand <[email protected]>2017-12-04 10:04:19 -0800
commit764fc1643c10ca1f336a99ddbe727313c995b6bb (patch)
tree1be6557c9e2db7c0dbf1d59e8f91fed6860c5c7d /src/intel/vulkan/anv_wsi.c
parent3991098f3b10519b4308763fb77cd15e3218a044 (diff)
vulkan/wsi: Add a wsi_device_init function
This gives the opportunity to collect some function pointers if we'd like which will be very useful in future. Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Chad Versace <[email protected]>
Diffstat (limited to 'src/intel/vulkan/anv_wsi.c')
-rw-r--r--src/intel/vulkan/anv_wsi.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/intel/vulkan/anv_wsi.c b/src/intel/vulkan/anv_wsi.c
index d8c4885b5b8..f898a0759d0 100644
--- a/src/intel/vulkan/anv_wsi.c
+++ b/src/intel/vulkan/anv_wsi.c
@@ -33,12 +33,21 @@ static const struct wsi_callbacks wsi_cbs = {
};
#endif
+static PFN_vkVoidFunction
+anv_wsi_proc_addr(VkPhysicalDevice physicalDevice, const char *pName)
+{
+ ANV_FROM_HANDLE(anv_physical_device, physical_device, physicalDevice);
+ return anv_lookup_entrypoint(&physical_device->info, pName);
+}
+
VkResult
anv_init_wsi(struct anv_physical_device *physical_device)
{
VkResult result;
- memset(physical_device->wsi_device.wsi, 0, sizeof(physical_device->wsi_device.wsi));
+ wsi_device_init(&physical_device->wsi_device,
+ anv_physical_device_to_handle(physical_device),
+ anv_wsi_proc_addr);
#ifdef VK_USE_PLATFORM_XCB_KHR
result = wsi_x11_init_wsi(&physical_device->wsi_device, &physical_device->instance->alloc);