iOS 12 - validateNewTexture:89

1,272 阅读1分钟

参考链接1: stackoverflow.com/questions/5…

参考链接2: github.com/KhronosGrou…

报错信息: validateNewTexture:89: failed assertion `BytesPerRow of a buffer-backed texture with pixelFormat(MTLPixelFormatBGRA8Unorm) must be aligned to 64 bytes, found bytesPerRow(4112)'

修正方案: Xcode → Product → Scheme → Edit Scheme → Run → Diagnostics → Metal → API Validation

取消勾选 API Validation 即可。