Vulkan lavapipe software rendering is working on Haiku

I can do it the next 2 days and then come back to you. If thats OK for you. Today and tomorrow I am busy with other stuff. Like doing adjustments to get it run on Haiku with Vulkan.

1 Like

A bit early:

For interface look here:

Currently its missing:

  • Geometry Buffers for Deferred Shading
  • PBR shader fixes
  • Speed improvements
  • some other improvements

The editor looks like:

2 Likes

How complicate would it be to get this Zink thing running?

2 Likes

Probably better to test with vulkan, zink adds a layer of complexity that’s not needed just yet. But iirc, zink shouldn’t be crazy to get working over top of vulkan

1 Like

Zink compiles, but I am not sure how to enable it. Haiku currently use custom add-on system for Mesa OpenGL that may be the problem.

What is Zink from architecture point of view? Something statically compiled to libGL.so? Separate add-on file (if so what system is used for loading?)? No additional files were produces in install directry after enabling it, only mesa-master/build.x86_64/src/gallium/drivers/zink/libzink.a.

3 Likes

on linux it should be a string enviorment saying to use zink on vulkan instead of mesa’s native openGL
but I’m not quite sure I haven’t checked
https://docs.mesa3d.org/drivers/zink.html

It seems DRI add-on zink_dri.so. Haiku Mesa OpenGL currently use its own add-on system with only softpipe add-on present.

3 Likes

here on linux

MESA_LOADER_DRIVER_OVERRIDE=zink program

2 Likes

There’s my favorite: Warzone 2100. Their website is https://wz2100.net and the source is on GitHub. It’s better than Warcraft 3 in my opinion.

2 Likes

I managed to compile libgallium_dri.so, it seems to contain Zink.

> nm -D --defined-only install/lib/dri/libgallium_dri.so
0000000000dd60e0 B __driDriverExtensions
00000000000ea990 T __driDriverGetExtensions_kms_swrast
00000000000ea970 T __driDriverGetExtensions_swrast
00000000000ea9b0 T __driDriverGetExtensions_zink
00000000008481c1 t _fini
00000000000e1730 t _init
10 Likes

Yes. For games like: Doom II, WarHammer 40000, MegaGleist, The Talos Principle, F1 2017, X-Plane 11, etc…

AMDGPU(-PRO) 21.0.0 driver for Haiku… worth it.

3 Likes

@3dEyes has already ported it. AFAIK, there is some issue preventing it to be packaged…

photo_2021-11-14_05-17-18

8 Likes

What windowing system integration it use? SDL? GLFW? Per OS native API?

1 Like

Integrating VideoStreams VideoProducer interface to both Vulkan WSI and Mesa winsys/DRI will makes life easier and allows to use Zink DRI driver.

4 Likes

SDL - https://github.com/Warzone2100/warzone2100/tree/master/lib/sdl

3 Likes

I found that RADV driver supports VkImportMemoryHostPointerInfoEXT Vulkan extension that allow to create GPU buffers from CPU pointers. It can be used to register BBitmap directly as GPU GTT buffer and avoid all memcpy()'s.

17 Likes

That sounds amazing! Nice!

1 Like

RetroArch has quite a lot of things that one could potentially play around with for testing:

-Vulkan driver (software rendered cores like bsnes or 3d rendered cores like Dolphin)
-OpenGL driver (pair it with Zink?)
-D3D11 driver (pair it with DXVK?)
-Tons of shaders at every level of complexity, from bicubic to full-blown CRT emulation
-G-Sync/FreeSync as well as good old VSync

Just asking about Zink since my engine is OpenGL at the time being but does push OpenGL 4.6 stuff if present. Would be interesting (maybe only for me) where it goes and it does not require any fancy windowing system (native BeOS).

2 Likes

I implemented RadeonGfx driver server mode and now it is possible to run multiple processes that use 3D acceleration. Because of GFX ring reset hack, command buffer scheduling is limited and only one command buffer can be executed at moment of time.

screenshot53

29 Likes