Re: [hatari-devel] Suggested patch to fix the SDL GUI on KMS/DRM

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


On Sun, Nov 1, 2020 at 3:21 PM Jens Guenther <dbotw@xxxxxxx> wrote:
Christer Solskogen <christer.solskogen@xxxxxxxxx> wrote:

> Strange! I get better performance (better fps) when running hatari in
> Wayland on Pi4.

It might be helpful to get more information about your configuration:

diff --git a/src/screen.c b/src/screen.c
index b762f1e2..38cabdab 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -533,6 +533,10 @@ bool Screen_SetSDLVideoSize(int width, int height, int bitdepth, bool bForceChan
                SDL_RenderPresent(sdlRenderer);

                SDL_GetRendererInfo(sdlRenderer, &sRenderInfo);
+
+               fprintf(stderr, "SDL_VIDEODRIVER=%s\n", SDL_GetCurrentVideoDriver());
+               fprintf(stderr, "SDL_RENDER_DRIVER=%s\n", sRenderInfo.name);
+
                bIsSoftwareRenderer = sRenderInfo.flags & SDL_RENDERER_SOFTWARE;

                if (bitdepth == 16)

You can override the video/render driver using environment variables:

  $ SDL_VIDEODRIVER=KMSDRM SDL_RENDER_DRIVER=software ./hatari

For SDL_VIDEODRIVER you can try: x11 | wayland | KMSDRM | RPI
For SDL_RENDER_DRIVER: opengl | opengles | opengles2 | software


Thanks, I'll try.
What I *meant* was that I got better performance with SDL_VIDEODRIVER=wayland, than with KMSDRM (Raspberry Pi 4 running 64bit Manjaro.)

Without wayland running I get this:
SDL_VIDEODRIVER=KMSDRM
SDL_RENDER_DRIVER=opengl

With wayland:
SDL_VIDEODRIVER=wayland
SDL_RENDER_DRIVER=opengl

On wayland all of the menus work fine, the problem is with KMSDRM it seems.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/