Skip to content

Draft: venus: enable loading vulkan symbols dynamically at runtime

Antonio Ospite requested to merge ao2/virglrenderer:vulkan-dynamic-loading into main

In some cases libvulkan might not be available at build-time but only at run-time.

For example this happens in AOSP where libvulkan is not available when building for the host target.

This results in libvirglrenderer and virgl_render_server failing to build in AOSP with ENABLE_VENUS=1 because of unresolved symbols, and linking to the libvulkan from the system is not possible either when building in-tree on AOSP.

See also #563 (comment 2637437)

To solve the issue libvulkan symbols can be loaded at runtime, like suggested in https://github.com/KhronosGroup/Vulkan-Loader/blob/main/docs/LoaderApplicationInterface.md#indirectly-linking-to-the-loader

So add a new option vulkan-dload to enable loading libvulkan symbols dynamically at run time, avoiding the build-time dependency on libvulkan.

The new option is disabled by default.

Merge request reports

Loading