Cycles GPU rendering is broken on Apple M1/macOS Ventura #100824

Open
opened 2022-09-05 09:50:20 +02:00 by Meils Dühnforth · 28 comments

System Information
Operating system: macOS-13.0-arm64-arm-64bit 64 Bits
Graphics card: Apple M1 Max Apple 4.1 Metal - 83

Blender Version
Broken: version: 3.3.0 Release Candidate, branch: master, commit date: 2022-09-03 09:36, hash: a631dc5575
Worked: 3.2.2

Short description of error
Cycles GPU rendering is broken, CPU rendering works as expected.

Cycles - CPU:
cpu.png

Cycles - GPU Compute:
gpu.png

Exact steps for others to reproduce the error

  1. Create any scene
  2. Switch Cycles to GPU Compute
    simple_test.blend
**System Information** Operating system: macOS-13.0-arm64-arm-64bit 64 Bits Graphics card: Apple M1 Max Apple 4.1 Metal - 83 **Blender Version** Broken: version: 3.3.0 Release Candidate, branch: master, commit date: 2022-09-03 09:36, hash: `a631dc5575` Worked: 3.2.2 **Short description of error** Cycles GPU rendering is broken, CPU rendering works as expected. Cycles - CPU: ![cpu.png](https://archive.blender.org/developer/F13460888/cpu.png) Cycles - GPU Compute: ![gpu.png](https://archive.blender.org/developer/F13460890/gpu.png) **Exact steps for others to reproduce the error** 1. Create any scene 2. Switch Cycles to GPU Compute [simple_test.blend](https://archive.blender.org/developer/F13460896/simple_test.blend)

Added subscriber: @meils

Added subscriber: @meils

Added subscriber: @ThomasDinges

Added subscriber: @ThomasDinges

Changed status from 'Needs Triage' to: 'Needs User Info'

Changed status from 'Needs Triage' to: 'Needs User Info'

Cannot confirm this on macOS 12.3 with latest master (3.4 Alpha), GPU renders fine here. Can you please check with 3.4 Alpha as well?

Cannot confirm this on macOS 12.3 with latest master (3.4 Alpha), GPU renders fine here. Can you please check with 3.4 Alpha as well?

Also please note that macOS 13 is not released yet, might be a bug in the OS itself.

Also please note that macOS 13 is not released yet, might be a bug in the OS itself.

Added subscribers: @Michael-Jones, @brecht

Added subscribers: @Michael-Jones, @brecht

CC @michael_jones.

CC @michael_jones.

The result with the latest 3.4 Alpha is different, but still broken.

gpu_3.4.png

This might very well be a macOS Beta bug, but I thought it might be worth reporting due to the fact that Blender 3.2.2 renders fine on the latest macOS 13 Beta.

The result with the latest 3.4 Alpha is different, but still broken. ![gpu_3.4.png](https://archive.blender.org/developer/F13461154/gpu_3.4.png) This might very well be a macOS Beta bug, but I thought it might be worth reporting due to the fact that Blender 3.2.2 renders fine on the latest macOS 13 Beta.

Changed status from 'Needs User Info' to: 'Needs Developer To Reproduce'

Changed status from 'Needs User Info' to: 'Needs Developer To Reproduce'

Thanks for testing, let's wait for feedback from Michael then.

Thanks for testing, let's wait for feedback from Michael then.

I am on an older 13.0 beta and see the same broken rendering as posted in the description. A local build based on 03aeef64d5 seems to be rendering correctly on the same OS. As a next step, I will try to narrow this down further.

I am on an older 13.0 beta and see the same broken rendering as posted in the description. A local build based on 03aeef64d5c2bd1eb1aa790bddbce728857778f3 seems to be rendering correctly on the same OS. As a next step, I will try to narrow this down further.

Added subscriber: @Memento

Added subscriber: @Memento

For some reason reverting e11c899e71 (which disabled slow-to-compile inlining) fixed the bad render. I will follow up internally as this could be a shader compiler bug.

For some reason reverting e11c899e715b (which disabled slow-to-compile inlining) fixed the bad render. I will follow up internally as this could be a shader compiler bug.

This patch fixes the issue by disabling the ccl_device_noinline macro. Total compile time on first render increases to ~2 minutes on M1 Max, which is not fast but better than the previous ~4.5 minutes with aggressive inlining enabled. The resulting benchmark score is about 5% higher with this change on M1 Max.

Fix #100824.patch

This patch fixes the issue by disabling the `ccl_device_noinline` macro. Total compile time on first render increases to ~2 minutes on M1 Max, which is not fast but better than the previous ~4.5 minutes with aggressive inlining enabled. The resulting benchmark score is about 5% higher with this change on M1 Max. [Fix #100824.patch](https://archive.blender.org/developer/F13462967/Fix_T100824.patch)

@Michael-Jones the release process for Blender 3.3.0 already started, so it's difficult to fix this still. 2 minutes is still a longer wait than I think is good for users.

Do you think the macOS 13 release is far enough away that this can wait for 3.3.1 in a few weeks or even get fixed in macOS? Or is the macOS 13 release going to be soon?

@Michael-Jones the release process for Blender 3.3.0 already started, so it's difficult to fix this still. 2 minutes is still a longer wait than I think is good for users. Do you think the macOS 13 release is far enough away that this can wait for 3.3.1 in a few weeks or even get fixed in macOS? Or is the macOS 13 release going to be soon?

This issue was referenced by 6d08ba8a50

This issue was referenced by 6d08ba8a5082ee6bbac8e735a4817d704a03212b

This issue was referenced by 0759f671ce

This issue was referenced by 0759f671ce1ff687c4e3518ee518717c577ed22c

Uploaded as D15897: Fix #100824: Cycles GPU render broken on macOS 13 Beta to test on the buildbot. So far seems to work as expected on macOS 12 + MacBook Air M1.

I'm installing macOS 13 Beta 4 now as well to test that.

Uploaded as [D15897: Fix #100824: Cycles GPU render broken on macOS 13 Beta](https://archive.blender.org/developer/D15897) to test on the buildbot. So far seems to work as expected on macOS 12 + MacBook Air M1. I'm installing macOS 13 Beta 4 now as well to test that.

The relative improvement in compile times seems bigger than on the M1 Max, and even better on macOS 13.

  • Full inlining on macOS 12: 370s
  • Partial inlining on macOS 12: 120s
  • Partial inlining on macOS 13 Beta 4: 70s
The relative improvement in compile times seems bigger than on the M1 Max, and even better on macOS 13. * Full inlining on macOS 12: 370s * Partial inlining on macOS 12: 120s * Partial inlining on macOS 13 Beta 4: 70s

Testing this on macOS 13 with the tests and various benchmark scenes, it seems the partial inlining patch works at least as well as full inlining, and no inlining just always gives wrong renders.

However I still saw two issue regardless of inlining:

  • Test reports/T139823 fails, the sphere with SSS is black (but other SSS tests work).
  • MetalRT with the junkshop either renders without hair or crashes.

So still some compiler bug to be fixed there I think. But committing the patch seems like the best solution for 3.3.0, so I'll go ahead and do that.

Testing this on macOS 13 with the tests and various benchmark scenes, it seems the partial inlining patch works at least as well as full inlining, and no inlining just always gives wrong renders. However I still saw two issue regardless of inlining: * Test `reports/T139823` fails, the sphere with SSS is black (but other SSS tests work). * MetalRT with the junkshop either renders without hair or crashes. So still some compiler bug to be fixed there I think. But committing the patch seems like the best solution for 3.3.0, so I'll go ahead and do that.

Changed status from 'Needs Developer To Reproduce' to: 'Resolved'

Changed status from 'Needs Developer To Reproduce' to: 'Resolved'
Brecht Van Lommel self-assigned this 2022-09-06 19:07:42 +02:00

Changed status from 'Resolved' to: 'Confirmed'

Changed status from 'Resolved' to: 'Confirmed'

Will leave this report open for investigation of other macOS 13 issues than the simple scene from the description.

Will leave this report open for investigation of other macOS 13 issues than the simple scene from the description.

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'

Rendering without hair in the MetalRT + junkshop is happening in macOS 12 too, probably just a mistake in the code. Luckily MetalRT is just an experimental test option, so we can fix that in 3.3.1. However the crashing may be a more difficult issue.

Rendering without hair in the MetalRT + junkshop is happening in macOS 12 too, probably just a mistake in the code. Luckily MetalRT is just an experimental test option, so we can fix that in 3.3.1. However the crashing may be a more difficult issue.

Changed status from 'Resolved' to: 'Confirmed'

Changed status from 'Resolved' to: 'Confirmed'

Added subscriber: @skyscapeparadise

Added subscriber: @skyscapeparadise

Added subscriber: @Kuutti-Taavitsainen

Added subscriber: @Kuutti-Taavitsainen
Brecht Van Lommel removed their assignment 2023-02-08 03:35:48 +01:00
Philipp Oeser removed the
Interest
Render & Cycles
label 2023-02-09 14:04:09 +01:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
8 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#100824
No description provided.