2023-10-26 18:37:29 +02:00
|
|
|
#include "Descriptor.h"
|
|
|
|
|
|
|
|
|
|
using namespace Seele;
|
|
|
|
|
using namespace Seele::Gfx;
|
|
|
|
|
|
2024-04-19 18:23:36 +02:00
|
|
|
DescriptorLayout::DescriptorLayout(const std::string& name) : name(name) {}
|
2024-04-13 23:51:38 +02:00
|
|
|
|
|
|
|
|
DescriptorLayout::~DescriptorLayout() {}
|
|
|
|
|
|
2024-04-19 22:44:00 +02:00
|
|
|
void DescriptorLayout::addDescriptorBinding(DescriptorBinding binding) {
|
2025-02-28 16:56:51 +09:00
|
|
|
descriptorBindings.add(binding);
|
2023-11-15 00:06:00 +01:00
|
|
|
}
|
|
|
|
|
|
2024-04-13 23:51:38 +02:00
|
|
|
PDescriptorSet DescriptorLayout::allocateDescriptorSet() { return pool->allocateDescriptorSet(); }
|
|
|
|
|
|
|
|
|
|
void DescriptorLayout::reset() { pool->reset(); }
|
|
|
|
|
|
|
|
|
|
DescriptorPool::DescriptorPool() {}
|
|
|
|
|
|
|
|
|
|
DescriptorPool::~DescriptorPool() {}
|
|
|
|
|
|
|
|
|
|
DescriptorSet::DescriptorSet(PDescriptorLayout layout) : layout(layout) {}
|
|
|
|
|
|
|
|
|
|
DescriptorSet::~DescriptorSet() {}
|
|
|
|
|
|
2024-04-20 21:35:43 +02:00
|
|
|
PipelineLayout::PipelineLayout(const std::string& name) : name(name) {}
|
2024-04-13 23:51:38 +02:00
|
|
|
|
2024-06-09 12:20:04 +02:00
|
|
|
PipelineLayout::PipelineLayout(const std::string& name, PPipelineLayout baseLayout) : name(name) {
|
|
|
|
|
if (baseLayout != nullptr) {
|
|
|
|
|
descriptorSetLayouts = baseLayout->descriptorSetLayouts;
|
|
|
|
|
pushConstants = baseLayout->pushConstants;
|
|
|
|
|
}
|
2023-11-15 00:06:00 +01:00
|
|
|
}
|
|
|
|
|
|
2024-04-13 23:51:38 +02:00
|
|
|
PipelineLayout::~PipelineLayout() {}
|
|
|
|
|
|
2024-06-09 12:20:04 +02:00
|
|
|
void PipelineLayout::addDescriptorLayout(PDescriptorLayout layout) { descriptorSetLayouts[layout->getName()] = layout; }
|
2023-11-15 00:06:00 +01:00
|
|
|
|
2024-04-13 23:51:38 +02:00
|
|
|
void PipelineLayout::addPushConstants(const SePushConstantRange& pushConstant) { pushConstants.add(pushConstant); }
|
2024-04-19 18:23:36 +02:00
|
|
|
|
2025-03-25 09:17:08 +01:00
|
|
|
void PipelineLayout::addMapping(std::string mappingName, uint32 index) { parameterMapping[mappingName] = index; }
|