flyinghead / flycast

Flycast is a multiplatform Sega Dreamcast, Naomi, Naomi 2 and Atomiswave emulator
GNU General Public License v2.0
1.39k stars 169 forks source link

Option to change gpu driver (Libretro) #1659

Open ToniBC opened 22 hours ago

ToniBC commented 22 hours ago

Hi, many people report errors and problems that are related to the video driver and incompatibilities. There are devices that fail with Vulkan, others work better with GL or DX, etc...

In the standalone version we can configure the driver, but in Retroarch/Libretro we don't have that option in the core options.

The core uses the driver you have configured, but it would be nice to be able to select the driver in the core options. This way, we can have a game that works better with one driver or another, without having to change that globally.

For example, Vulkan is the best driver for almost all of those that support it, but if it fails on our device, we have to change it for all of them and not just for Flycast. With the option, we can configure the driver for one game or for all of them, without modifying the global behavior.

I think implementing that is simple, just one variable, instead of using the general one, the one from the list of options is used, like Auto which uses the general one and then the others.

Thanks.

flyinghead commented 11 hours ago

This is something that must be done in the front end (retroarch). A libretro core doesn't establish the graphics instance/context and doesn't get to choose which GPU to use, or which driver to load. Also note that this feature is very limited (and somewhat hackish) as it only handles custom Vulkan drivers with Adreno GPUs on arm64 android platforms.