这是indexloc提供的服务,不要输入任何密码
Skip to content

GPURenderBundleEncoder.setPipeline() not implementable on MTLIndirectCommandBuffer #3423

@litherum

Description

@litherum

The spec says:

GPURenderBundleEncoder includes GPURenderCommandsMixin;
...
interface mixin GPURenderCommandsMixin {
    undefined setPipeline(GPURenderPipeline pipeline);
    ...
}
...
dictionary GPURenderPipelineDescriptor : GPUPipelineDescriptorBase {
    ...
    GPUDepthStencilState depthStencil;
    ...
}
...
dictionary GPUDepthStencilState {
    ...
    GPUCompareFunction depthCompare = "always";
    ...
};

So it needs to be possible to set new render pipelines, with new depth compare functions, in the bundle.

However, Metal has separate RenderPipelineState and DepthStencilState objects:

protocol MTLIndirectRenderCommand {
    ...
    func setRenderPipelineState(MTLRenderPipelineState)
    /* no setDepthStencilState() */
    ...
}
...
class MTLDepthStencilDescriptor : NSObject {
    ...
    var depthCompareFunction: MTLCompareFunction
    ...
}

It's not possible to set a MTLDepthStencilState in a MTLIndirectRenderCommand.

Historically, this group has been designing GPURenderBundleEncoder to be implementable on top of MTLIndirectCommandBuffer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions