5db30f619e
It turns out `MTLHeapDescriptor` does not exists on the simulator. ```Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_MTLHeapDescriptor", referenced from: objc-class-ref in AppDelegate.o ld: symbol(s) not found for architecture x86_64``` A `[DisableDefaultCtor]` was used (by mistake / lack of documentation) and this was hiding the issue (on our bots). However on device introspection was not happy: iOSApiSelectorTest [FAIL] Selector not found for Metal.MTLHeapDescriptor : cpuCacheMode [FAIL] Selector not found for Metal.MTLHeapDescriptor : setCpuCacheMode: [FAIL] Selector not found for Metal.MTLHeapDescriptor : size [FAIL] Selector not found for Metal.MTLHeapDescriptor : setSize: [FAIL] Selector not found for Metal.MTLHeapDescriptor : storageMode [FAIL] Selector not found for Metal.MTLHeapDescriptor : setStorageMode: [FAIL] iOSApiSelectorTest.ApiSelectorTest.InstanceMethods : 6 errors found in 18339 instance selector validated Note that these are the properties, not the `init` that's mentioned here. So first `init` is possible, on devices, from Xcode: MTLHeapDescriptor *hd = [[MTLHeapDescriptor alloc] init]; NSLog (@"%@", [hd description]); gives <MTLHeapDescriptorInternal: 0x17401da50> { cpuCacheMode = MTLCPUCacheModeDefaultCache; size = 0; storageMode = MTLStorageModePrivate; } so we need to remove our `[DisableDefaultCtor]`. That does not fix the selectors above... but note the *Internal type returned, they are forwarded and that's generally something that respondToSelector (that introspection uses) does not cover. But, to be sure, we add unit tests showing all the properties are working like expected :-) |
||
---|---|---|
.. | ||
ClearValueTest.cs | ||
DeviceTest.cs | ||
HeapDescriptorTest.cs | ||
MTLAttributeDescriptorTest.cs | ||
MTLAttributeTest.cs | ||
MTLBufferLayoutDescriptorTest.cs | ||
MTLFunctionConstantTest.cs | ||
MTLStageInputOutputDescriptorTest.cs |