Is there interest in supporting a Metal version of Cycles for MacOS?

We can’t give any time estimate regarding this.

1 Like

Just the fact that someone says the timeline isn’t concrete and not just “we are not considering Metal” is good enough right now. :slight_smile:

3 Likes

I have a stupid question (probably).
I’m working on a Mac. When I use the viewport render preview (Cycles) my activity monitor indicates that both, the CPU a n d GPU are working at 100% usage.
Also when I render an image the GPU is working (maybe 20-80% - depending on the scene).
In other CPU render engines the GPU isn’t working at all when rendering.
Why is that? Does Cycles on MacOS still use the GPU for some calculations?

Tells us about the content discussed about supporting metal? Because there is no good gpu as of now?

Out of curiosity I played with the latest cycles-x branch and tried to port it to metal - more or less as a personal exercise.
The first annoying thing was, that the metal compiler needs an explicit address space qualifier for each and every pointer or reference, which floods the code with it, but at least it is probably solvable with brute force and much typing. It would be nice, if Apple would add at least add a compiler flag to treat every pointer as “thread”, except it has an other qualifier.

The bigger problem is, that metal until now (2.4) does not support lambdas, which are used in the cycles code quite a lot. The next metal version will usually be presented at the next WWDC 2022 and it is not guaranteed, that this will be included. It would technically for sure be possible to rewrite it or maintain two versions of these parts, but that would uglify everything and is not very tempting.
Fore sure there are more obstacles, but I did only scratch the surface so far.

So my questions to the developer team are:
Do you know more? If my observations are correct, would you wait for Apple do catch up the other platforms with the metal framework in order to not fragment the cycles code even more? (would mean no cycles metal port before summer 2022)

12 Likes

So, the news is that Apple is contributing a Metal backend to Cycles. The relevant task is here:
https://developer.blender.org/T92212

We’ve been talking to Apple about this for a while, but have not been able to share it until now.

49 Likes

Big news probably related timing wise to the m1x arm macs being announced Monday

14 Likes

Yeah, although I really hope a more powerful (30 inch) Apple Silicon iMac will be released soon, which will really be able to utilize Blender’s powers.

We’re really excited to work with the Community on enabling Cycles on Metal. Cycles works great on macOS, and we want to ensure you experience it as such also.

Any questions or feedback on the work as it lands over the coming weeks is both welcome and encouraged, and we’d certainly like to hear from those looking to early adopt and try out Cycles on Metal in your workflows.

46 Likes

When will the first test build available?
I’m eager to test it with the M1

2 Likes

We’ll bring a feature branch up with a fully Metal-enabled version over the coming weeks, as we tidy up the code and break it up into atomic commits that make sense for code review.

The first commit was the most invasive, touching all function signatures that took an undecorated pointer.

I expect our next commits will add the metal_compat.h and they remainder of the kernel changes needed to compile as MSL, along with the main kernel entry point wrappers. Then we’ll add the host side device.

25 Likes

This is amazing news! Big thanks to Apple for the support!

I do have a question about what the future might hold for Apple and Blender after Cycles is up and running on Metal. It sounds like moving the entire Blender code base away from OpenGL is going to be a huge endeavor. Does Apple intend to provide future assistance to the Blender team when the time comes to make the switch to a native Metal version (Or Vulkan/MoltenVK)?

5 Likes

That’s fantastic Jason!
I’ve been hoping for this since the disappointment that my nicely specced AMD iMac couldn’t use GPU for cycles. I temporarily used a Linux box, but I’ve since switched to an M1 Mac mini, and those GPU cores are chomping at the bit to do some work. I know your work is cut out for you, but there has been talk on other forums about viewport using metal as well, and possible AI denoise support, just FYI
I’d say those two things and of course cycles and evee support are the four main integrations.

There are people talking of Blender being ported to iPad but I’m not even sure that makes sense, as the UI would need a huge rewrite. Although I can currently sculpt on iPad with an apple pencil using sidecar connected to the mac, some improvements there would be very welcome. That’s all I can think of now.

4 Likes

Thanks for the feedback - we are certainly intending to support Blender as a whole, and our teams are focused on the overall workflow experience of using Blender on Mac and how that can be improved.

On the technical side, we’re ready to talk about Cycles on Metal, and get that tech contributed back smoothly for the 3.1 release.

29 Likes

good news sure looking forward to try this.

2 Likes

This is great. What’s the best way to give you feedback and bug reports as you drop the first iteration of Cycles on Metal? I’ll also be testing it on the new M1X MBP 16" and on my iMac Pro.

4 Likes

Awesome!! Thanks guys for working on this :innocent:

2 Likes

Once there is an actual implementation to test, it will go through the regular Blender channels. Bug reports go to the Blender bug tracker, and for feedback we can create a topic here on devtalk.

17 Likes

Hi Jason,

I would love to contribute via testing - our lab at Wayne state got upgraded to M1 iMacs - and I teach Blender also in my design courses.

8 Likes

@jason-apple Best news in years :slight_smile:
Glad to see Apple officially joining the Blender crowd. And I am very much looking forward to how it will benefit the community.

4 Likes