Group Group Group Group Group Group Group Group Group

Chapter 10 Antialiasing section

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.

Any ideas?

Do you happen to have a dual-gpu system? if yes, does this happen on both GPUs? if not, what gpu are you on, Xcode version and macOS version?

NVIDIA GeForce GTX 780M:

Chipset Model: NVIDIA GeForce GTX 780M
Type: GPU
Bus: PCIe
PCIe Lane Width: x16
VRAM (Dynamic, Max): 4096 MB
Vendor: NVIDIA (0x10de)
Device ID: 0x119e
Revision ID: 0x00a2
ROM Revision: 3782
Metal: Supported, feature set macOS GPUFamily1 v4

iMac:

Display Type: LCD
Resolution: 2560 x 1440 (QHD/WQHD - Wide Quad High Definition)
UI Looks like: 2560 x 1440
Framebuffer Depth: 24-Bit Color (ARGB8888)
Main Display: Yes
Mirror: Off
Online: Yes
Rotation: Supported
Automatically Adjust Brightness: No
Connection Type: DisplayPort

System Version: macOS 10.14 (18A391)

Kernel Version: Darwin 18.0.0

Xcode Version 10.0 (10A255)

By the way, the same flickering happens with the playground loaded from the final folder.

@mhorga Can you please help with this when you get a chance? Thank you - much appreciated! :]

sorry, I wish I could help, but I do not have an NVIDIA card and I do not know anyone else around me who has one.