summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGPU
diff options
context:
space:
mode:
authorStephan Unverwerth <s.unverwerth@serenityos.org>2022-12-19 15:30:23 +0100
committerAndreas Kling <kling@serenityos.org>2022-12-26 09:39:20 +0100
commitbd7931ff236843fd2943265df3395dbf4c6e38f3 (patch)
treefdab1dd0273edf4a38dfa8c2559132e4f6ea05fe /Userland/Libraries/LibGPU
parentc52abe0bea8c8ee29794f236b005b46a844a50cc (diff)
downloadserenity-bd7931ff236843fd2943265df3395dbf4c6e38f3.zip
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.
Diffstat (limited to 'Userland/Libraries/LibGPU')
-rw-r--r--Userland/Libraries/LibGPU/Driver.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/Userland/Libraries/LibGPU/Driver.cpp b/Userland/Libraries/LibGPU/Driver.cpp
index 85e0b56cf6..4927d48a85 100644
--- a/Userland/Libraries/LibGPU/Driver.cpp
+++ b/Userland/Libraries/LibGPU/Driver.cpp
@@ -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;