scihant / CTPanoramaView

A library that displays spherical or cylindrical panoramas with touch or motion based controls.
MIT License
1.03k stars 87 forks source link

Xcode 13/iOS 15 Crash when using CTPanoramaView #61

Open brian-telintelo-kr opened 2 years ago

brian-telintelo-kr commented 2 years ago

[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.

claytonrothschild commented 1 year ago

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

Neogene commented 10 months ago

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

}()

`