summaryrefslogtreecommitdiff
path: root/src/renderer/cleanroom/ral.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/renderer/cleanroom/ral.h')
-rw-r--r--src/renderer/cleanroom/ral.h23
1 files changed, 16 insertions, 7 deletions
diff --git a/src/renderer/cleanroom/ral.h b/src/renderer/cleanroom/ral.h
index 8f7c8a4..a1e9929 100644
--- a/src/renderer/cleanroom/ral.h
+++ b/src/renderer/cleanroom/ral.h
@@ -14,12 +14,6 @@
#include "cleanroom/types.h"
#include "defines.h"
-// TODO: Replace with handle defines
-typedef int buffer_handle;
-typedef int texture_handle;
-typedef int sampler_handle;
-typedef int model_handle;
-
// Forward declare structs
typedef struct gpu_swapchain gpu_swapchain;
typedef struct gpu_device gpu_device;
@@ -28,6 +22,21 @@ typedef struct gpu_renderpass gpu_renderpass;
typedef struct gpu_cmd_encoder gpu_cmd_encoder; // Recording
typedef struct gpu_cmd_buffer gpu_cmd_buffer; // Ready for submission
+enum pipeline_kind {
+ GRAPHICS,
+ COMPUTE,
+} pipeline_kind;
+
+typedef struct shader_desc {
+ const char* debug_name;
+ str8 filepath; // where it came from
+ str8 glsl; // contents
+} shader_desc;
+
+struct pipeline_desc {
+ shader_desc vs; /** @brief Vertex shader stage */
+ shader_desc fs; /** @brief Fragment shader stage */
+};
// lifecycle functions
gpu_device* gpu_device_create();
@@ -36,7 +45,7 @@ void gpu_device_destroy();
gpu_renderpass* gpu_renderpass_create();
void gpu_renderpass_destroy(gpu_renderpass* pass);
-gpu_pipeline* gpu_pipeline_create(pipeline_kind kind);
+gpu_pipeline* gpu_pipeline_create(enum pipeline_kind kind, struct pipeline_desc description);
void gpu_pipeline_destroy(gpu_pipeline* pipeline);
void gpu_cmd_encoder_begin();