createPipelineAsync method

  1. @override
Future<PipelineHandle> createPipelineAsync(
  1. ShaderHandle vertex,
  2. ShaderHandle fragment, {
  3. VertexLayoutDescriptor? layout,
})
override

The inner device's own asynchronous link, so a device that compiles off the thread still does under the recorder; the pipeline is written into the trace when the link completes, as createPipeline writes it. A refused link is not recorded: there is no pipeline to name.

Implementation

@override
Future<PipelineHandle> createPipelineAsync(
  ShaderHandle vertex,
  ShaderHandle fragment, {
  VertexLayoutDescriptor? layout,
}) async {
  final pipeline = await inner.createPipelineAsync(
    vertex,
    fragment,
    layout: layout,
  );
  events.add(
    TraceCreatePipeline(
      id: _name(_pipelineIds, pipeline),
      vertex: vertex.name,
      fragment: fragment.name,
      layout: layout,
    ),
  );
  return pipeline;
}