I’ve got Cycles Metal working on my M1 Max (32 core). It’s rather impressive as well.
I built Blender from source on my MBP15 i9 with VEGA 20 dGPU and applied the diff for the unreviewed patch. That gave me an X86 build of Blender that showed the Metal GPU options on the Intel Mac but alas didn’t render (kernel internal error).
I then tried to set the ARM flag to compile again but that didn’t work.
So as a last ditch I took the built X86 version over to my M1 Max and low and behold it renders on the GPU.
BMW in 43 seconds on the 32 core GPU - so not 30% faster than the 24 core version but it is an X86 build.
However, every scene I tried the live viewport performance is rather wonderful.
I’d never built Blender from source until today. I’ll keep this build now to play with until the proper one lands.
The only slightly difficult bit was getting the new patch added, which I did like this:
patch -p1 < ~/Developer/D13423.diff [downloaded the RAW file from the Dev site]
Wow, this is rather amazing. It means that the feature is pretty darn close.
Here’s crossing fingers that the AMD Macs do get a fully featured pass too (i.e. MetalRT and all the Metal crunchies)
Certainly does. I read the diffs yesterday and the code committed seemed total genius and I couldn’t but help think… this looks like it might be very close indeed.
Great guide Staars thank you for posting. That is exactly what I did except for No 5. I’m actually skeptical No 4 is necessary as I tried it both ways and it worked for both!
The guide certainly works on the X86 build for me and when run under Rosetta 2 on M1 Max GPU rendering works.
I had a really good attempt at getting the ARM native version to build and ultimately failed but I got close. All of those errors Steve-Hanff are from the ARM build as I saw them on that build.
I managed to get the ARM Darwin Libs to download and set the CMake arch to arm64 and it gets so far into the build but still fails. I only tried building using an i9 Intel chip which definitely can compile for ARM.
There is a bug in 3.1 (even the daily X86 and ARM builds) where you can’t select anything reliably in the viewport. If I spot the viewport object selection bug being fixed in the 3.1 master I’ll re-compile again but hopefully by then the Metal patches will have also landed in the daily anyway.
Just followed the entire thread on the blenderArtists forum! The work you guys have done is amazing! Thanks for getting some numbers out so I do some preliminary testing on my current system and benchmark against it (GTX 1660 Super, Ryzen 5 3600, 32GB RAM).
Will post my results here shortly
According to Apple, the M1 has the fastest integrated graphics in a personal computer. Graphics performance tests have suggested the M1 chip offers performance that exceeds the GeForce GTX 1050 Ti and Radeon RX 560. It also earned an OpenCL score of 19305, similar to the Radeon RX 560X and Radeon Pro WX 4100.
Is anyone still using Open CL? Apple doesn’t even keep this API current. I mean Blender doesn’t even support Open CL anymore.
It’s better to use Metal benchmarks to compare against cards that also support Metal. Since most people are using Macs to run programs that are Metal compliant and slowly native ARM, like Blender.
Metal score for the M1 Max scores are around 69000 which put it in the same league as the desktop
RX 5700XT
Radeon VII
Pro Vegas 56
Sorry for being completely off topic and restarting this thread but I have been flailing around in a foreign area for a while, hoping someone who understands OpenCL, GPU details can help.
@Staars Wondering if you could point me in the right direction to get OpenCL working for my M1 MacBook?
I am trying to do what you did above except for darktable, which will likely never get a Metal port from Apple. Thx for any help.
I can not really help here that much.
What I did was basically to revert all commits, that deactivated OpenCL for Cycles in MacOS. This was relatively easy, as all the needed code had been there before. I did not add anything new nor a single line of OpenCL specific code.
You may succeed by digging in the code and find the places, where OpenCL is selectively turned off for for MacOS in the functions you want to checkout.
But I do not recommend to spend much time with it. It is very well possible to not even beat the CPU-only variant and every MacOS update may break it.
(BTW to be off topic too: I see massive performance losses in the Ventura betas in Cycles on my Vega56. Let‘s hope there is still a lot of debug code in it.)