2

I am creating a simple SpriteKit game that uses SpriteKit, UIKit, Foundation, and nothing else in terms of frameworks.

However, every time I tun the app I got the following two errors:

Metal GPU Frame Capture Enabled
Metal API Validation Enabled

How do I un-enable the Metal frameworks and make these errors go away?

pkamb
  • 33,281
  • 23
  • 160
  • 191
zeeple
  • 5,509
  • 12
  • 43
  • 71
  • 1
    SpriteKit is internally using Metal. The messages aren’t errors and can be ignored. – bg2b Feb 28 '20 at 00:51
  • Huh. Why is SpriteKit using Metal? Is there a way to ask it not to? – zeeple Feb 28 '20 at 00:55
  • 1
    SpriteKit and SceneKit are both higher-level frameworks built on Metal now (instead of OpenGL before). If you want to specifically request OpenGL, you can see this: https://developer.apple.com/documentation/spritekit/skview/requesting_the_opengl_renderer I'm not sure how well-supported the older OpenGL base is though; all the development effort is on the Metal side. – bg2b Feb 28 '20 at 01:56
  • I see. In that case I will ignore the messages. Any way to suppress them? – zeeple Feb 28 '20 at 15:52
  • Not as far as I know. There may be something in the build settings to disable them though, which might do it. (Disable the validation and capture that is, but it's still going to be using Metal.) – bg2b Feb 28 '20 at 17:20
  • Fix for [Metal API Validation Enabled](https://stackoverflow.com/questions/60645401/xcode-logging-metal-api-validation-enabled). – pkamb Apr 11 '21 at 04:09

2 Answers2

1

Do not worry, they are not errors just messages.

Maetschl
  • 1,330
  • 14
  • 23
0

If your target links to the Metal framework (or any other framework that uses the Metal API "SpriteKit"), Xcode automatically enables GPU Frame Capture and Metal API Validation. Enable these options in your app’s scheme to use the host of tools Xcode provides with Metal Frame Capture, and to test for correct API usage with Metal API Validation. You only disable these options when you want to test your app’s maximum performance level.

Enabling/Disabling Frame Capture

Hamid Yusifli
  • 9,688
  • 2
  • 24
  • 48