mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 08:27:45 +00:00
LibGL+LibGPU+LibSoftGPU: Move DeviceConfig to LibGPU
This introduces a new abstraction layer, LibGPU, that serves as the usermode interface to GPU devices. To get started we just move the DeviceConfig there and make sure everything still works :^)
This commit is contained in:
parent
c8240e31a1
commit
ac033dd9b6
4 changed files with 6 additions and 5 deletions
|
@ -17,6 +17,7 @@
|
||||||
#include <LibGL/Tex/NameAllocator.h>
|
#include <LibGL/Tex/NameAllocator.h>
|
||||||
#include <LibGL/Tex/Texture.h>
|
#include <LibGL/Tex/Texture.h>
|
||||||
#include <LibGL/Tex/TextureUnit.h>
|
#include <LibGL/Tex/TextureUnit.h>
|
||||||
|
#include <LibGPU/DeviceInfo.h>
|
||||||
#include <LibGfx/Bitmap.h>
|
#include <LibGfx/Bitmap.h>
|
||||||
#include <LibGfx/Matrix4x4.h>
|
#include <LibGfx/Matrix4x4.h>
|
||||||
#include <LibGfx/Rect.h>
|
#include <LibGfx/Rect.h>
|
||||||
|
@ -304,7 +305,7 @@ private:
|
||||||
}
|
}
|
||||||
|
|
||||||
SoftGPU::Device m_rasterizer;
|
SoftGPU::Device m_rasterizer;
|
||||||
SoftGPU::DeviceInfo const m_device_info;
|
GPU::DeviceInfo const m_device_info;
|
||||||
bool m_sampler_config_is_dirty { true };
|
bool m_sampler_config_is_dirty { true };
|
||||||
bool m_light_state_is_dirty { true };
|
bool m_light_state_is_dirty { true };
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
#include <AK/String.h>
|
#include <AK/String.h>
|
||||||
|
|
||||||
namespace SoftGPU {
|
namespace GPU {
|
||||||
|
|
||||||
struct DeviceInfo final {
|
struct DeviceInfo final {
|
||||||
String vendor_name;
|
String vendor_name;
|
|
@ -577,7 +577,7 @@ Device::Device(Gfx::IntSize const& size)
|
||||||
m_options.viewport = m_frame_buffer->rect();
|
m_options.viewport = m_frame_buffer->rect();
|
||||||
}
|
}
|
||||||
|
|
||||||
DeviceInfo Device::info() const
|
GPU::DeviceInfo Device::info() const
|
||||||
{
|
{
|
||||||
return {
|
return {
|
||||||
.vendor_name = "SerenityOS",
|
.vendor_name = "SerenityOS",
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
#include <AK/NonnullRefPtr.h>
|
#include <AK/NonnullRefPtr.h>
|
||||||
#include <AK/RefPtr.h>
|
#include <AK/RefPtr.h>
|
||||||
#include <AK/Vector.h>
|
#include <AK/Vector.h>
|
||||||
|
#include <LibGPU/DeviceInfo.h>
|
||||||
#include <LibGfx/Bitmap.h>
|
#include <LibGfx/Bitmap.h>
|
||||||
#include <LibGfx/Matrix3x3.h>
|
#include <LibGfx/Matrix3x3.h>
|
||||||
#include <LibGfx/Matrix4x4.h>
|
#include <LibGfx/Matrix4x4.h>
|
||||||
|
@ -21,7 +22,6 @@
|
||||||
#include <LibSoftGPU/Buffer/Typed2DBuffer.h>
|
#include <LibSoftGPU/Buffer/Typed2DBuffer.h>
|
||||||
#include <LibSoftGPU/Clipper.h>
|
#include <LibSoftGPU/Clipper.h>
|
||||||
#include <LibSoftGPU/Config.h>
|
#include <LibSoftGPU/Config.h>
|
||||||
#include <LibSoftGPU/DeviceInfo.h>
|
|
||||||
#include <LibSoftGPU/Enums.h>
|
#include <LibSoftGPU/Enums.h>
|
||||||
#include <LibSoftGPU/Image.h>
|
#include <LibSoftGPU/Image.h>
|
||||||
#include <LibSoftGPU/ImageFormat.h>
|
#include <LibSoftGPU/ImageFormat.h>
|
||||||
|
@ -113,7 +113,7 @@ class Device final {
|
||||||
public:
|
public:
|
||||||
Device(Gfx::IntSize const& min_size);
|
Device(Gfx::IntSize const& min_size);
|
||||||
|
|
||||||
DeviceInfo info() const;
|
GPU::DeviceInfo info() const;
|
||||||
|
|
||||||
void draw_primitives(PrimitiveType, FloatMatrix4x4 const& model_view_transform, FloatMatrix4x4 const& projection_transform, FloatMatrix4x4 const& texture_transform, Vector<Vertex> const& vertices, Vector<size_t> const& enabled_texture_units);
|
void draw_primitives(PrimitiveType, FloatMatrix4x4 const& model_view_transform, FloatMatrix4x4 const& projection_transform, FloatMatrix4x4 const& texture_transform, Vector<Vertex> const& vertices, Vector<size_t> const& enabled_texture_units);
|
||||||
void resize(Gfx::IntSize const& min_size);
|
void resize(Gfx::IntSize const& min_size);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue