diff options
| author | Mark Young <marky@lunarg.com> | 2016-09-16 10:18:42 -0600 |
|---|---|---|
| committer | Mark Young <marky@lunarg.com> | 2016-09-20 11:46:39 -0600 |
| commit | e0e9c56f2bb4f9bc8a560ada38df191728ef5d3d (patch) | |
| tree | 6eb73b5d580b43c0fdd11a80350cb7284f675f8d /loader/loader.c | |
| parent | 4dec9eca7c80b931794e13ed507a8340269a77e7 (diff) | |
| download | usermoji-e0e9c56f2bb4f9bc8a560ada38df191728ef5d3d.tar.xz | |
loader: More changes for gh181
With Piers' fix, another path was broke because we still needed
to intercept the call before it went to the ICD. Now, with his
change and this change, all paths work.
Also, clean up some code based on comments from Ian and Courtney
reviews.
Finally, update docs to indicate behavior of new loader 3
interface with ICDs.
Change-Id: I2d3f962baffb21c1edeb93b132ffad40f298c8e7
Diffstat (limited to 'loader/loader.c')
| -rw-r--r-- | loader/loader.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/loader/loader.c b/loader/loader.c index 641be744..74ffcd9c 100644 --- a/loader/loader.c +++ b/loader/loader.c @@ -1653,6 +1653,10 @@ static bool loader_icd_init_entrys(struct loader_icd *icd, VkInstance inst, LOOKUP_GIPA(CreateXlibSurfaceKHR, false); LOOKUP_GIPA(GetPhysicalDeviceXlibPresentationSupportKHR, false); #endif +#ifdef VK_USE_PLATFORM_MIR_KHR + LOOKUP_GIPA(CreateMirSurfaceKHR, false); + LOOKUP_GIPA(GetPhysicalDeviceMirPresentationSupportKHR, false); +#endif #ifdef VK_USE_PLATFORM_WAYLAND_KHR LOOKUP_GIPA(CreateWaylandSurfaceKHR, false); LOOKUP_GIPA(GetPhysicalDeviceWaylandPresentationSupportKHR, false); @@ -3243,6 +3247,22 @@ loader_gpa_instance_internal(VkInstance inst, const char *pName) { return NULL; } +void loader_override_terminating_device_proc( + VkDevice device, struct loader_dev_dispatch_table *disp_table) { + struct loader_device *dev; + struct loader_icd *icd = loader_get_icd_and_device(device, &dev, NULL); + + // Certain device entry-points still need to go through a terminator before + // hitting the ICD. This could be for several reasons, but the main one + // is currently unwrapping an object before passing the appropriate info + // along to the ICD. + if ((PFN_vkVoidFunction)disp_table->core_dispatch.CreateSwapchainKHR == + (PFN_vkVoidFunction)icd->GetDeviceProcAddr(device, + "vkCreateSwapchainKHR")) { + disp_table->core_dispatch.CreateSwapchainKHR = + terminator_vkCreateSwapchainKHR; + } +} VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL loader_gpa_device_internal(VkDevice device, const char *pName) { |
