FCT
载入中...
搜索中...
未找到
VK_DescriptorPool.cpp
浏览该文件的文档.
1
2#include "../ThirdParty.h"
5namespace FCT
6{
7 namespace RHI
8 {
13
15 {
16 std::vector<vk::DescriptorPoolSize> poolSizes = {
17 {vk::DescriptorType::eUniformBuffer, m_ctx->maxFrameInFlight() * 100},
18
19 {vk::DescriptorType::eCombinedImageSampler, m_ctx->maxFrameInFlight() * 100},
20 {vk::DescriptorType::eStorageBuffer, m_ctx->maxFrameInFlight() * 50},
21 {vk::DescriptorType::eStorageImage, m_ctx->maxFrameInFlight() * 50},
22 {vk::DescriptorType::eSampledImage, m_ctx->maxFrameInFlight() * 100},
23 {vk::DescriptorType::eSampler, m_ctx->maxFrameInFlight() * 50}
24 };
25
26 vk::DescriptorPoolCreateInfo poolInfo{};
27 poolInfo.maxSets = 1000;
28 poolInfo.setPoolSizes(poolSizes);
29
30 poolInfo.flags = vk::DescriptorPoolCreateFlagBits::eFreeDescriptorSet;
31
32 m_descriptorPool = m_ctx->device().createDescriptorPool(poolInfo);
33 }
34 }
35}