diff options
author | omniscient <17525998+omnisci3nce@users.noreply.github.com> | 2024-07-09 23:32:33 +1000 |
---|---|---|
committer | omniscient <17525998+omnisci3nce@users.noreply.github.com> | 2024-07-09 23:32:33 +1000 |
commit | 3103f383751a12f8a0bdb22309704f1f826d204c (patch) | |
tree | 7da8febddfcc40b15de5d7fc3c9a5215d88c5cab /src/ral/ral_common.c | |
parent | d5f22a65ab12b289d80b035e45e6f1e9460b82d1 (diff) |
wip: some cleanup of ral
Diffstat (limited to 'src/ral/ral_common.c')
-rw-r--r-- | src/ral/ral_common.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/ral/ral_common.c b/src/ral/ral_common.c new file mode 100644 index 0000000..755b489 --- /dev/null +++ b/src/ral/ral_common.c @@ -0,0 +1,19 @@ +#include "ral_common.h" +#include "ral_impl.h" + +void backend_pools_init(arena* a, gpu_backend_pools* backend_pools) { + pipeline_layout_pool pipeline_layout_pool = + pipeline_layout_pool_create(a, MAX_PIPELINES, sizeof(gpu_pipeline_layout)); + backend_pools->pipeline_layouts = pipeline_layout_pool; + pipeline_pool pipeline_pool = pipeline_pool_create(a, MAX_PIPELINES, sizeof(gpu_pipeline)); + backend_pools->pipelines = pipeline_pool; + renderpass_pool rpass_pool = renderpass_pool_create(a, MAX_RENDERPASSES, sizeof(gpu_renderpass)); + backend_pools->renderpasses = rpass_pool; +} + +void resource_pools_init(arena* a, struct resource_pools* res_pools) { + buffer_pool buf_pool = buffer_pool_create(a, MAX_BUFFERS, sizeof(gpu_buffer)); + res_pools->buffers = buf_pool; + texture_pool tex_pool = texture_pool_create(a, MAX_TEXTURES, sizeof(gpu_texture)); + res_pools->textures = tex_pool; +}
\ No newline at end of file |