CTPanoramaView icon indicating copy to clipboard operation
CTPanoramaView copied to clipboard

Xcode 13/iOS 15 Crash when using CTPanoramaView

Open brian-telintelo-kr opened this issue 3 years ago • 2 comments

[MTLTextureDescriptorInternal validateWithDevice:]:1325: failed assertion `Texture Descriptor Validation

MTLTextureDescriptor has width (8704) greater than the maximum allowed size of 8192.

This was using an image taken from an Android phone.

brian-telintelo-kr avatar Oct 19 '21 19:10 brian-telintelo-kr

Any luck on this? I cant figure out where in the library is causing it.

claytonrothschild avatar Jun 22 '23 22:06 claytonrothschild

Maximum texture is related to device: try this code to check.

`

static var max1DTextureWidth: Int = { var maxLength = 8192;

// It's recommended to use your physical device
let device = MTLCreateSystemDefaultDevice()!

if device.supportsFamily(.apple1) || device.supportsFamily(.apple2) {
    maxLength = 8192 // A7 and A8 chips
} else {
    maxLength = 16384 // A9 and later chips
}
return maxLength

}()

`

Neogene avatar Oct 24 '23 16:10 Neogene