[WIP] Refactor creation of descriptorsets
This commit is contained in:
@@ -38,20 +38,31 @@ namespace openVulkanoCpp
|
||||
ShaderProgramType::Type stageFlags;
|
||||
void* immutableSamplers;
|
||||
|
||||
DescriptorSetLayoutBinding()
|
||||
: DescriptorSetLayoutBinding(Type::TYPE_UNIFORM_BUFFER_DYNAMIC, 1, ShaderProgramType::Type::VERTEX)
|
||||
constexpr DescriptorSetLayoutBinding()
|
||||
: DescriptorSetLayoutBinding(0, Type::TYPE_UNIFORM_BUFFER_DYNAMIC, 1, ShaderProgramType::Type::VERTEX)
|
||||
{}
|
||||
|
||||
DescriptorSetLayoutBinding(Type descriptorType, uint32_t descriptorCount,
|
||||
constexpr DescriptorSetLayoutBinding(uint32_t bindingId, Type descriptorType, uint32_t descriptorCount,
|
||||
ShaderProgramType::Type stageFlags, void* immutableSamplers = nullptr)
|
||||
: bindingId(0), descriptorType(descriptorType)
|
||||
: bindingId(bindingId), descriptorType(descriptorType)
|
||||
, descriptorCount(descriptorCount), stageFlags(stageFlags)
|
||||
, immutableSamplers(immutableSamplers)
|
||||
{}
|
||||
|
||||
DescriptorSetLayoutBinding(uint32_t id, const DescriptorSetLayoutBinding& layout)
|
||||
constexpr DescriptorSetLayoutBinding(uint32_t id, const DescriptorSetLayoutBinding& layout)
|
||||
: bindingId(id), descriptorType(layout.descriptorType), descriptorCount(layout.descriptorCount)
|
||||
, stageFlags(layout.stageFlags), immutableSamplers(layout.immutableSamplers)
|
||||
{}
|
||||
|
||||
constexpr bool operator <(const DescriptorSetLayoutBinding& rhs) const
|
||||
{
|
||||
return bindingId < rhs.bindingId &&
|
||||
descriptorType < rhs.descriptorType &&
|
||||
descriptorCount < rhs.descriptorCount &&
|
||||
stageFlags < rhs.stageFlags &&
|
||||
immutableSamplers < rhs.immutableSamplers;
|
||||
}
|
||||
};
|
||||
|
||||
static constexpr inline DescriptorSetLayoutBinding NODE_LAYOUT_BINDING = {0, DescriptorSetLayoutBinding::Type::TYPE_UNIFORM_BUFFER_DYNAMIC, 1, ShaderProgramType::ALL_GRAPHICS};
|
||||
}
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "Base/Utils.hpp"
|
||||
#include <string_view>
|
||||
#include <cinttypes>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user