mirror of
https://github.com/mikage-emu/mikage-dev.git
synced 2025-01-07 22:10:59 +01:00
Fix descriptor pool size setup
This commit is contained in:
parent
1bf27b6fd9
commit
eeeb945174
1 changed files with 14 additions and 10 deletions
|
@ -104,17 +104,21 @@ Renderer::Renderer(Memory::PhysicalMemory& mem, std::shared_ptr<spdlog::logger>
|
||||||
|
|
||||||
{
|
{
|
||||||
constexpr uint32_t num_tex_stages = 3;
|
constexpr uint32_t num_tex_stages = 3;
|
||||||
std::array<vk::DescriptorPoolSize, descriptor_pool_size / (num_tex_stages + 1)> pool_sizes;
|
constexpr uint32_t num_light_luts = 24;
|
||||||
ranges::fill(pool_sizes, vk::DescriptorPoolSize {
|
|
||||||
|
std::array<vk::DescriptorPoolSize, 3> pool_sizes;
|
||||||
|
pool_sizes[0] = vk::DescriptorPoolSize {
|
||||||
vk::DescriptorType::eCombinedImageSampler,
|
vk::DescriptorType::eCombinedImageSampler,
|
||||||
num_tex_stages // descriptor count (up to 3 texture stages)
|
num_tex_stages * 10 // descriptor count (up to 3 texture stages)
|
||||||
});
|
};
|
||||||
for (int i = 150; i < pool_sizes.size(); ++i) {
|
pool_sizes[1] = vk::DescriptorPoolSize {
|
||||||
pool_sizes[i] = vk::DescriptorPoolSize {
|
vk::DescriptorType::eUniformBuffer,
|
||||||
vk::DescriptorType::eUniformBuffer,
|
10
|
||||||
1 // descriptor count
|
};
|
||||||
};
|
pool_sizes[2] = vk::DescriptorPoolSize {
|
||||||
}
|
vk::DescriptorType::eUniformTexelBuffer,
|
||||||
|
num_light_luts * 10
|
||||||
|
};
|
||||||
|
|
||||||
vk::DescriptorPoolCreateInfo pool_info {
|
vk::DescriptorPoolCreateInfo pool_info {
|
||||||
vk::DescriptorPoolCreateFlagBits::eFreeDescriptorSet, // NOTE: Technically, we could do without this, but it's easier to manage descriptor sets by freeing and reallocating them instead
|
vk::DescriptorPoolCreateFlagBits::eFreeDescriptorSet, // NOTE: Technically, we could do without this, but it's easier to manage descriptor sets by freeing and reallocating them instead
|
||||||
|
|
Loading…
Reference in a new issue