55 lines
1.2 KiB
C
55 lines
1.2 KiB
C
// =============================================
|
|
// Aster: pipeline_utils.h
|
|
// Copyright (c) 2020-2024 Anish Bhobe
|
|
// =============================================
|
|
|
|
#pragma once
|
|
|
|
#include "global.h"
|
|
|
|
#include <EASTL/array.h>
|
|
#include <EASTL/vector.h>
|
|
|
|
struct Device;
|
|
struct Texture;
|
|
struct UniformBuffer;
|
|
|
|
struct Handle
|
|
{
|
|
u16 m_Index;
|
|
};
|
|
|
|
struct BufferHandle : Handle
|
|
{
|
|
};
|
|
|
|
struct TextureHandle : Handle
|
|
{
|
|
};
|
|
|
|
struct RenderResourceManager
|
|
{
|
|
const Device *m_Device;
|
|
|
|
vk::DescriptorPool m_DescriptorPool;
|
|
vk::DescriptorSetLayout m_SetLayout;
|
|
vk::DescriptorSet m_DescriptorSet;
|
|
|
|
vk::DescriptorUpdateTemplate m_BufferUpdate;
|
|
vk::DescriptorUpdateTemplate m_TextureUpdate;
|
|
|
|
eastl::vector<UniformBuffer> m_Buffers;
|
|
eastl::vector<Texture> m_Textures;
|
|
// TODO: eastl::vector<StorageTexture> m_Textures;
|
|
|
|
// UniformBuffer *Allocate();
|
|
// UniformBuffer *Fetch(UniformHandle handle);
|
|
// void Commit(UniformHandle handle);
|
|
// Texture *Allocate();
|
|
// Texture *Fetch(TextureHandle handle);
|
|
// void Commit(TextureHandle handle);
|
|
|
|
// Ctor/Dtor
|
|
explicit RenderResourceManager(const Device *device);
|
|
~RenderResourceManager();
|
|
}; |