Vulkan lavapipe software rendering is working on Haiku

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.

headless

> 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...
36 Likes

What kind of overhead does something like this take?

Do you mean hardware vs software rendering or something else?

Well, I want to make sure I ask correctly. I may be mixing somethings up. As I understand it. At this point what you’ve done would be software. Right? If I were to try to run this on my Haiku box, would it melt my cpu? :slight_smile:

It will be probably similar to existing Haiku software OpenGL rendering based on Mesa llvmpipe.

6 Likes

Great work Ilya. I’m assuming that the host buffer can be mapped to a BBitmap::Data() for display / animation loops (instead of exporting to ppm)?

My newest graphics engine is Vulkan based, and I’m really looking forward to making a Haiku port as well.

A toast for your accomplishments :slight_smile:

5 Likes

this is excellent, this is the first step towards hardware 3d, and x512, brother you are a machine !!!

4 Likes

How is porting a software driver a step towards hardware drivers?

Anyway, it’s nice to see that lavapipe runs on Haiku. : )

I assume that when it comes to developing the core-driver for the gpu, “all regkeys” , which now turn towards a software simulation on the cpu will be replaced, these will be linked one by one on the real hardware registers of the gpu, So for Intel and AMD it will be more easy because these are in the public domain thanks to the linux opensouce drivers, while for nvidia, porting will be much more difficult.

Vulkan driver add-on host library (libvulkan.so, officially called “Vulkan ICD desktop loader”) can be used also for hardware accelerated drivers. Hardware acceleration should start working when GPU driver add-on will be installed.

Also software renderer allows to prepare Haiku infrastructure for hardware rendering. Primary difference between software and hardware renderer is output to regular RAM vs GPU RAM, the rest is almost the same. It is possible to render to GPU RAM offscreen.

8 Likes

ok.

bare bones basics data flow

application,>>> api/opengl/vulkan>>>>, jit compiler, >>>>memory manger, >>>>gpu hardware

so you need to have a compiler that takes your api call/program/sha
aders/drawing commands and turns them into a program the gpu can render.

he has the vulkan shader compiler working.

now he needs to get the vulkan to gpu compiler working.

then the ring bus of cpu/ram to gpu/gpu ram needs to be done

then a bunch of hardware setup calls, etc.

first step, and a rather large one

the vulkan to amd gpu compiler for shaders and textures is nearly os agnostic iirc as long as you have solid posix compliance

I’m aware of the basic infrastructure, but we already have llvmpipe, I don’t see how lavapipe gets us any closer to 3d accel on it’s own. it seems like an orthogonal component to me.

Unlike OpenGL, Vulkan do not depend on windowing system and it have driver add-on system with standardized API (Mesa also have OpenGL driver add-ons, but it have non-standard Mesa-specific API). OpenGL may need more work for windowing system related code.

4 Likes

at this point Developing Vulkan on real hardware is more strategic than developing OpenGL, since now Zink running on Vulkan compensates for the lack of OpenGL support by giving performance similar to native accelerated OpenGL.

2 Likes

it is somewhat orthogonal, but intel and amd are assistant in creating natuve vulkan drivers and rendering engines etc.

have this allows work towards the next step, and hopefully real gou drivers.

opengl needs to die, it’s full of a lot of cruft and thdre are very efficient translation layers that go above vulcan

OpenGL is an api, your argument makes no sense to me. I am not ready to throw away all OpenGL applications for a goal of only supporting the newest and leanest.
Supporting Vulcan definetely makes sense for Haiku, but so does supporting OpenGl… and direct3d9 direct3d8 (through wine, likely a translation layer aswell) etc. In the end we want to be able to run applications that use those “older” apis, regardless of how the driver stack looks in the end

OpenGL is still useful for simple 3D graphics such as scientific visualizations. Vulkan need many boilerplate code to do even basic things. OpenGL can run over Vulkan for example by using ANGLE.

2 Likes

There is DXVK project that implement Direct3D API over Vulkan.

2 Likes

vulkan should be the native base layer api as driver maintenance becomes massively easier.

everything else can be a wrapper or translation layer above it, let those who wish to use broken outdate graphics APIs maintain them.

1 Like

I don’t know, maybe I’m wrong, but from what I read in following the comments, it seems some of you are not clear what Zink is, it is full support of OpenGL 4.6 and OpenGL ES 3.2 on top of Vulkan, so the problem of supporting OpenGL does not arise once Vulkan is developed on real Hardware.

2 Likes