I'm looking at Apple's Device Selection and Fallback for Graphics Rendering sample code. In that code, MTLCopyAllDevicesWithObserver() returns an array of MTLCaptureDevice objects. However, when a disconnect event is handled, the device sent to the observer is an MTLDebugDevice.
How do I correctly compare an MTLDebugDevice with an MTLCaptureDevice? You would think that -isEqual: would return true if they pointed to the same device, but it doesn't. I'm using macOS 10.15.4.