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

LibSoftGPU: Put all constexpr config options into Config.h

This commit is contained in:
Stephan Unverwerth 2021-12-29 21:59:13 +01:00 committed by Andreas Kling
parent 4b40d2cc07
commit fe36edf6ae
4 changed files with 23 additions and 10 deletions

View file

@ -9,6 +9,7 @@
#include <LibGfx/Painter.h>
#include <LibGfx/Vector2.h>
#include <LibGfx/Vector3.h>
#include <LibSoftGPU/Config.h>
#include <LibSoftGPU/Device.h>
namespace SoftGPU {
@ -16,8 +17,6 @@ namespace SoftGPU {
using IntVector2 = Gfx::Vector2<int>;
using IntVector3 = Gfx::Vector3<int>;
static constexpr int RASTERIZER_BLOCK_SIZE = 8;
constexpr static int edge_function(const IntVector2& a, const IntVector2& b, const IntVector2& c)
{
return ((c.x() - a.x()) * (b.y() - a.y()) - (c.y() - a.y()) * (b.x() - a.x()));
@ -529,7 +528,7 @@ DeviceInfo Device::info() const
return {
.vendor_name = "SerenityOS",
.device_name = "SoftGPU",
.num_texture_units = num_samplers
.num_texture_units = NUM_SAMPLERS
};
}