gpt4 book ai didi

swift - iOS13 SceneKit 错误 – 清除从未释放纹理

转载 作者:行者123 更新时间:2023-11-28 13:26:23 25 4
gpt4 key购买 nike

我有一个在 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>

它每隔几毫秒重复一次,使整个日志变得困惑。我无法缩小它的来源范围。

有趣的是,即使场景中没有单个节点,也会发生这种情况。如果我从 View 中删除整个 sceneView 那么它就会消失......(不是一个选项)

任何人有任何想法或提示如何追踪这个吗?

谢谢

最佳答案

我通过更新场景相机的设置解决了这个问题:

var sceneView: ARSCNView!
...
sceneView.pointOfView?.camera?.wantsHDR = false

希望这对您有所帮助。

关于swift - iOS13 SceneKit 错误 – 清除从未释放纹理,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58287022/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com