GPUPipeline
已编译的 GPU 渲染管线(着色器 + 固定功能状态)。
构造器
new
new(desc: {vertex: PipelineStage, fragment: PipelineStage?, vertexLayout:{VertexBufferLayout}, bindGroupLayouts:{GPUBindGroupLayout}?, colorTargets:{ColorTarget}?, depthStencil: DepthStencilState?, stencilFront: StencilFaceState?, stencilBack: StencilFaceState?, stencilReadMask: number?, stencilWriteMask: number?, cullMode: CullMode?, winding: FaceWinding?, topology: PrimitiveTopology?, sampleCount: number?,}) -> GPUPipeline
方法
getBindGroupLayout
getBindGroupLayout(groupIndex: number) -> GPUBindGroupLayout
返回管线为 @group(N) 自动派生的布局。如果在构造时提供了 bindGroupLayouts(重用显式布局)或管线的入口点未绑定 N,则报错。镜像 WebGPU 的 pipeline.getBindGroupLayout(index)。