FreeBSDDesktop / kms-drm

the DRM part of the linuxkpi-based KMS
63 stars 26 forks source link

Linux games on amd gpu #87

Closed johalun closed 5 years ago

johalun commented 6 years ago

I couldn't find the other thread discussing this.. Maybe it was on the mailing list?

Anyways, I been trying to get ut2004 to play on my amd ryzen vega apu but no luck. The same setup works fine on Intel machines.

First, I think xf86-video-amdgpu is needed. If using modesetting any rendering process will spawn ncpus llvmpipe threads for software rendering. Setting driver = amdgpu in Xorg.conf will give nice accelerated graphics. Native programs like glxgears, supertuxkart, etc, works fine. In top -SH I can see that the process has threads like supertuxkart{gallium_drv:0} and supertuxkart{amdgpu_cs:0}. I guess this shows that hardware rendering works as expected.

In the Linuxulator on the the other hand, things does not work so well. If I run ut2004 with default settings I get llvmpipe backend. If I set GALLIUM_DRIVER env var to radeonsi_dri.so or anything else, flksdjfjlkdsfs for example, I get something else, FPS is around 1(!) and I can't see any gallium or llvmpipe threads.

I wonder if the linux-c6_dri package is simply too old (mesa 11 it seems)?

@myfreeweb ?

johalun commented 6 years ago

Last time I tried linux-c7 it would not play ut2004 so that's why I'm on c6 :(

valpackett commented 6 years ago

Yes, c6 has way too old mesa/libdrm. c7 should be okay.

I used an ubuntu chroot (download 16.04 cloud-image, untar, mount linprocfs/linsysfs/devfs, chroot, install stuff from apt).

If using modesetting any rendering process will spawn ncpus llvmpipe threads for software rendering

odd. I haven't tried xf86 modesetting on AMD in a long time, but Xwayland definitely works…

johalun commented 5 years ago

setenv LIBGL_DRI3_DISABLE 1 is the key to get opengl linux apps working for me. Closing this. As for the other issues, it's probably because immature Vega support.