Looking at the documentation for the methods to create MTLRenderPipelineState
s
I'm trying to understand the differences between the different RenderPipelineStates created by using:
- MTLRenderPipelineStateDesciptor (5 methods)
- MTLTileRenderPipelineDescriptor (3 methods)
- MTLMeshRenderPipelineDescriptor (2 methods)
Not all methods that exist for the MTLRenderPipelineDescriptor
case exist for the Tile and Mesh variants and I was wondering why. The only way to synchronously make a Mesh PipelineState is currently by this method:
func makeRenderPipelineState(
descriptor: MTLMeshRenderPipelineDescriptor,
options: MTLPipelineOption
) throws -> (MTLRenderPipelineState, MTLRenderPipelineReflection?)
which also creates a MTLRenderPipelineReflection?
Is there a clear reason for that which I just fail to understand? Or are these methods just not there at the moment?
The example code in https://developer.apple.com/wwdc22/10162 does not compile for example.
// initialize pipeline state object
var meshPipeline: MTLRenderPipelineState!
do {
meshPipeline = try device.makeRenderPipelineState(descriptor: meshPipelineDescriptor)
} catch {
print(“Error when creating pipeline state: \(error)\”)
}