Skip to content

Metal is unable to copy depth formats into colors #1692

@kvark

Description

@kvark

Currently the spec allows D32 -> R32 and D16 -> R16 copies.

On Metal, we generally implement copies between different formats by "casting" one of the sides to the other (i.e .newTextureViewWithPixelFormat], followed by the copy command on BlitCommandEncoder.

However, Metal defines "cast" only within certain groups, and it places color formats in a separate group from the depth formats. So we end up with:

source texture pixelFormat (MTLPixelFormatDepth32Float) not castable

I suggest we remove any notion of Depth -> Color copies from the spec, at least for MVP, to address this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions