lavapipe: add dll definition file instead of using PUBLIC

This avoids conflicts with the definitions in vk_icd.h

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9208>
This commit is contained in:
Dave Airlie 2021-02-21 17:27:20 -08:00
parent deb44bc317
commit 34ed5e4e60
3 changed files with 11 additions and 0 deletions

View file

@ -711,6 +711,12 @@ VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL lvp_GetInstanceProcAddr(
pName);
}
/* Windows will use a dll definition file to avoid build errors. */
#ifdef _WIN32
#undef PUBLIC
#define PUBLIC
#endif
/* The loader wants us to expose a second GetInstanceProcAddr function
* to work around certain LD_PRELOAD issues seen in apps.
*/

View file

@ -1,6 +1,7 @@
libvulkan_lvp = shared_library(
'vulkan_lvp',
[ 'target.c' ],
vs_module_defs : 'vulkan_lvp.def',
include_directories : [ inc_src, inc_util, inc_include, inc_gallium, inc_gallium_aux, inc_gallium_winsys, inc_gallium_drivers ],
link_whole : [ liblavapipe_st ],
link_with : [libpipe_loader_static, libgallium, libwsw, libswdri, libws_null, libswkmsdri ],

View file

@ -0,0 +1,4 @@
EXPORTS
vk_icdNegotiateLoaderICDInterfaceVersion
vk_icdGetInstanceProcAddr
vk_icdGetPhysicalDeviceProcAddr