zengine/engine/modules/render/vulkan/include/vkn/wrapper/descriptorpool.h

25 lines
710 B
C
Raw Normal View History

2024-10-27 22:37:35 +08:00
#pragma once
#include "vkn/type.h"
#include "commandbuffer.h"
namespace vkn {
class Device;
class Queue;
class DescriptorPool {
protected:
VkDescriptorPool mPtr;
Device& mDevice;
public:
DescriptorPool(Device& device, pmr::vector<VkDescriptorPoolSize>& pPoolSizes,uint32_t maxSets);
VkDescriptorSet Allocate(VkDescriptorSetLayout& descriptorSetLayout);
public:
static pmr::vector<VkDescriptorPoolSize> DefaultDescriptorPoolSize() {
return pmr::vector<VkDescriptorPoolSize>{
{VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 10000},
{VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, 10000},
{VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, 10000},
{VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT, 10000}
};
}
};
}