1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 04:07: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

@ -19,6 +19,7 @@
#include <LibGL/Tex/TextureUnit.h>
#include <LibGPU/Device.h>
#include <LibGPU/DeviceInfo.h>
#include <LibGPU/Driver.h>
#include <LibGPU/Light.h>
#include <LibGPU/Vertex.h>
#include <LibGfx/Bitmap.h>
@ -48,7 +49,7 @@ enum Face {
class GLContext final {
public:
GLContext(Gfx::Bitmap&);
GLContext(RefPtr<GPU::Driver> driver, NonnullOwnPtr<GPU::Device>, Gfx::Bitmap&);
~GLContext();
void gl_begin(GLenum mode);
@ -303,6 +304,7 @@ private:
return m_texture_coordinate_generation[texture_unit][capability - GL_TEXTURE_GEN_S];
}
RefPtr<GPU::Driver> m_driver;
NonnullOwnPtr<GPU::Device> m_rasterizer;
GPU::DeviceInfo const m_device_info;
bool m_sampler_config_is_dirty { true };