Upstream has added support for kms and proper videocore configure options in libSDL2. This ebuild is a good example of how to implement it (i got libsdl2 working properly with kms on my raspberry thanks to it) : https://github.com/barbudreadmon/abendbrot/blob/master/media-libs/libsdl2/libsdl2-2.0.8-r1.ebuild Reproducible: Always
Cool, I've been looking forward to KMS support so I'll give it a try.
I'll change the videocore flag to video_cards_vc4 as users will already have this set where necessary. I've given this a try but with little success so far. I tried Neverball but it dies with "Could not create EGL window surface". Not sure why as I've done GL under KMS on my other (ARM) system before. It also totally locks out my VT to the extent that I have to SSH from my phone to call chvt! I am then unable to reuse that VT and have to use a different one the next time.
Digging a little deeper, I found that eglCreateWindowSurface fails with EGL_BAD_MATCH. I thought it might be because of the following change in Mesa but I had a naive stab at fixing SDL accordingly and it didn't work. I'm out of my depth here. https://lists.freedesktop.org/archives/mesa-dev/2018-February/184807.html
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d4ac42c0809428ada79ce54d2dae32860d73af50 commit d4ac42c0809428ada79ce54d2dae32860d73af50 Author: James Le Cuirot <chewi@gentoo.org> AuthorDate: 2018-05-26 21:36:28 +0000 Commit: James Le Cuirot <chewi@gentoo.org> CommitDate: 2018-05-26 21:37:55 +0000 media-libs/libsdl2: Add kms and video_cards_vc4 USE flags I haven't managed to get this to work but this is probably an upstream issue so I'm adding the flag anyway. It may even work on slightly older Mesa verions. See our bug report for details. No revbump as few people will want this. Closes: https://bugs.gentoo.org/656000 Package-Manager: Portage-2.3.40, Repoman-2.3.9 media-libs/libsdl2/libsdl2-2.0.8-r2.ebuild | 12 ++++++++++-- media-libs/libsdl2/metadata.xml | 1 + 2 files changed, 11 insertions(+), 2 deletions(-)