When I toggle antialiasing on, my view just flickers, badly. Also, the view becomes almost unresponsive, it won’t scale and other toggle keys stop working (like ‘t’ in this example). It looks like the flicker is around the 60Hz frame rate. Since this is a playground, I don’t think I can use the debugger to check what’s happening. So, I started commenting out code. I’ve narrowed it down to this line in draw(in:) :
view.sampleCount = antialiasingEnabled ? 4 : 1
I checked that my device supports 4 samples using supportsTextureSampleCount() and it supports 1,2,4, or 8 samples.