#include <vertex_descriptor_mtl.h>
Definition at line 17 of file vertex_descriptor_mtl.h.
◆ VertexDescriptorMTL()
impeller::VertexDescriptorMTL::VertexDescriptorMTL |
( |
| ) |
|
|
default |
◆ ~VertexDescriptorMTL()
impeller::VertexDescriptorMTL::~VertexDescriptorMTL |
( |
| ) |
|
|
default |
◆ GetMTLVertexDescriptor()
MTLVertexDescriptor * impeller::VertexDescriptorMTL::GetMTLVertexDescriptor |
( |
| ) |
const |
◆ SetStageInputsAndLayout()
Definition at line 172 of file vertex_descriptor_mtl.mm.
174 {
175 auto descriptor = descriptor_ = [MTLVertexDescriptor vertexDescriptor];
176
177
178
179
180 for (
size_t i = 0;
i <
inputs.size();
i++) {
183 if (vertex_format == MTLVertexFormatInvalid) {
184 VALIDATION_LOG <<
"Format for input " << input.name <<
" not supported.";
185 return false;
186 }
187 auto attrib = descriptor.attributes[input.location];
188 attrib.format = vertex_format;
189 attrib.offset = input.offset;
190 attrib.bufferIndex =
192 }
193
194 for (
size_t i = 0;
i < layouts.size();
i++) {
195 const auto& layout = layouts[
i];
196 auto vertex_layout =
198 layout.binding];
199 vertex_layout.stride = layout.stride;
200 vertex_layout.stepRate = 1u;
201 vertex_layout.stepFunction = MTLVertexStepFunctionPerVertex;
202 }
203 return true;
204}
static constexpr size_t kReservedVertexBufferIndex
static MTLVertexFormat ReadStageInputFormat(const ShaderStageIOSlot &input)
The documentation for this class was generated from the following files: