diff options
author | omniscient <17525998+omnisci3nce@users.noreply.github.com> | 2024-04-27 12:00:37 +1000 |
---|---|---|
committer | omniscient <17525998+omnisci3nce@users.noreply.github.com> | 2024-04-27 12:00:37 +1000 |
commit | d6837defc03e431517f6616ec8e49a8eb3643011 (patch) | |
tree | 14e6685c86d268dfc08f3f831e7ee9b19efc60e0 /src/renderer/cleanroom/ral.h | |
parent | 8dae0a94059bd21a5a10e4434cadc843126d8b05 (diff) |
Start moving more files to using ral.h
Diffstat (limited to 'src/renderer/cleanroom/ral.h')
-rw-r--r-- | src/renderer/cleanroom/ral.h | 23 |
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(); |