diff options
author | Stephan Unverwerth <s.unverwerth@serenityos.org> | 2022-03-27 18:54:31 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-04-06 11:32:24 +0200 |
commit | 5bb76e9b6326c5b36e2e9e3d1d41d90012fafa11 (patch) | |
tree | ba6821e95bc05181bcca510e177a4912bd8cd317 /Userland/Libraries/LibSoftGPU/Device.cpp | |
parent | 211d24a218459035959abfb46dc1937f669fc45d (diff) | |
download | serenity-5bb76e9b6326c5b36e2e9e3d1d41d90012fafa11.zip |
LibGL+LibGPU+LibSoftGPU: Load SoftGPU driver dynamically
This loads libsoftgpu.so during GLContext creation and instantiates the
device class which is then passed into the GLContext constructor.
Diffstat (limited to 'Userland/Libraries/LibSoftGPU/Device.cpp')
-rw-r--r-- | Userland/Libraries/LibSoftGPU/Device.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Userland/Libraries/LibSoftGPU/Device.cpp b/Userland/Libraries/LibSoftGPU/Device.cpp index ad721f2ee4..2ee86bac64 100644 --- a/Userland/Libraries/LibSoftGPU/Device.cpp +++ b/Userland/Libraries/LibSoftGPU/Device.cpp @@ -6,6 +6,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ +#include <AK/Error.h> #include <AK/Math.h> #include <AK/NumericLimits.h> #include <AK/SIMDExtras.h> @@ -1303,3 +1304,11 @@ Gfx::IntRect Device::get_rasterization_rect_of_size(Gfx::IntSize size) } } + +extern "C" { + +GPU::Device* serenity_gpu_create_device(Gfx::IntSize const& size) +{ + return make<SoftGPU::Device>(size).leak_ptr(); +} +} |