I managed to build Vulkan Loader, Mesa lavapipe and renderheadless example. Headless software Vulkan rendering is working on Haiku.
Unlike OpenGL, Vulkan has nice architecture with standard driver add-ons loading mechanism and headless rendering so no Haiku GUI-specific code is needed to run Vulkan rendering.
> bin/renderheadless
loader_log: Vulkan Loader Version 1.2.193
loader_log: [Git - Tag: v1.2.193-4-g3277ecde4, Branch/Commit: master]
Running headless rendering example
loader_log: read_data_files_in_search_paths: Searching the following paths for manifest files: /etc/xdg/vulkan/implicit_layer.d:/boot/system/etc/vulkan/implicit_layer.d:/etc/vulkan/implicit_layer.d:/boot/home/downloads/mesa-master/build.x86_64/install/share/vulkan/implicit_layer.d
loader_log: Searching for layer manifest files
loader_log: In following folders:
loader_log: /etc/xdg/vulkan/implicit_layer.d
loader_log: /boot/system/etc/vulkan/implicit_layer.d
loader_log: /etc/vulkan/implicit_layer.d
loader_log: /boot/home/downloads/mesa-master/build.x86_64/install/share/vulkan/implicit_layer.d
loader_log: Found no files
loader_log: read_data_files_in_search_paths: Searching the following paths for manifest files: /etc/xdg/vulkan/implicit_layer.d:/boot/system/etc/vulkan/implicit_layer.d:/etc/vulkan/implicit_layer.d:/boot/home/downloads/mesa-master/build.x86_64/install/share/vulkan/implicit_layer.d
loader_log: Searching for layer manifest files
loader_log: In following folders:
loader_log: /etc/xdg/vulkan/implicit_layer.d
loader_log: /boot/system/etc/vulkan/implicit_layer.d
loader_log: /etc/vulkan/implicit_layer.d
loader_log: /boot/home/downloads/mesa-master/build.x86_64/install/share/vulkan/implicit_layer.d
loader_log: Found no files
loader_log: remove_all_non_valid_override_layers: Failed to get executable path and name
loader_log: read_data_files_in_search_paths: Searching the following paths for manifest files: /etc/xdg/vulkan/explicit_layer.d:/boot/system/etc/vulkan/explicit_layer.d:/etc/vulkan/explicit_layer.d:/boot/home/downloads/mesa-master/build.x86_64/install/share/vulkan/explicit_layer.d
loader_log: Searching for layer manifest files
loader_log: In following folders:
loader_log: /etc/xdg/vulkan/explicit_layer.d
loader_log: /boot/system/etc/vulkan/explicit_layer.d
loader_log: /etc/vulkan/explicit_layer.d
loader_log: /boot/home/downloads/mesa-master/build.x86_64/install/share/vulkan/explicit_layer.d
loader_log: Found no files
loader_log: read_data_files_in_search_paths: Searching the following paths for manifest files: /etc/xdg/vulkan/implicit_layer.d:/boot/system/etc/vulkan/implicit_layer.d:/etc/vulkan/implicit_layer.d:/boot/home/downloads/mesa-master/build.x86_64/install/share/vulkan/implicit_layer.d
loader_log: Searching for layer manifest files
loader_log: In following folders:
loader_log: /etc/xdg/vulkan/implicit_layer.d
loader_log: /boot/system/etc/vulkan/implicit_layer.d
loader_log: /etc/vulkan/implicit_layer.d
loader_log: /boot/home/downloads/mesa-master/build.x86_64/install/share/vulkan/implicit_layer.d
loader_log: Found no files
loader_log: read_data_files_in_search_paths: Searching the following paths for manifest files: /etc/xdg/vulkan/implicit_layer.d:/boot/system/etc/vulkan/implicit_layer.d:/etc/vulkan/implicit_layer.d:/boot/home/downloads/mesa-master/build.x86_64/install/share/vulkan/implicit_layer.d
loader_log: Searching for layer manifest files
loader_log: In following folders:
loader_log: /etc/xdg/vulkan/implicit_layer.d
loader_log: /boot/system/etc/vulkan/implicit_layer.d
loader_log: /etc/vulkan/implicit_layer.d
loader_log: /boot/home/downloads/mesa-master/build.x86_64/install/share/vulkan/implicit_layer.d
loader_log: Found no files
loader_log: remove_all_non_valid_override_layers: Failed to get executable path and name
loader_log: read_data_files_in_search_paths: Searching the following paths for manifest files: /etc/xdg/vulkan/explicit_layer.d:/boot/system/etc/vulkan/explicit_layer.d:/etc/vulkan/explicit_layer.d:/boot/home/downloads/mesa-master/build.x86_64/install/share/vulkan/explicit_layer.d
loader_log: Searching for layer manifest files
loader_log: In following folders:
loader_log: /etc/xdg/vulkan/explicit_layer.d
loader_log: /boot/system/etc/vulkan/explicit_layer.d
loader_log: /etc/vulkan/explicit_layer.d
loader_log: /boot/home/downloads/mesa-master/build.x86_64/install/share/vulkan/explicit_layer.d
loader_log: Found no files
loader_log: read_data_files_in_search_paths: Searching the following paths for manifest files: /etc/xdg/vulkan/implicit_layer.d:/boot/system/etc/vulkan/implicit_layer.d:/etc/vulkan/implicit_layer.d:/boot/home/downloads/mesa-master/build.x86_64/install/share/vulkan/implicit_layer.d
loader_log: Searching for layer manifest files
loader_log: In following folders:
loader_log: /etc/xdg/vulkan/implicit_layer.d
loader_log: /boot/system/etc/vulkan/implicit_layer.d
loader_log: /etc/vulkan/implicit_layer.d
loader_log: /boot/home/downloads/mesa-master/build.x86_64/install/share/vulkan/implicit_layer.d
loader_log: Found no files
loader_log: remove_all_non_valid_override_layers: Failed to get executable path and name
loader_log: read_data_files_in_search_paths: Searching the following paths for manifest files: /etc/xdg/vulkan/explicit_layer.d:/boot/system/etc/vulkan/explicit_layer.d:/etc/vulkan/explicit_layer.d:/boot/home/downloads/mesa-master/build.x86_64/install/share/vulkan/explicit_layer.d
loader_log: Searching for layer manifest files
loader_log: In following folders:
loader_log: /etc/xdg/vulkan/explicit_layer.d
loader_log: /boot/system/etc/vulkan/explicit_layer.d
loader_log: /etc/vulkan/explicit_layer.d
loader_log: /boot/home/downloads/mesa-master/build.x86_64/install/share/vulkan/explicit_layer.d
loader_log: Found no files
loader_log: read_data_files_in_search_paths: Searching the following paths for manifest files: /etc/xdg/vulkan/icd.d:/boot/system/etc/vulkan/icd.d:/etc/vulkan/icd.d:/boot/home/downloads/mesa-master/build.x86_64/install/share/vulkan/icd.d
loader_log: Searching for implementation manifest files
loader_log: In following folders:
loader_log: /etc/xdg/vulkan/icd.d
loader_log: /boot/system/etc/vulkan/icd.d
loader_log: /etc/vulkan/icd.d
loader_log: /boot/home/downloads/mesa-master/build.x86_64/install/share/vulkan/icd.d
loader_log: Found the following files:
loader_log: /boot/home/downloads/mesa-master/build.x86_64/install/share/vulkan/icd.d/lvp_icd.x86_64.json
loader_log: Found ICD manifest file /boot/home/downloads/mesa-master/build.x86_64/install/share/vulkan/icd.d/lvp_icd.x86_64.json, version "1.0.0"
loader_log: Searching for ICD drivers named /boot/home/downloads/mesa-master/build.x86_64/install/lib/libvulkan_lvp.so
loader_log: Build ICD instance extension list
loader_log: Instance Extension: VK_KHR_device_group_creation (/boot/home/downloads/mesa-master/build.x86_64/install/lib/libvulkan_lvp.so) version 0.0.1
loader_log: Instance Extension: VK_KHR_external_fence_capabilities (/boot/home/downloads/mesa-master/build.x86_64/install/lib/libvulkan_lvp.so) version 0.0.1
loader_log: Instance Extension: VK_KHR_external_memory_capabilities (/boot/home/downloads/mesa-master/build.x86_64/install/lib/libvulkan_lvp.so) version 0.0.1
loader_log: Instance Extension: VK_KHR_external_semaphore_capabilities (/boot/home/downloads/mesa-master/build.x86_64/install/lib/libvulkan_lvp.so) version 0.0.1
loader_log: Instance Extension: VK_KHR_get_physical_device_properties2 (/boot/home/downloads/mesa-master/build.x86_64/install/lib/libvulkan_lvp.so) version 0.0.1
loader_log: Instance Extension: VK_EXT_debug_report (/boot/home/downloads/mesa-master/build.x86_64/install/lib/libvulkan_lvp.so) version 0.0.9
loader_log: Build ICD instance extension list
loader_log: Instance Extension: VK_KHR_device_group_creation (/boot/home/downloads/mesa-master/build.x86_64/install/lib/libvulkan_lvp.so) version 0.0.1
loader_log: Instance Extension: VK_KHR_external_fence_capabilities (/boot/home/downloads/mesa-master/build.x86_64/install/lib/libvulkan_lvp.so) version 0.0.1
loader_log: Instance Extension: VK_KHR_external_memory_capabilities (/boot/home/downloads/mesa-master/build.x86_64/install/lib/libvulkan_lvp.so) version 0.0.1
loader_log: Instance Extension: VK_KHR_external_semaphore_capabilities (/boot/home/downloads/mesa-master/build.x86_64/install/lib/libvulkan_lvp.so) version 0.0.1
loader_log: Instance Extension: VK_KHR_get_physical_device_properties2 (/boot/home/downloads/mesa-master/build.x86_64/install/lib/libvulkan_lvp.so) version 0.0.1
loader_log: Instance Extension: VK_EXT_debug_report (/boot/home/downloads/mesa-master/build.x86_64/install/lib/libvulkan_lvp.so) version 0.0.9
sdev->dd->winsys[0].name: null
WARNING: lavapipe is not a conformant vulkan implementation, testing use only.
GPU: llvmpipe (LLVM 9.0.1, 256 bits)
loader_log: Device Extension: VK_KHR_bind_memory2 (/boot/home/downloads/mesa-master/build.x86_64/install/lib/libvulkan_lvp.so) version 0.0.1
loader_log: Device Extension: VK_KHR_dedicated_allocation (/boot/home/downloads/mesa-master/build.x86_64/install/lib/libvulkan_lvp.so) version 0.0.1
loader_log: Device Extension: VK_KHR_descriptor_update_template (/boot/home/downloads/mesa-master/build.x86_64/install/lib/libvulkan_lvp.so) version 0.0.1
loader_log: Device Extension: VK_KHR_device_group (/boot/home/downloads/mesa-master/build.x86_64/install/lib/libvulkan_lvp.so) version 0.0.1
loader_log: Device Extension: VK_KHR_draw_indirect_count (/boot/home/downloads/mesa-master/build.x86_64/install/lib/libvulkan_lvp.so) version 0.0.1
loader_log: Device Extension: VK_KHR_driver_properties (/boot/home/downloads/mesa-master/build.x86_64/install/lib/libvulkan_lvp.so) version 0.0.1
loader_log: Device Extension: VK_KHR_get_memory_requirements2 (/boot/home/downloads/mesa-master/build.x86_64/install/lib/libvulkan_lvp.so) version 0.0.1
loader_log: Device Extension: VK_KHR_maintenance1 (/boot/home/downloads/mesa-master/build.x86_64/install/lib/libvulkan_lvp.so) version 0.0.1
loader_log: Device Extension: VK_KHR_push_descriptor (/boot/home/downloads/mesa-master/build.x86_64/install/lib/libvulkan_lvp.so) version 0.0.1
loader_log: Device Extension: VK_KHR_relaxed_block_layout (/boot/home/downloads/mesa-master/build.x86_64/install/lib/libvulkan_lvp.so) version 0.0.1
loader_log: Device Extension: VK_KHR_sampler_mirror_clamp_to_edge (/boot/home/downloads/mesa-master/build.x86_64/install/lib/libvulkan_lvp.so) version 0.0.1
loader_log: Device Extension: VK_KHR_storage_buffer_storage_class (/boot/home/downloads/mesa-master/build.x86_64/install/lib/libvulkan_lvp.so) version 0.0.1
loader_log: Device Extension: VK_EXT_external_memory_dma_buf (/boot/home/downloads/mesa-master/build.x86_64/install/lib/libvulkan_lvp.so) version 0.0.1
loader_log: Device Extension: VK_EXT_index_type_uint8 (/boot/home/downloads/mesa-master/build.x86_64/install/lib/libvulkan_lvp.so) version 0.0.1
loader_log: Device Extension: VK_EXT_post_depth_coverage (/boot/home/downloads/mesa-master/build.x86_64/install/lib/libvulkan_lvp.so) version 0.0.1
loader_log: Device Extension: VK_EXT_private_data (/boot/home/downloads/mesa-master/build.x86_64/install/lib/libvulkan_lvp.so) version 0.0.1
loader_log: Device Extension: VK_EXT_shader_stencil_export (/boot/home/downloads/mesa-master/build.x86_64/install/lib/libvulkan_lvp.so) version 0.0.1
loader_log: Device Extension: VK_EXT_transform_feedback (/boot/home/downloads/mesa-master/build.x86_64/install/lib/libvulkan_lvp.so) version 0.0.1
loader_log: Device Extension: VK_EXT_vertex_attribute_divisor (/boot/home/downloads/mesa-master/build.x86_64/install/lib/libvulkan_lvp.so) version 0.0.3
loader_log: Device Extension: VK_GOOGLE_decorate_string (/boot/home/downloads/mesa-master/build.x86_64/install/lib/libvulkan_lvp.so) version 0.0.1
loader_log: Device Extension: VK_GOOGLE_hlsl_functionality1 (/boot/home/downloads/mesa-master/build.x86_64/install/lib/libvulkan_lvp.so) version 0.0.1
loader_log: Device Extension: VK_KHR_bind_memory2 (/boot/home/downloads/mesa-master/build.x86_64/install/lib/libvulkan_lvp.so) version 0.0.1
loader_log: Device Extension: VK_KHR_dedicated_allocation (/boot/home/downloads/mesa-master/build.x86_64/install/lib/libvulkan_lvp.so) version 0.0.1
loader_log: Device Extension: VK_KHR_descriptor_update_template (/boot/home/downloads/mesa-master/build.x86_64/install/lib/libvulkan_lvp.so) version 0.0.1
loader_log: Device Extension: VK_KHR_device_group (/boot/home/downloads/mesa-master/build.x86_64/install/lib/libvulkan_lvp.so) version 0.0.1
loader_log: Device Extension: VK_KHR_draw_indirect_count (/boot/home/downloads/mesa-master/build.x86_64/install/lib/libvulkan_lvp.so) version 0.0.1
loader_log: Device Extension: VK_KHR_driver_properties (/boot/home/downloads/mesa-master/build.x86_64/install/lib/libvulkan_lvp.so) version 0.0.1
loader_log: Device Extension: VK_KHR_get_memory_requirements2 (/boot/home/downloads/mesa-master/build.x86_64/install/lib/libvulkan_lvp.so) version 0.0.1
loader_log: Device Extension: VK_KHR_maintenance1 (/boot/home/downloads/mesa-master/build.x86_64/install/lib/libvulkan_lvp.so) version 0.0.1
loader_log: Device Extension: VK_KHR_push_descriptor (/boot/home/downloads/mesa-master/build.x86_64/install/lib/libvulkan_lvp.so) version 0.0.1
loader_log: Device Extension: VK_KHR_relaxed_block_layout (/boot/home/downloads/mesa-master/build.x86_64/install/lib/libvulkan_lvp.so) version 0.0.1
loader_log: Device Extension: VK_KHR_sampler_mirror_clamp_to_edge (/boot/home/downloads/mesa-master/build.x86_64/install/lib/libvulkan_lvp.so) version 0.0.1
loader_log: Device Extension: VK_KHR_storage_buffer_storage_class (/boot/home/downloads/mesa-master/build.x86_64/install/lib/libvulkan_lvp.so) version 0.0.1
loader_log: Device Extension: VK_EXT_external_memory_dma_buf (/boot/home/downloads/mesa-master/build.x86_64/install/lib/libvulkan_lvp.so) version 0.0.1
loader_log: Device Extension: VK_EXT_index_type_uint8 (/boot/home/downloads/mesa-master/build.x86_64/install/lib/libvulkan_lvp.so) version 0.0.1
loader_log: Device Extension: VK_EXT_post_depth_coverage (/boot/home/downloads/mesa-master/build.x86_64/install/lib/libvulkan_lvp.so) version 0.0.1
loader_log: Device Extension: VK_EXT_private_data (/boot/home/downloads/mesa-master/build.x86_64/install/lib/libvulkan_lvp.so) version 0.0.1
loader_log: Device Extension: VK_EXT_shader_stencil_export (/boot/home/downloads/mesa-master/build.x86_64/install/lib/libvulkan_lvp.so) version 0.0.1
loader_log: Device Extension: VK_EXT_transform_feedback (/boot/home/downloads/mesa-master/build.x86_64/install/lib/libvulkan_lvp.so) version 0.0.1
loader_log: Device Extension: VK_EXT_vertex_attribute_divisor (/boot/home/downloads/mesa-master/build.x86_64/install/lib/libvulkan_lvp.so) version 0.0.3
loader_log: Device Extension: VK_GOOGLE_decorate_string (/boot/home/downloads/mesa-master/build.x86_64/install/lib/libvulkan_lvp.so) version 0.0.1
loader_log: Device Extension: VK_GOOGLE_hlsl_functionality1 (/boot/home/downloads/mesa-master/build.x86_64/install/lib/libvulkan_lvp.so) version 0.0.1
loader_log: Device Extension: VK_KHR_bind_memory2 (Unknown) version 0.0.1
loader_log: Device Extension: VK_KHR_dedicated_allocation (Unknown) version 0.0.1
loader_log: Device Extension: VK_KHR_descriptor_update_template (Unknown) version 0.0.1
loader_log: Device Extension: VK_KHR_device_group (Unknown) version 0.0.1
loader_log: Device Extension: VK_KHR_draw_indirect_count (Unknown) version 0.0.1
loader_log: Device Extension: VK_KHR_driver_properties (Unknown) version 0.0.1
loader_log: Device Extension: VK_KHR_get_memory_requirements2 (Unknown) version 0.0.1
loader_log: Device Extension: VK_KHR_maintenance1 (Unknown) version 0.0.1
loader_log: Device Extension: VK_KHR_push_descriptor (Unknown) version 0.0.1
loader_log: Device Extension: VK_KHR_relaxed_block_layout (Unknown) version 0.0.1
loader_log: Device Extension: VK_KHR_sampler_mirror_clamp_to_edge (Unknown) version 0.0.1
loader_log: Device Extension: VK_KHR_storage_buffer_storage_class (Unknown) version 0.0.1
loader_log: Device Extension: VK_EXT_external_memory_dma_buf (Unknown) version 0.0.1
loader_log: Device Extension: VK_EXT_index_type_uint8 (Unknown) version 0.0.1
loader_log: Device Extension: VK_EXT_post_depth_coverage (Unknown) version 0.0.1
loader_log: Device Extension: VK_EXT_private_data (Unknown) version 0.0.1
loader_log: Device Extension: VK_EXT_shader_stencil_export (Unknown) version 0.0.1
loader_log: Device Extension: VK_EXT_transform_feedback (Unknown) version 0.0.1
loader_log: Device Extension: VK_EXT_vertex_attribute_divisor (Unknown) version 0.0.3
loader_log: Device Extension: VK_GOOGLE_decorate_string (Unknown) version 0.0.1
loader_log: Device Extension: VK_GOOGLE_hlsl_functionality1 (Unknown) version 0.0.1
loader_log: Device Extension: VK_KHR_bind_memory2 (/boot/home/downloads/mesa-master/build.x86_64/install/lib/libvulkan_lvp.so) version 0.0.1
loader_log: Device Extension: VK_KHR_dedicated_allocation (/boot/home/downloads/mesa-master/build.x86_64/install/lib/libvulkan_lvp.so) version 0.0.1
loader_log: Device Extension: VK_KHR_descriptor_update_template (/boot/home/downloads/mesa-master/build.x86_64/install/lib/libvulkan_lvp.so) version 0.0.1
loader_log: Device Extension: VK_KHR_device_group (/boot/home/downloads/mesa-master/build.x86_64/install/lib/libvulkan_lvp.so) version 0.0.1
loader_log: Device Extension: VK_KHR_draw_indirect_count (/boot/home/downloads/mesa-master/build.x86_64/install/lib/libvulkan_lvp.so) version 0.0.1
loader_log: Device Extension: VK_KHR_driver_properties (/boot/home/downloads/mesa-master/build.x86_64/install/lib/libvulkan_lvp.so) version 0.0.1
loader_log: Device Extension: VK_KHR_get_memory_requirements2 (/boot/home/downloads/mesa-master/build.x86_64/install/lib/libvulkan_lvp.so) version 0.0.1
loader_log: Device Extension: VK_KHR_maintenance1 (/boot/home/downloads/mesa-master/build.x86_64/install/lib/libvulkan_lvp.so) version 0.0.1
loader_log: Device Extension: VK_KHR_push_descriptor (/boot/home/downloads/mesa-master/build.x86_64/install/lib/libvulkan_lvp.so) version 0.0.1
loader_log: Device Extension: VK_KHR_relaxed_block_layout (/boot/home/downloads/mesa-master/build.x86_64/install/lib/libvulkan_lvp.so) version 0.0.1
loader_log: Device Extension: VK_KHR_sampler_mirror_clamp_to_edge (/boot/home/downloads/mesa-master/build.x86_64/install/lib/libvulkan_lvp.so) version 0.0.1
loader_log: Device Extension: VK_KHR_storage_buffer_storage_class (/boot/home/downloads/mesa-master/build.x86_64/install/lib/libvulkan_lvp.so) version 0.0.1
loader_log: Device Extension: VK_EXT_external_memory_dma_buf (/boot/home/downloads/mesa-master/build.x86_64/install/lib/libvulkan_lvp.so) version 0.0.1
loader_log: Device Extension: VK_EXT_index_type_uint8 (/boot/home/downloads/mesa-master/build.x86_64/install/lib/libvulkan_lvp.so) version 0.0.1
loader_log: Device Extension: VK_EXT_post_depth_coverage (/boot/home/downloads/mesa-master/build.x86_64/install/lib/libvulkan_lvp.so) version 0.0.1
loader_log: Device Extension: VK_EXT_private_data (/boot/home/downloads/mesa-master/build.x86_64/install/lib/libvulkan_lvp.so) version 0.0.1
loader_log: Device Extension: VK_EXT_shader_stencil_export (/boot/home/downloads/mesa-master/build.x86_64/install/lib/libvulkan_lvp.so) version 0.0.1
loader_log: Device Extension: VK_EXT_transform_feedback (/boot/home/downloads/mesa-master/build.x86_64/install/lib/libvulkan_lvp.so) version 0.0.1
loader_log: Device Extension: VK_EXT_vertex_attribute_divisor (/boot/home/downloads/mesa-master/build.x86_64/install/lib/libvulkan_lvp.so) version 0.0.3
loader_log: Device Extension: VK_GOOGLE_decorate_string (/boot/home/downloads/mesa-master/build.x86_64/install/lib/libvulkan_lvp.so) version 0.0.1
loader_log: Device Extension: VK_GOOGLE_hlsl_functionality1 (/boot/home/downloads/mesa-master/build.x86_64/install/lib/libvulkan_lvp.so) version 0.0.1
Framebuffer image saved to headless.ppm
Finished. Press enter to terminate...