kitty icon indicating copy to clipboard operation
kitty copied to clipboard

Downgrade OpenGL version requirement to 3.1

Open marcan opened this issue 2 years ago • 4 comments
trafficstars

There are only a few features required from newer versions, and they can be achieved via extensions. This significantly improves compatibility.

marcan avatar Dec 20 '22 07:12 marcan

Could you tell me a little about what is the increase in compatibility. Is there some specific device/line of devices that support 3.1 but not 3.3 that this will help with?

kovidgoyal avatar Dec 20 '22 09:12 kovidgoyal

See #2790. In particular, GL 3.2 requires geometry shader support, which a bunch of hardware does not support (like ARM and Apple GPUs). Emulating that somehow is not impossible, but Mesa has no such emulation today and this is unlikely to be fixed any time soon. This should make kitty work on ARM GPUs (Panfrost) today, and Apple GPUs (Asahi) in the near future. See https://mesamatrix.net/.

In general, you should always aim to use the lowest reasonable GL version and request extensions for additional functionality, to improve compatibility.

marcan avatar Dec 20 '22 09:12 marcan

OK I'll merge it if it works on all the GPUs I have to test with, thanks.

kovidgoyal avatar Dec 20 '22 10:12 kovidgoyal

This PR prevents kitty from running on macOS with the error: The targeted version of macOS does not support OpenGL 3.0 or 3.1 but might support 3.2 or newer.

You should probably #ifdef __APPLE__ out the changes.

kovidgoyal avatar Dec 20 '22 15:12 kovidgoyal