From c0dc9aecee3e696a9211ab0439b09f6e946978a9 Mon Sep 17 00:00:00 2001
From: Recep Aslantas <info@recp.me>
Date: Mon, 9 Oct 2023 20:09:08 +0300
Subject: [PATCH] geometric type

---
 include/gpu/geometric.h | 52 +++++++++++++++++++++++++++++++++++++++++
 include/gpu/gpu.h       |  1 +
 2 files changed, 53 insertions(+)
 create mode 100644 include/gpu/geometric.h

diff --git a/include/gpu/geometric.h b/include/gpu/geometric.h
new file mode 100644
index 0000000..f93b292
--- /dev/null
+++ b/include/gpu/geometric.h
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 2020 Recep Aslantas
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef gpu_geometry_h
+#define gpu_geometry_h
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "common.h"
+
+typedef struct GPUExtent2D {
+  uint32_t width;
+  uint32_t height;
+} GPUExtent2D;
+
+typedef struct GPUExtent3D {
+  uint32_t width;
+  uint32_t height;
+  uint32_t depth;
+} GPUExtent3D;
+
+typedef struct GPUOffset2D {
+  int32_t x;
+  int32_t y;
+} GPUOffset2D;
+
+typedef struct GPUOffset3D {
+  int32_t x;
+  int32_t y;
+  int32_t z;
+} GPUOffset3D;
+
+typedef struct GPURect2D {
+  GPUOffset2D offset;
+  GPUExtent2D extent;
+} GPURect2D;
+
+#endif /* gpu_geometry_h */
diff --git a/include/gpu/gpu.h b/include/gpu/gpu.h
index 31e80c6..55c10fb 100644
--- a/include/gpu/gpu.h
+++ b/include/gpu/gpu.h
@@ -21,6 +21,7 @@ extern "C" {
 #endif
 
 #include "common.h"
+#include "geometry.h"
 
 #include "pixelformat.h"
 #include "device.h"