diff options
author | Jason Ekstrand <[email protected]> | 2017-11-15 18:50:44 -0800 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2017-12-04 10:04:19 -0800 |
commit | 764fc1643c10ca1f336a99ddbe727313c995b6bb (patch) | |
tree | 1be6557c9e2db7c0dbf1d59e8f91fed6860c5c7d /src/amd/vulkan/radv_wsi.c | |
parent | 3991098f3b10519b4308763fb77cd15e3218a044 (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/amd/vulkan/radv_wsi.c')
-rw-r--r-- | src/amd/vulkan/radv_wsi.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/amd/vulkan/radv_wsi.c b/src/amd/vulkan/radv_wsi.c index f5f9a3fbeba..247f7cce773 100644 --- a/src/amd/vulkan/radv_wsi.c +++ b/src/amd/vulkan/radv_wsi.c @@ -34,12 +34,20 @@ MAYBE_UNUSED static const struct wsi_callbacks wsi_cbs = { WSI_CB(GetPhysicalDeviceFormatProperties), }; +static PFN_vkVoidFunction +radv_wsi_proc_addr(VkPhysicalDevice physicalDevice, const char *pName) +{ + return radv_lookup_entrypoint(pName); +} + VkResult radv_init_wsi(struct radv_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, + radv_physical_device_to_handle(physical_device), + radv_wsi_proc_addr); #ifdef VK_USE_PLATFORM_XCB_KHR result = wsi_x11_init_wsi(&physical_device->wsi_device, &physical_device->instance->alloc); |