Metal Graphics Card Mac



Here are some feedbacks about the Mac mini M1 I purchased few weeks ago, in order to compile and test GeeXLab with the new Apple Silicon M1.

The M1 Chip

Metal Graphics Card Mac

The new documentation from Apple explains which graphics cards are compatible with macOS 10.14 Mojave thanks to their support of Apple’s 3D API (known as Metal). Mac Pros released between 2010 to. When it comes to Graphics Cards, NVIDIA can easily make it to the list of top 3 vendors and GeForce GTX 680 Mac Edition is a masterpiece from NVIDIA. It will cost you $199 which is the second-best price for a Metal-Capable Graphics card compatible with macOS 10.15.

The M1 chip is a SoC (System on a Chip) and includes a 8-core CPU, a 8-core GPU as well as other components like a neural engine, memory or input/output interfaces.

The M1 GPU has a FP32 performance of 2.6 TFLOPS (source). This is more or less the same performance than the Radeon RX 560 or the GeForce GTX 1650:
– GeForce GTX 1650: 2.9 TFLOPS
– Radeon RX 560: 2.6 TFLOPS
See THIS PAGE for a more complete TFLOP table.

Xcode, command line tools

The source code of GeeXLab is based on makefiles and I had no problem to compile all core libraries from the command line. I installed the latest Xcode 12.3 as well as the command line tools (because gcc/g++ are needed). By default, the compilation in command line (like gcc file.c) produces a binary for the arm64 architecture. I was surprised to see that all GeeXLab OpenGL code has been successfully compiled. OpenGL is still there in the latest macOS Big Sur!

Using Xcode 12.3, you can generate a kind of hybrid executable (Apple calls it an universal macOS binary) that packs the x86_64 and arm64 code. But in command line with gcc/g++, you have to specify the target architecture. By default on Apple M1 + Big Sur, gcc will generate an amr64 code. If you want to generate a x86_64 code you have to use the following gcc option:
-target x86_64-apple-macos10.15

Example:
gcc main.c -o x86_test -target x86_64-apple-macos10.15

To compile for arm64 architecture:
gcc main.c -o arm_test -target arm64-apple-macos11

The arm64-apple-macos11 target is handy if you are on an Intel-based Mac mini and want to compile for ARM architecture.

Once I finished to build GeeXLab, I was impressed by its launch speed: very fast. On Linux, the launch of GeeXLab is fast but on macOS Big Sur + Apple M1, the startup is a bit faster.

This is GeeXLab compiled for arm64 architecture:

Rosetta

I compiled GeeXLab in two separate versions: GeeXLab for arm64 and GeeXLab for Intel x86_64. On the Apple M1, you can’t launch an x86_64 executable directly. You have to install Rosetta before. Fortunately, it’s easy, you are guided by macOS:

Graphics


Rosetta is a translation layer that allows the Apple M1 CPU (arm64 architecture) to execute a x86_64 code developed for Intel-based Macs. The first version of Rosetta was developed for the switch from PowerPC to Intel CPUs. Rosetta 2 is the new version for the switch from Intel to Apple silicon M1 CPUs.

Rosetta works fine: here, we have GeeXLab compiled for x86_64 architecture running on Apple M1:

Metal Graphics Card Download For Mac

Metal capable graphics card macbook pro


Here is the same GeeXLab on an Intel-based Mac mini:


Look at the framerate: 1951 FPS (M1 CPU, arm64 native code), 1282 FPS (M1 CPU, x86_64 emulated code via rosetta) and 471 FPS (Intel CPU, x86_64 native code). This statement found on the Apple M1 homepage is true:

And thanks to Metal and M1, some of the most graphically demanding apps perform better under Rosetta 2 than they did running natively on previous Mac systems with integrated graphics.

M1 GPU OpenGL Test


Let’s do another test: a shadertoy demo with a heavy pixel shader. I chose a recent demo that gives some good results: Neural Stanford Bunny 5kb.

This demo has been ported to GeeXLab and is available in the shadertoy demopack in the following folder:
geexlab-demopack-shadertoy/gl-32-shadertoy-02/neural-stanford-bunny-5-kb/

Resolution of the demo: 800×480

Some framerates:
GeForce RTX 2070 on Windows 10: 720 FPS
Apple M1 Mac mini (arm64 native code): 245 FPS
– Apple M1 Mac mini (x86_64 via rosetta): 220 FPS
GeForce GTX 750 on Windows 10: 176 FPS

Let’s look at the theoretical FP32 performance of these GPUs:
– GeForce RTX 2070: 7.4 TFLOPS
– Apple M1: 2.6 TFLOPS
– GeForce GTX 750: 1.1 FLOPS

Results sound coherent. This shadertoy test shows us that the M1 GPU is not a toy.

GeeXLab for arm64 can be downloaded from this link.
GeeXLab for x86_64 can be downloaded from this link.

Activity Monitor

Metal Compatible Graphics Card Mac

macOS Big Sur has a way to know for what architecture a program has been compiled. Launch the Activity Monitor and look at the Architecture column:

– GeeXLab for Apple Silicon M1:

External Graphics Card Mac

– GeeXLab for Intel x86_64:

OpenGL info

To end this article, here is the OpenGL 4.1 and OpenGL 2.1 data from GeeXLab (M1 arm64) log file. The modern way to do graphics programming on macOS is to use the Metal API (or Vulkan via MoltenVK). But a lot of OpenGL applications exist for macOS and it’s nice to know that they still work. According to the GL_VERSION, OpenGL in macOS is based on the Metal API.

OpenGL 4.1

OpenGL 2.1

Metal Compatible Graphics Card Mac


Related posts:

Card

Graphics card requirements

Final Cut Pro, Motion 5, and Compressor 4 require a graphics card that supports Metal, an Apple technology that lets the system and apps efficiently tap into the capabilities of today’s graphics processors (GPUs). If you're editing 4K video, using 3D titles, or editing 360º video, 1GB of VRAM is recommended.

Supported aftermarket graphics cards

The following aftermarket graphics cards support Metal in macOS Mojave and later:

  • AMD Radeon HD 7950 Mac Edition
  • NVIDIA GeForce GTX 680 Mac Edition
  • NVIDIA Quadro K5000 for Mac
  • AMD Radeon VII
  • MSI Gaming Radeon RX 560 128-bit 4GB GDRR5
  • SAPPHIRE Radeon PULSE RX 580 8GB GDDR5
  • SAPPHIRE Radeon HD 7950 Mac Edition
  • NVIDIA Quadro K5000 for Mac
  • NVIDIA GeForce GTX 680 Mac Edition
  • AMD Radeon RX 560
  • AMD Radeon RX 570
  • AMD Radeon RX 580
  • AMD Radeon Pro WX 7100
  • AMD Radeon RX Vega 56
  • AMD Radeon RX Vega 64
  • AMD Radeon Pro WX 9100
  • AMD Radeon Frontier Edition
Compatible

Metal Graphics Card Mac

Learn more

Metal Graphics Card Mac Fortnite

  • Learn about Final Cut Pro, Motion 5, and Compressor 4