summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorStephan Unverwerth <s.unverwerth@serenityos.org>2022-01-06 16:55:08 +0100
committerAli Mohammad Pur <Ali.mpfard@gmail.com>2022-01-09 16:21:13 +0330
commit178a57bbf7cf3b0b70c3484f7324a659e8fcac33 (patch)
tree5b041db809e9ed19b745a1dbc18a477d8c3e2666 /Userland
parentb07bb85700eadd702bd0aa4c21dcd7a80e42cb4b (diff)
downloadserenity-178a57bbf7cf3b0b70c3484f7324a659e8fcac33.zip
LibSoftGPU: Add PixelQuad struct that holds data for each rendered quad
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Libraries/LibSoftGPU/PixelQuad.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/Userland/Libraries/LibSoftGPU/PixelQuad.h b/Userland/Libraries/LibSoftGPU/PixelQuad.h
new file mode 100644
index 0000000000..ce2e09e43d
--- /dev/null
+++ b/Userland/Libraries/LibSoftGPU/PixelQuad.h
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2021, Stephan Unverwerth <s.unverwerth@serenityos.org>
+ *
+ * SPDX-License-Identifier: BSD-2-Clause
+ */
+
+#pragma once
+
+#include <AK/SIMD.h>
+#include <LibGfx/Vector2.h>
+#include <LibGfx/Vector3.h>
+#include <LibGfx/Vector4.h>
+
+namespace SoftGPU {
+
+struct PixelQuad final {
+ Vector2<AK::SIMD::i32x4> screen_coordinates;
+ Vector3<AK::SIMD::f32x4> barycentrics;
+ AK::SIMD::f32x4 depth;
+ Vector4<AK::SIMD::f32x4> vertex_color;
+ Vector4<AK::SIMD::f32x4> uv;
+ Vector4<AK::SIMD::f32x4> out_color;
+ AK::SIMD::f32x4 fog_depth;
+ AK::SIMD::i32x4 mask;
+};
+
+}