Cycles: Properly default to Metal-RT off unless GPU is a M3 or newer #120299
No reviewers
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Code Documentation
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
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 & 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
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
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
Asset System
Module
Core
Module
Development Management
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
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
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#120299
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "Alaska/blender:default-to-metal-rt-off"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Ever since commit [1],
use_metalrt_by_default
will be Trueif the GPU being used is not a M1 or M2 based system.
The intention of this was to enable MetalRT by default for
M3 and newer devices that have hardware for ray traversal.
However the side effect of this change was that all AMD GPUs would
have
use_metalrt_by_default
set to True. Which appears to be themain culprit causing crashes on older AMD GPUs in #120126.
Since these GPUs don't support MetalRT.
This commit fixes this issue by only setting
use_metalrt_by_default
to True if the GPU is not M1 or M2 based,and the GPU is Apple Silicon based. Which equates to M3 or newer.
Which is the original intent of this code.
This resolves the issue where AMD GPUs were being told to use MetalRT
by default, when they shouldn't be.
[1]
322a2f7b12
Cycles: Default to Metal-RT off unless the device is a M3 or newerto Cycles: Properly default to Metal-RT off unless GPU is a M3 or newerIt seems this pull request also fixes the performance regression seen on Vega II reported in #120006
I don't believe Vega II officially supports MetalRT, so I assume the performance regression mostly comes from MetalRT being a bit broken/slow on that hardware.
There is another way of doing this change. Add a
NOT_APPLE_SILICON
item to the start of theAppleGPUArchitecture
enum, then getMetalInfo::get_apple_gpu_architecture()
to returnNOT_APPLE_SILICON
if the GPU vendor is not Apple. This way if any new code in the future makes use ofget_apple_gpu_architecture
for a similar purpose as the MetalRT check, it also benefits from this change.If you would prefer this approach, let me know.
@blender-bot package
Package build started. Download here when ready.
Unfortunately, I can not verify this patch on the current main, as it renders all black (even prior to this patch). So, instead i've tested the patch with 4.1. The timing goes as following:
Overall I think it is safe to assume the patch does what it is expected to do on both reading the code, andtesting the behavior on actual hardware.
It might indeed be better from code side, but it sounds to be a bigger (and hence more risky change) compared to what you originally proposed here. I think it is better to land the simple and more isolated version first, to allow an easier cherry-picking for 4.1.1.
Here is that code change: !120448