Closed jinleili closed 3 years ago
use iPhone6 debug my project always crash:
2021-04-29 17:00:23.121398+0800 demo[1338:549768] -[MTLDebugDevice supportsFamily:]: unrecognized selector sent to instance 0x10410ef00
2021-04-29 17:00:23.129984+0800 demo[1338:549768] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[MTLDebugDevice supportsFamily:]: unrecognized selector sent to instance 0x10410ef00'
@expenses how do we translate this properly into the older feature set tables?
I.e. MTLGPUFamily::Apple3
is documented to correspond to iOS family 3 and tvOS family 2, but it's not clear which version of those families is required (iOS_GPUFamily3_v2
vs iOS_GPUFamily3_v1
).
Also related to #3208
Actually, I found an easy workaround. We shouldn't try to map this to the old features.
Instead, we should port all the checks to use the new feature set tables, and we should carefully find out if supports_family
is legal to call.
supports_family
only available on iOS 13,but iPhone6 is supportiOS_GPUFamily2_v3
and system only support up to iOS 12https://github.com/gfx-rs/gfx/blob/46735bb079997257b4e5d8e813e6ed9c71aefd3e/src/backend/metal/src/lib.rs#L1057