Search code examples
metal

Is there a way to programmatically get limitations of a particular feature in Metal?


I see that a combination of Apple GPU HW and iOS/MacOS version determines a feature set. I can query which feature set my MTLDevice supports using below swift snippet.

device.supportsFeatureSet(MTLFeatureSet.osx_GPUFamily1_v1)

I still need to refer the table in the below link to get the individual feature limitations.

Metal Feature Set

Is there a way to know this programmatically? For example, know how many colorAttachments are supported per renderPass?


Solution

  • No, there is no API to query the hardware and software limits of a given device.