Skip to content

Sampler depth comparison before MTLFeatureSet_iOS_GPUFamily3_v1  #556

@danginsburg

Description

@danginsburg

I'm getting this assertion in vkCreateSampler on iPad Air Gen 1 (A7):

validateMTLSamplerDescriptor:110: failed assertion `MTLSamplerDescriptor: setting a compareFunction is only supported on MTLFeatureSet_iOS_GPUFamily3_v1 and later'

It looks like on this family of GPU the sampler comparison function needs to be in the MSL. It looks to be related also to this spirv-cross issue: KhronosGroup/SPIRV-Cross#533

I'm not sure whether this is worth working around, but one question I have is whether there is anything in the MoltenVK API that lets me check whether sampler comparisons are supported? I didn't see anything. At a minimum I need to avoid this path in my code on this generation of hardware.

It seems it might be possible to patch Metal code to read the sampler comparison from the descriptor, but that seems probably not worth the effort here. I'm happy to just avoid shadow comparison on this generation of hardware.

Metadata

Metadata

Assignees

No one assigned

    Labels

    CompletedIssue has been fixed, or enhancement implemented.Enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions