1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 05:47:34 +00:00

LibGPU+LibVirtGPU: Allow loading the driver and instantiating the device

This adds LibVirtGPU to the list of allowed drivers in LibGPU and adds a
factory method to create the device to libVirtGPU.
This commit is contained in:
Stephan Unverwerth 2022-12-19 15:30:23 +01:00 committed by Andreas Kling
parent c52abe0bea
commit bd7931ff23
3 changed files with 20 additions and 0 deletions

View file

@ -13,16 +13,19 @@
namespace GPU {
// FIXME: Think of a better way to configure these paths. Maybe use ConfigServer?
// clang-format off
static HashMap<DeprecatedString, DeprecatedString> const s_driver_path_map
{
#if defined(AK_OS_SERENITY)
{ "softgpu", "libsoftgpu.so.serenity" },
{ "virtgpu", "libvirtgpu.so.serenity" },
#elif defined(AK_OS_MACOS)
{ "softgpu", "liblagom-softgpu.dylib" },
#else
{ "softgpu", "liblagom-softgpu.so.0" },
#endif
};
// clang-format on
static HashMap<DeprecatedString, WeakPtr<Driver>> s_loaded_drivers;