melonDS icon indicating copy to clipboard operation
melonDS copied to clipboard

melonDS crashes on Raspberry Pi 5 when switching to OpenGL renderer

Open commandcontrolQ opened this issue 1 year ago • 7 comments
trafficstars

Self-explanatory.

Running melonDS through the terminal before switching renderers shows the following:

EGL Version: 1.4
EGL Extensions: EGL_ANDROID_blob_cache EGL_EXT_buffer_age EGL_EXT_image_dma_buf_import .....
Trying version 4.3 (Core)
eglCreateContext() failed: 12297
Trying version 3.2 (Core)
eglCreateContext() failed: 12297
Segmentation fault (core dumped)

This implies that the error is due to the fact that the emulator requires at least OpenGL version 3.2, which is a problem because the Raspberry Pi's GPU drivers only expose OpenGL ES 3.1. Is there anything that can be done to fix this, or will I be stuck with the software renderer? I am fine with recompiling melonDS if it is required.

commandcontrolQ avatar May 04 '24 18:05 commandcontrolQ

melonDS at the moment doesn't support OGL ES.

RSDuck avatar May 04 '24 18:05 RSDuck

Does OpenGL ES support seem likely, or is it too different from normal OpenGL to be suitable in the near future?

commandcontrolQ avatar May 04 '24 18:05 commandcontrolQ

Apparently the Pi 5's GPU supports Vulkan, so you could try using zink, assuming Raspberry Pi OS ships it.

Like MESA_LOADER_DRIVER_OVERRIDE=zink melonDS

nadiaholmquist avatar May 05 '24 03:05 nadiaholmquist

Yes, the Raspberry Pi 5's GPU reports Vulkan 1.2 support, so I will have to test out whether zink will work or not when I have the time.

commandcontrolQ avatar May 05 '24 09:05 commandcontrolQ

Even though I am running Ubuntu 23.10 instead of Raspberry Pi OS, running the command MESA_LOADER_DRIVER_OVERRIDE=zink ./melonDS seems to have made no difference at all.

commandcontrolQ avatar May 05 '24 09:05 commandcontrolQ

You might need some extra flags as in this post. If that doesn't work you might want to check if the vulkan drivers are actually installed - you can probably test with vulkaninfo or similar.

RayyanAnsari avatar May 05 '24 10:05 RayyanAnsari

  1. The vulkan drivers are installed, as calling vulkaninfo | grep "version" returns 1.3.211.
  2. I have already read that post and have tried the extra flags, but to no avail. I might need some different flags, however the exact flags I need to get zink working might not be the same as what was found in the post, as the OP in the post had a NVIDIA GPU, while my Raspberry Pi 5 has a VideoCore VII GPU.

commandcontrolQ avatar May 05 '24 10:05 commandcontrolQ