mirror of
https://github.com/Kbz-8/Pulse.git
synced 2026-01-11 23:43:34 +00:00
working on vulkan's descriptor sets
This commit is contained in:
@@ -10,11 +10,60 @@
|
||||
#include <vulkan/vulkan_core.h>
|
||||
|
||||
#include <Pulse.h>
|
||||
#include "../../PulseInternal.h"
|
||||
|
||||
typedef struct VulkanDescriptor
|
||||
#include "VulkanEnums.h"
|
||||
|
||||
#define VULKAN_POOL_SIZE 128
|
||||
|
||||
typedef struct VulkanDescriptorSetLayout
|
||||
{
|
||||
} VulkanDescriptor;
|
||||
VkDescriptorSetLayout layout;
|
||||
VulkanDescriptorSetType type;
|
||||
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
uint32_t storage_buffer_count;
|
||||
uint32_t storage_texture_count;
|
||||
} ReadOnly;
|
||||
struct
|
||||
{
|
||||
uint32_t storage_buffer_count;
|
||||
uint32_t storage_texture_count;
|
||||
} ReadWrite;
|
||||
struct
|
||||
{
|
||||
uint32_t buffer_count;
|
||||
} Uniform;
|
||||
};
|
||||
} VulkanDescriptorSetLayout;
|
||||
|
||||
typedef struct VulkanDescriptorSet
|
||||
{
|
||||
VulkanDescriptorSetLayout* layout;
|
||||
struct VulkanDescriptorSetPool* pool;
|
||||
VkDescriptorSet set;
|
||||
} VulkanDescriptorSet;
|
||||
|
||||
typedef struct VulkanDescriptorSetPool
|
||||
{
|
||||
VulkanDescriptorSet* used_sets[VULKAN_POOL_SIZE];
|
||||
VulkanDescriptorSet* free_sets[VULKAN_POOL_SIZE];
|
||||
VkDescriptorPool pool;
|
||||
uint32_t sets_count;
|
||||
} VulkanDescriptorSetPool;
|
||||
|
||||
typedef struct VulkanDescriptorSetPoolManager
|
||||
{
|
||||
VulkanDescriptorSetPool* pools;
|
||||
uint32_t pools_capacity;
|
||||
uint32_t pools_size;
|
||||
} VulkanDescriptorSetPoolManager;
|
||||
|
||||
void VulkanInitDescriptorSetPoolManager(VulkanDescriptorSetPoolManager* manager);
|
||||
VulkanDescriptorSetPool* VulkanGetAvailableDescriptorSetPool(VulkanDescriptorSetPoolManager* manager);
|
||||
void VulkanDestroyDescriptorSetPoolManager(VulkanDescriptorSetPoolManager* manager);
|
||||
|
||||
#endif // PULSE_VULKAN_DESCRIPTOR_H_
|
||||
|
||||
|
||||
Reference in New Issue
Block a user