-
Notifications
You must be signed in to change notification settings - Fork 353
Closed
Description
To create a compute pipeline, one must write:
const pipeline = device.createComputePipeline({
layout: shaderLayout,
computeStage: {
module: shaderModule,
entryPoint: 'main'
}
})
As there are no more properties in GPUComputePipelineDescriptor interface than in example above, I made a shortcut method under GPUDevice class in my project for creating a compute pipeline.
createComputePipeline(GPUShaderModule, entryPoint = 'main', GPUPipelineLayout?) : GPUComputePipeLine
The shortcut covers 100% of all usage cases. Layout is an optional because one could use "getBindGroupLayout" method to infer the bind group layout from the shader module. EntryPoint defaults to 'main' so its also optional.
So the question is, should the creation of compute pipeline not be in line with pipelines that produces graphic output, as they share no common parameters.
Metadata
Metadata
Assignees
Labels
No labels