I am in the process of providing Raspberry Pi4 support for Lime:
a crossplatform haxe library that uses sdl2.
It uses the sdl2 2.0.12 source files to compile a dynamic library for the platform you want to compile to.
For Raspberry Pi 4 the X11 video driver works just fine.
But when I use SDL with KMSDRM support, my program segfaults in SDL_kmsdrmvideo.c.
the visual_id that is set with SDL_EGL_SetRequiredVisualId:
GBM_FORMAT_XRGB8888 ( 875713112)
will not return a valid eglConfig because no config matches the visual_id
egl returns EGL_NATIVE_VISUALID 875713089
and ALL other ATTRIBUTES return that same value 875713089 ( via dumpconfig)
When I comment out the line
It does work! SDL_EGL_ChooseConfig finds a working config and the eglconfig attributes return sensible values.
This is on A Raspberry Pi 4, with Raspberry Pi OS 2020-08-20 (formerly known as buster).
with libgles2-mesa-dev libdrm-dev and libgbm-dev installed and using the fkms driver.
All config vars and paths are copied from a regular configure of sdl2 2.0.12.
Any Ideas if this is a bug, or that I’m missing a configuration var?