64 desc.SetLabel(
SPrintF(
"%s Pipeline", FragmentShader::kLabel.
data()));
68 auto vertex_function = context.GetShaderLibrary()->GetFunction(
70 auto fragment_function = context.GetShaderLibrary()->GetFunction(
73 if (!vertex_function || !fragment_function) {
75 << VertexShader::kEntrypointName <<
"' and '"
76 << FragmentShader::kEntrypointName
77 <<
"' for pipeline named '" << VertexShader::kLabel
82 desc.AddStageEntrypoint(std::move(vertex_function));
83 desc.AddStageEntrypoint(std::move(fragment_function));
88 auto vertex_descriptor = std::make_shared<VertexDescriptor>();
89 vertex_descriptor->SetStageInputs(VertexShader::kAllShaderStageInputs,
90 VertexShader::kInterleavedBufferLayout);
91 vertex_descriptor->RegisterDescriptorSetLayouts(
92 VertexShader::kDescriptorSetLayouts);
93 vertex_descriptor->RegisterDescriptorSetLayouts(
94 FragmentShader::kDescriptorSetLayouts);
95 desc.SetVertexDescriptor(std::move(vertex_descriptor));
102 ColorAttachmentDescriptor color0;
103 color0.format = context.GetCapabilities()->GetDefaultColorFormat();
104 color0.blending_enabled =
true;
105 desc.SetColorAttachmentDescriptor(0u, color0);
110 DepthAttachmentDescriptor depth0;
112 desc.SetDepthStencilAttachmentDescriptor(depth0);
113 desc.SetDepthPixelFormat(
114 context.GetCapabilities()->GetDefaultDepthStencilFormat());
119 StencilAttachmentDescriptor stencil0;
121 desc.SetStencilAttachmentDescriptors(stencil0);
122 desc.SetStencilPixelFormat(
123 context.GetCapabilities()->GetDefaultDepthStencilFormat());
std::string SPrintF(const char *format,...)
@ kEqual
Comparison test passes if new_value == current_value.
@ kAlways
Comparison test passes always passes.
std::shared_ptr< const fml::Mapping > data