GPURenderPipelineDescriptor constructor

GPURenderPipelineDescriptor({
  1. JSAny layout,
  2. GPUVertexState vertex,
  3. GPUFragmentState fragment,
  4. GPUPrimitiveState primitive,
  5. GPUDepthStencilState depthStencil,
  6. GPUMultisampleState multisample,
  7. String label,
})

A pipeline for a pass with a depth-stencil attachment.

layout is GPUPipelineLayout | "auto", so it is typed as JSAny. A backend that hands over the string gets a layout inferred from the shader and a pipeline whose bind groups belong to it alone — two pipelines built that way cannot share a bind group even when their bindings are identical, which for a renderer with one camera block and forty materials is forty copies of the camera. So the string is for a spike and a real GPUPipelineLayout is for a backend.

Implementation

external factory GPURenderPipelineDescriptor({
  JSAny layout,
  GPUVertexState vertex,
  GPUFragmentState fragment,
  GPUPrimitiveState primitive,
  GPUDepthStencilState depthStencil,
  GPUMultisampleState multisample,
  String label,
});