gfx-rs/gfx

```supports_family``` only available on iOS 13

jinleili opened this issue · 4 comments

supports_family only available on iOS 13,but iPhone6 is support iOS_GPUFamily2_v3 and system only support up to iOS 12

supports_binary_archives: device.supports_family(MTLGPUFamily::Apple3)

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'
kvark commented

@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

kvark commented

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.