62 {
63
65
66
67 {
68 auto vertex_function = context.GetShaderLibrary()->GetFunction(
70 auto fragment_function = context.GetShaderLibrary()->GetFunction(
72
73 if (!vertex_function || !fragment_function) {
75 << VertexShader::kEntrypointName << "' and '"
76 << FragmentShader::kEntrypointName
77 << "' for pipeline named '" << VertexShader::kLabel
78 << "'.";
79 return false;
80 }
81
82 desc.AddStageEntrypoint(std::move(vertex_function));
83 desc.AddStageEntrypoint(std::move(fragment_function));
84 }
85
86
87 {
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));
96 }
97
98
99 {
100
101
102 ColorAttachmentDescriptor color0;
103 color0.format = context.GetCapabilities()->GetDefaultColorFormat();
104 color0.blending_enabled = true;
105 desc.SetColorAttachmentDescriptor(0u, color0);
106 }
107
108
109 {
110 DepthAttachmentDescriptor depth0;
112 desc.SetDepthStencilAttachmentDescriptor(depth0);
113 desc.SetDepthPixelFormat(
114 context.GetCapabilities()->GetDefaultDepthStencilFormat());
115 }
116
117
118 {
119 StencilAttachmentDescriptor stencil0;
121 desc.SetStencilAttachmentDescriptors(stencil0);
122 desc.SetStencilPixelFormat(
123 context.GetCapabilities()->GetDefaultDepthStencilFormat());
124 }
125
126 return true;
127 }
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