我有一个在iOS 12.x上运行良好的ARKit应用程序。在iOS 13上,我在控制台日志中遇到以下错误:
[SceneKit] Error: Purging never freed texture <AGXA9FamilyTexture: 0x11d688240>
label = <none>
textureType = MTLTextureType2D
pixelFormat = MTLPixelFormatR16Float
width = 240
height = 1
depth = 1
arrayLength = 1
mipmapLevelCount = 1
sampleCount = 1
cpuCacheMode = MTLCPUCacheModeDefaultCache
storageMode = MTLStorageModePrivate
hazardTrackingMode = MTLHazardTrackingModeTracked
resourceOptions = MTLResourceCPUCacheModeDefaultCache MTLResourceStorageModePrivate MTLResourceHazardTrackingModeTracked
usage = MTLTextureUsageShaderRead MTLTextureUsageShaderWrite
shareable = 0
framebufferOnly = 0
purgeableState = MTLPurgeableStateNonVolatile
swizzle = [MTLTextureSwizzleRed, MTLTextureSwizzleGreen, MTLTextureSwizzleBlue, MTLTextureSwizzleAlpha]
isCompressed = 0
parentTexture = <null>
parentRelativeLevel = 0
parentRelativeSlice = 0
buffer = <null>
bufferOffset = 512
bufferBytesPerRow = 0
allowGPUOptimizedContents = YES
label = <none>
它每隔几毫秒重复一次,把整个日志弄乱。我无法缩小它的来源。
有趣的是,这甚至发生在场景中没有一个节点时。如果我从视图中删除整个sceneView,它将消失…(不是选项)
有人知道或暗示如何追踪这件事吗?
谢谢
最佳答案
我通过更新场景摄影机的设置修复了此问题:
var sceneView: ARSCNView!
...
sceneView.pointOfView?.camera?.wantsHDR = false
希望这有帮助。
关于swift - iOS13 SceneKit错误–清除永不释放的纹理,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/58287022/