summaryrefslogtreecommitdiff
path: root/src/ral/backends
diff options
context:
space:
mode:
authoromniscient <17525998+omnisci3nce@users.noreply.github.com>2024-07-19 14:33:34 +1000
committeromniscient <17525998+omnisci3nce@users.noreply.github.com>2024-07-19 14:33:34 +1000
commit82515f9d90ac149984013f0d64c1cab37b349b29 (patch)
tree6da445874d055e3e66ab1825d4aa3bb784955fc9 /src/ral/backends
parent5359c011a08ef2e06ed54104cc16c32868ca88ff (diff)
chore clang format + tidy
Diffstat (limited to 'src/ral/backends')
-rw-r--r--src/ral/backends/opengl/backend_opengl.h18
-rw-r--r--src/ral/backends/opengl/opengl_helpers.h2
-rw-r--r--src/ral/backends/vulkan/backend_vulkan.h42
3 files changed, 31 insertions, 31 deletions
diff --git a/src/ral/backends/opengl/backend_opengl.h b/src/ral/backends/opengl/backend_opengl.h
index f5ab9c8..fd50830 100644
--- a/src/ral/backends/opengl/backend_opengl.h
+++ b/src/ral/backends/opengl/backend_opengl.h
@@ -11,20 +11,20 @@
#define OPENGL_DEFAULT_FRAMEBUFFER 0
-typedef struct GPU_Swapchain{
+typedef struct GPU_Swapchain {
u32x2 dimensions;
-}GPU_Swapchain;
+} GPU_Swapchain;
typedef struct GPU_Device {
} GPU_Device;
-typedef struct GPU_PipelineLayout{
+typedef struct GPU_PipelineLayout {
void *pad;
-}GPU_PipelineLayout;
+} GPU_PipelineLayout;
typedef struct GPU_Pipeline {
u32 shader_id;
- GPU_Renderpass* renderpass;
+ GPU_Renderpass *renderpass;
VertexDescription vertex_desc;
BufferHandle uniform_bindings[MAX_PIPELINE_UNIFORM_BUFFERS];
u32 uniform_count;
@@ -38,7 +38,7 @@ typedef struct GPU_Renderpass {
typedef struct GPU_CmdEncoder {
GPU_Pipeline *pipeline;
-} GPU_CmdEncoder; // Recording
+} GPU_CmdEncoder; // Recording
typedef struct GPU_CmdBuffer {
void *pad;
@@ -53,14 +53,14 @@ typedef struct GPU_Buffer {
union {
u32 vao;
u32 ubo_binding_point
- }; // Optional
- char* name;
+ }; // Optional
+ char *name;
u64 size;
} GPU_Buffer;
typedef struct GPU_Texture {
u32 id;
- void* pad;
+ void *pad;
} GPU_Texture;
typedef struct opengl_support {
diff --git a/src/ral/backends/opengl/opengl_helpers.h b/src/ral/backends/opengl/opengl_helpers.h
index f40bbca..f3059ac 100644
--- a/src/ral/backends/opengl/opengl_helpers.h
+++ b/src/ral/backends/opengl/opengl_helpers.h
@@ -4,8 +4,8 @@
#include "ral_impl.h"
#if defined(CEL_REND_BACKEND_OPENGL)
#include "backend_opengl.h"
-#include "log.h"
#include "file.h"
+#include "log.h"
#include "ral_types.h"
#include <glad/glad.h>
diff --git a/src/ral/backends/vulkan/backend_vulkan.h b/src/ral/backends/vulkan/backend_vulkan.h
index 790344b..f31bed2 100644
--- a/src/ral/backends/vulkan/backend_vulkan.h
+++ b/src/ral/backends/vulkan/backend_vulkan.h
@@ -1,10 +1,10 @@
#pragma once
#ifdef CEL_REND_BACKEND_VULKAN
-#include "ral_impl.h"
#include "defines.h"
#include "maths_types.h"
#include "ral.h"
+#include "ral_impl.h"
#include "ral_types.h"
#include <vulkan/vk_platform.h>
@@ -14,31 +14,31 @@
// Provide definitions for RAL structs
struct GPU_Swapchain {
- VkSwapchainKHR handle;
+ VkSwapchainKHR handle;
};
struct GPU_Device {
- VkPhysicalDevice physical_device;
- VkDevice logical_device;
+ VkPhysicalDevice physical_device;
+ VkDevice logical_device;
};
struct GPU_PipelineLayout {};
- struct GPU_Pipeline {};
- struct GPU_Renderpass {};
- struct GPU_CmdEncoder {};
- struct GPU_CmdBuffer {};
- struct GPU_Buffer {
- VkBuffer handle;
- VkDeviceMemory memory;
- u64 size;
- };
- struct GPU_Texture {
- VkImage handle;
- VkDeviceMemory memory;
- u64 size;
- VkImageView view;
- VkSampler sampler;
- char* debug_label;
- };
+struct GPU_Pipeline {};
+struct GPU_Renderpass {};
+struct GPU_CmdEncoder {};
+struct GPU_CmdBuffer {};
+struct GPU_Buffer {
+ VkBuffer handle;
+ VkDeviceMemory memory;
+ u64 size;
+};
+struct GPU_Texture {
+ VkImage handle;
+ VkDeviceMemory memory;
+ u64 size;
+ VkImageView view;
+ VkSampler sampler;
+ char* debug_label;
+};
#endif