#pragma once
#include "../vulkan.h"
#include "zstd/pool.h"
#include "commandbuffer.h"
namespace vulkanapi {
	class Device;
	class Queue;
	class DescriptorPool {
	protected:
		VkDescriptorPool mPtr;
		Device& mDevice;
	public:
		DescriptorPool(Device& device, vector<VkDescriptorPoolSize>& pPoolSizes,uint32_t maxSets);

		VkDescriptorSet Allocate(VkDescriptorSetLayout& descriptorSetLayout);
	public:
		static vector<VkDescriptorPoolSize> DefaultDescriptorPoolSize() {
			return 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}
			};
		}
	};
}