RadeonGfx use client-server model with client-server thread pairs like in app_server. For each client thread that calls 3D acceleation API, server side thread is created. If client thread terminates, server side thread also exit. I made small library “ThreadLink” that implements client-server thread pair model and simpilfy code. Calling server from client is very simple:
I looked at Zink code a bit and it seems possible to replace softpipe driver of existing Haiku Gallium add-on with Zink driver. It use memcpy() to draw surface:
Nice! as usual
Would be cool if it would become possible to render on the same card that displays the desktop at some point. Do you have plans for that yet, do you foresee difficulties, or am I just asking a bit too early?
there is some kind of opengl fps test in blender, maybe it can help you to see performance differences…
from the search menu in blender, type “debug menu” and then enter “21”
there are other debugging option for opengl here in this video:
After fixing buffer stride alignment problem, multiple windows in Blender, window resizing and GLTeapot are working. There are currently problem with efficiency in Zink and RadeonGfx in server mode that it clone and delete buffer on each frame that is time consuming.
I think that article don’t clarify what things were ported and what were written from scratch.
Ported:
LavaPipe (remove dependency on DRM)
RADV (small changes to solve header conflicts and weak symbols)
Zink (no changes to Zink itself, switching from softpipe to zink in Haiku Gallium add-on)
libdrm_amdgpu (no changes)
libvulkan (compile fixes)
Vulkan WSI add-on (implementing Haiku window over headless surface, very incomplete for now)
Written:
libdrm2 (partially-compatible with libdrm, provides only render devices, no KMS related functionality, interacts with RadeonGfx)
RadeonGfx (low-level driver interacting with GPU hardware. Functional alternative of Linux amdgpu kernel mode. Runs fully in userland as separate server process over existing Haiku radeon_hd kernel driver.)
Various helper libraries: Locks, SADomains, Poke, ExternalAllocator, ThreadLink.