Vulkan lavapipe software rendering is working on Haiku

I do believe that is correct. Atombios is called during boot, and bring up gpu 3d accel. kalisti5 should be able to help here.

This seems correct, but IIRC Radeon iGPUs use part of the system RAM as VRAM. Typically by default around 1 GB RAM is carved out for the iGPU and 4 GB RAM for GTT (graphics translation table), however these are dynamic and can be changed on-the-fly.

I made some progress with implementing amdgpu drmIoctl. I also improved drmIoctl decoder that allows to log interaction between Vulkan userland driver and amdgpu. Now it crash because shader buffer is NULL.

I also found a way to avoid mmap call. There is drm_mmap macro in libdrm, I made it redirect to real function drmMmap that internally calls create_area.

I made my own libdrm.so that have no major/minor fd tricks, KMS and most other parts. It is enough for Radeon Vulkan driver. libdrm_amdgpu.so is left unchanged, it provides quite nice abstractions.

15 Likes

For some unknown reason after recompiling Radeon Vulkan driver, shader creation started working and it now attempts to send commands to GPU ring buffer (that is currently not implemented). It currently fails at unimplemented waiting for finished GPU ring buffer commands.

18 Likes

Awesome progress

Very nice, I wish I could help with testing, but I don’t have the means to get a computer with a Radeon GPU at the moment :frowning:

If the RADV port goes far enough to need it, I could help with testing on Polaris (RX 560X), Vega (RX Vega 8), and Navi (RX 5700 XT) GPUs.

Render loop is running. But currently it don’t render anything yet. Most part of interaction with graphics card is not yet implemented.

Major parts needed to be implemented:

  1. Initialization and acquiring information.
  2. Graphics memory allocation (AMDGPU_GEM_CREATE).
  3. GPU virtual memory mapping (AMDGPU_GEM_VA).
  4. Sending command buffers to GPU ring buffers (AMDGPU_CS).
  5. Handling interrupts to know when command execution completed (AMDGPU_WAIT_CS).

Old Linux radeon driver can be used as reference because it is smaller and easier to understand.

23 Likes

Do you mind if i share this post at Phoronix ?

3 Likes

OK to share. Keep in mind that hardware rendering is not actually working yet, many parts are not properly connected to hardware for now.

5 Likes

Yes, but posting your progress may get people capable of contributing in some fashion , to help

10 Likes

I have pile of Radeon cards ranging from Fiji all the way up to Navi RDNA2 if you need someone to help test or debug. I also know some stuff about Vulkan.

3 Likes

RDNA2… Grr… Lucky one :smiley:

2 Likes

Radeon HD 7760m here, but I don’t know how to make it start instead of the intel HD 4000 of the cpu in HAIKU

You can blacklist intel_extreme driver in boot loader.

That graphics card should support Vulkan if I am correct.

3 Likes

supports mantle, the ancestor of vulkan but unfortunately no drivers for vulkan have been developed in the other OS, so I don’t know

What is its PCI device ID?

1 Like

PCI\VEN_1002&DEV_6840&CC_0300
https://www.notebookcheck.net/AMD-Radeon-HD-7670M.69483.0.html

My laptop is a Toshiba Satelite P70-B-10U, with AMD Radeon™ R9 M265X and Intel HD 4600.
Can you give an example for the blacklist for Intel HD 4600?

  1. Repeately press space bar to enter boot loader menu.
  2. Select “Safe mode options”.
  3. Select “Blacklist entries”.
  4. Select /addons/kernel/drivers/dev/graphics/intel_extreme.
3 Likes