1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 05:27:45 +00:00

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.
This commit is contained in:
Stephan Unverwerth 2022-03-27 18:54:31 +02:00 committed by Andreas Kling
parent 211d24a218
commit 5bb76e9b63
11 changed files with 165 additions and 9 deletions

View file

@ -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();
}
}