Describes the format and layout of vertices expected by the pipeline. While it is possible to construct these descriptors manually, it would be tedious to do so. These are usually constructed using shader information reflected using impellerc
. The usage of this class is indirectly via PipelineBuilder<VS, FS>
.
More...
#include <vertex_descriptor.h>
|
| VertexDescriptor () |
|
virtual | ~VertexDescriptor () |
|
template<size_t Size, size_t LayoutSize> |
void | SetStageInputs (const std::array< const ShaderStageIOSlot *, Size > &inputs, const std::array< const ShaderStageBufferLayout *, LayoutSize > &layout) |
|
void | SetStageInputs (const std::vector< ShaderStageIOSlot > &inputs, const std::vector< ShaderStageBufferLayout > &layout) |
|
template<size_t Size> |
void | RegisterDescriptorSetLayouts (const std::array< DescriptorSetLayout, Size > &inputs) |
|
void | SetStageInputs (const ShaderStageIOSlot *const stage_inputs[], size_t count, const ShaderStageBufferLayout *const stage_layout[], size_t layout_count) |
|
void | RegisterDescriptorSetLayouts (const DescriptorSetLayout desc_set_layout[], size_t count) |
|
const std::vector< ShaderStageIOSlot > & | GetStageInputs () const |
|
const std::vector< ShaderStageBufferLayout > & | GetStageLayouts () const |
|
const std::vector< DescriptorSetLayout > & | GetDescriptorSetLayouts () const |
|
std::size_t | GetHash () const override |
|
bool | IsEqual (const VertexDescriptor &other) const override |
|
bool | UsesInputAttacments () const |
|
virtual std::size_t | GetHash () const=0 |
|
Describes the format and layout of vertices expected by the pipeline. While it is possible to construct these descriptors manually, it would be tedious to do so. These are usually constructed using shader information reflected using impellerc
. The usage of this class is indirectly via PipelineBuilder<VS, FS>
.
Definition at line 23 of file vertex_descriptor.h.
◆ VertexDescriptor()
impeller::VertexDescriptor::VertexDescriptor |
( |
| ) |
|
|
default |
◆ ~VertexDescriptor()
impeller::VertexDescriptor::~VertexDescriptor |
( |
| ) |
|
|
virtualdefault |
◆ GetDescriptorSetLayouts()
const std::vector< DescriptorSetLayout > & impeller::VertexDescriptor::GetDescriptorSetLayouts |
( |
| ) |
const |
◆ GetHash()
size_t impeller::VertexDescriptor::GetHash |
( |
| ) |
const |
|
override |
Definition at line 47 of file vertex_descriptor.cc.
48 auto seed = fml::HashCombine();
49 for (
const auto& input : inputs_) {
50 fml::HashCombineSeed(seed, input.GetHash());
52 for (
const auto& layout : layouts_) {
53 fml::HashCombineSeed(seed, layout.GetHash());
◆ GetStageInputs()
const std::vector< ShaderStageIOSlot > & impeller::VertexDescriptor::GetStageInputs |
( |
| ) |
const |
◆ GetStageLayouts()
◆ IsEqual()
bool impeller::VertexDescriptor::IsEqual |
( |
const VertexDescriptor & |
other | ) |
const |
|
overridevirtual |
◆ RegisterDescriptorSetLayouts() [1/2]
void impeller::VertexDescriptor::RegisterDescriptorSetLayouts |
( |
const DescriptorSetLayout |
desc_set_layout[], |
|
|
size_t |
count |
|
) |
| |
◆ RegisterDescriptorSetLayouts() [2/2]
template<size_t Size>
void impeller::VertexDescriptor::RegisterDescriptorSetLayouts |
( |
const std::array< DescriptorSetLayout, Size > & |
inputs | ) |
|
|
inline |
◆ SetStageInputs() [1/3]
Definition at line 13 of file vertex_descriptor.cc.
18 inputs_.reserve(inputs_.size() + count);
19 layouts_.reserve(layouts_.size() + layout_count);
20 for (
size_t i = 0; i < count; i++) {
21 inputs_.emplace_back(*stage_inputs[i]);
23 for (
size_t i = 0; i < layout_count; i++) {
24 layouts_.emplace_back(*stage_layout[i]);
◆ SetStageInputs() [2/3]
template<size_t Size, size_t LayoutSize>
◆ SetStageInputs() [3/3]
Definition at line 28 of file vertex_descriptor.cc.
31 inputs_.insert(inputs_.end(), inputs.begin(), inputs.end());
32 layouts_.insert(layouts_.end(), layout.begin(), layout.end());
◆ UsesInputAttacments()
bool impeller::VertexDescriptor::UsesInputAttacments |
( |
| ) |
const |
◆ kReservedVertexBufferIndex
constexpr size_t impeller::VertexDescriptor::kReservedVertexBufferIndex |
|
staticconstexpr |
The documentation for this class was generated from the following files: