Xcode日志记录:“启用金属API验证"; [英] Xcode logging: "Metal API Validation Enabled"

查看:202
本文介绍了Xcode日志记录:“启用金属API验证";的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在通过Xcode构建一个macOS应用.每次构建时,我都会得到日志输出:

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

启用了金属API验证

Metal API Validation Enabled

据我所知,我的应用程序未使用任何Metal功能.我没有使用硬件加速的3D图形或着色器,视频游戏功能或类似功能.

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.

为什么Xcode打印Metal API日志输出?

Why is Xcode printing Metal API log output?

我的应用程序中正在使用Metal吗?我可以还是应该禁用它?

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

如何禁用此启用金属API验证"日志消息?

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

推荐答案

通过您的Xcode方案切换Metal API验证:

Toggle Metal API Validation via your Xcode Scheme:

方案>编辑方案...>运行>诊断>金属API验证.

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

这是一个复选框,因此可能的选项是 Enabled Disabled .

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

禁用会在 .xcscheme 文件中设置密钥 enableGPUValidationMode = 1 .

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

禁用后,Xcode不再记录"Metal API Validation Enabled".日志消息.

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

注意:在Xcode 11及更低版本中,该选项会显示在选项"方案编辑器标签(而不是诊断"标签)

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

这篇关于Xcode日志记录:“启用金属API验证";的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆