Minor improvements to Pipeline and Window
This commit is contained in:
1 parent
7cfb38163b
commit
b256b90abb
4 files changed
+21
No files matched your search
@@ -97,6 +97,20 @@ namespace Copium
|
||||
return std::make_unique<DescriptorSet>(descriptorPool, descriptorSetLayouts[setIndex], bindings);
|
||||
}
|
||||
|
||||
// TODO: Attempt to move implementation to only use this instead
|
||||
DescriptorSet Pipeline::CreateDescriptorSetRef(DescriptorPool& descriptorPool, int setIndex) const
|
||||
{
|
||||
std::set<ShaderBinding> bindings;
|
||||
for (auto& binding : shaderReflector.bindings)
|
||||
{
|
||||
if (binding.set != setIndex)
|
||||
continue;
|
||||
bindings.emplace(binding);
|
||||
}
|
||||
|
||||
return DescriptorSet{descriptorPool, descriptorSetLayouts[setIndex], bindings};
|
||||
}
|
||||
|
||||
void Pipeline::InitializeDescriptorSetLayout(const PipelineCreator& creator)
|
||||
{
|
||||
boundDescriptorSets.resize(creator.descriptorSetLayouts.size());
|
||||
|
||||
@@ -32,6 +32,7 @@ namespace Copium
|
||||
void BindDescriptorSets(const CommandBuffer& commandBuffer);
|
||||
|
||||
std::unique_ptr<DescriptorSet> CreateDescriptorSet(DescriptorPool& descriptorPool, int setIndex) const;
|
||||
DescriptorSet CreateDescriptorSetRef(DescriptorPool& descriptorPool, int setIndex) const;
|
||||
|
||||
private:
|
||||
void InitializeDescriptorSetLayout(const PipelineCreator& creator);
|
||||
|
||||
Reference in new issue
Block a user