iosxcodemacosmetaloslog

Xcode logging: "Metal API Validation Enabled"


I'm building a macOS app via Xcode. Every time I build, I get the log output:

Metal API Validation Enabled

To my knowledge my app is not using any Metal features. I'm not using hardware-accelerated 3D graphics or shaders or video game features or anything like that.

Why is Xcode printing Metal API log output?

Is Metal being used in my app? Can I or should I disable it?

How can I disable this "Metal API Validation Enabled" log message?


Solution

  • Toggle Metal API Validation via your Xcode Scheme:

    Scheme > Edit Scheme... > Run > Diagnostics > Metal API Validation.

    It's a checkbox, so the possible options are Enabled or Disabled.

    Disabling sets the key enableGPUValidationMode = 1 in your .xcscheme file.

    After disabling, Xcode no longer logs the "Metal API Validation Enabled" log message.

    Note: In Xcode 11 and below, the option appears in the "Options" tab of the Scheme Editor (instead of the "Diagnostics" tab).