Ryujinx-SDL/src/video/kmsdrm
Sam Lantinga c26946e9f2 Fixed bug 3792 - [KMS/DRM] Wrong GBM format
Romain Tisserand

Using KMS/DRM driver from WIP SDL2.0.6 on Linux/ARM SoC RockChip RK3328 (ARM Mali 450 MP2 GPU).

The current code is using GBM_BO_FORMAT_XRGB8888 as GBM buffer format specifier.

The Mali driver (it has been confirmed some other vendor implementations too) expects GBM_FORMAT_XRGB8888.

The Mesa implementation is actually handling both values as the same, but it's not implemented like this into every gbm.h vendor header.

https://github.com/ideak/mesa/blob/master/src/gbm/backends/dri/gbm_dri.c

So with stock SDL2 on my card (Mali vendor implementation), it does not work, eglCreateWindowSurface fails, and gbm_is_format_supported fails too (with the BO variant).
It runs fine with GBM_FORMAT_XRGB8888.

Here is a link of the gbm.h from Mali user-space driver :

https://github.com/rockchip-linux/libmali/blob/rockchip/include/gbm.h
2017-09-01 12:54:38 -07:00
..
SDL_kmsdrmdyn.c kmsdrm: Cleanup unused headers, rename SDL_kmsdrmevents_c.h -> SDL_kmsdrmevents.h 2017-08-21 17:20:50 -07:00
SDL_kmsdrmdyn.h Renaming of guard header names to quiet -Wreserved-id-macro 2017-08-28 00:22:23 -07:00
SDL_kmsdrmevents.c kmsdrm: Cleanup unused headers, rename SDL_kmsdrmevents_c.h -> SDL_kmsdrmevents.h 2017-08-21 17:20:50 -07:00
SDL_kmsdrmevents.h Renaming of guard header names to quiet -Wreserved-id-macro 2017-08-28 00:22:23 -07:00
SDL_kmsdrmmouse.c kmsdrm: Cleanup unused headers, rename SDL_kmsdrmevents_c.h -> SDL_kmsdrmevents.h 2017-08-21 17:20:50 -07:00
SDL_kmsdrmmouse.h Renaming of guard header names to quiet -Wreserved-id-macro 2017-08-28 00:22:23 -07:00
SDL_kmsdrmopengles.c kmsdrm: Cleanup unused headers, rename SDL_kmsdrmevents_c.h -> SDL_kmsdrmevents.h 2017-08-21 17:20:50 -07:00
SDL_kmsdrmopengles.h Renaming of guard header names to quiet -Wreserved-id-macro 2017-08-28 00:22:23 -07:00
SDL_kmsdrmsym.h Fixed bug 3690 - SDL2 KMS/DRM render context support 2017-08-02 10:22:48 -07:00
SDL_kmsdrmvideo.c Fixed bug 3792 - [KMS/DRM] Wrong GBM format 2017-09-01 12:54:38 -07:00
SDL_kmsdrmvideo.h kmsdrm: Cleanup unused headers, rename SDL_kmsdrmevents_c.h -> SDL_kmsdrmevents.h 2017-08-21 17:20:50 -07:00