64 {
65
67
68
69 {
70 auto vertex_function = context.GetShaderLibrary()->GetFunction(
72 auto fragment_function = context.GetShaderLibrary()->GetFunction(
74
75 if (!vertex_function || !fragment_function) {
77 << VertexShader::kEntrypointName << "' and '"
78 << FragmentShader::kEntrypointName
79 << "' for pipeline named '" << VertexShader::kLabel
80 << "'.";
81 return false;
82 }
83
84 desc.AddStageEntrypoint(std::move(vertex_function));
85 desc.AddStageEntrypoint(std::move(fragment_function));
86 }
87
88
89 {
90 auto vertex_descriptor = std::make_shared<VertexDescriptor>();
91 vertex_descriptor->SetStageInputs(VertexShader::kAllShaderStageInputs,
92 VertexShader::kInterleavedBufferLayout);
93 vertex_descriptor->RegisterDescriptorSetLayouts(
94 VertexShader::kDescriptorSetLayouts);
95 vertex_descriptor->RegisterDescriptorSetLayouts(
96 FragmentShader::kDescriptorSetLayouts);
97 desc.SetVertexDescriptor(std::move(vertex_descriptor));
98 }
99
100
101 {
102
103
104 ColorAttachmentDescriptor color0;
105 color0.format = context.GetCapabilities()->GetDefaultColorFormat();
106 color0.blending_enabled = true;
107 desc.SetColorAttachmentDescriptor(0u, color0);
108 }
109
110
111 {
112 DepthAttachmentDescriptor depth0;
114 desc.SetDepthStencilAttachmentDescriptor(depth0);
115 desc.SetDepthPixelFormat(
116 context.GetCapabilities()->GetDefaultDepthStencilFormat());
117 }
118
119
120 {
121 StencilAttachmentDescriptor stencil0;
123 desc.SetStencilAttachmentDescriptors(stencil0);
124 desc.SetStencilPixelFormat(
125 context.GetCapabilities()->GetDefaultDepthStencilFormat());
126 }
127
128 return true;
129 }
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot data
std::string SPrintF(const char *format,...)
@ kEqual
Comparison test passes if new_value == current_value.
@ kAlways
Comparison test passes always passes.