Very slow Eevee performance on Mac with AMD Radeon #70445
Closed
opened 2019-10-02 14:25:32 +02:00 by Maciej Sobolewski
·
68 comments
No Branch/Tag Specified
temp-sculpt-dyntopo-hive-alloc
temp-sculpt-dyntopo
main
blender-v3.6-release
node-group-operators
brush-assets-project
asset-shelf
tmp-usd-python-mtl
blender-v2.93-release
blender-v3.3-release
universal-scene-description
asset-browser-frontend-split
temp-sculpt-attr-api
blender-v3.5-release
realtime-clock
sculpt-dev
gpencil-next
bevelv2
microfacet_hair
blender-projects-basics
principled-v2
v3.3.7
v2.93.18
v3.5.1
v3.3.6
v2.93.17
v3.5.0
v2.93.16
v3.3.5
v3.3.4
v2.93.15
v2.93.14
v3.3.3
v2.93.13
v2.93.12
v3.4.1
v3.3.2
v3.4.0
v3.3.1
v2.93.11
v3.3.0
v3.2.2
v2.93.10
v3.2.1
v3.2.0
v2.83.20
v2.93.9
v3.1.2
v3.1.1
v3.1.0
v2.83.19
v2.93.8
v3.0.1
v2.93.7
v3.0.0
v2.93.6
v2.93.5
v2.83.18
v2.93.4
v2.93.3
v2.83.17
v2.93.2
v2.93.1
v2.83.16
v2.93.0
v2.83.15
v2.83.14
v2.83.13
v2.92.0
v2.83.12
v2.91.2
v2.83.10
v2.91.0
v2.83.9
v2.83.8
v2.83.7
v2.90.1
v2.83.6.1
v2.83.6
v2.90.0
v2.83.5
v2.83.4
v2.83.3
v2.83.2
v2.83.1
v2.83
v2.82a
v2.82
v2.81a
v2.81
v2.80
v2.80-rc3
v2.80-rc2
v2.80-rc1
v2.79b
v2.79a
v2.79
v2.79-rc2
v2.79-rc1
v2.78c
v2.78b
v2.78a
v2.78
v2.78-rc2
v2.78-rc1
v2.77a
v2.77
v2.77-rc2
v2.77-rc1
v2.76b
v2.76a
v2.76
v2.76-rc3
v2.76-rc2
v2.76-rc1
v2.75a
v2.75
v2.75-rc2
v2.75-rc1
v2.74
v2.74-rc4
v2.74-rc3
v2.74-rc2
v2.74-rc1
v2.73a
v2.73
v2.73-rc1
v2.72b
2.72b
v2.72a
v2.72
v2.72-rc1
v2.71
v2.71-rc2
v2.71-rc1
v2.70a
v2.70
v2.70-rc2
v2.70-rc
v2.69
v2.68a
v2.68
v2.67b
v2.67a
v2.67
v2.66a
v2.66
v2.65a
v2.65
v2.64a
v2.64
v2.63a
v2.63
v2.61
v2.60a
v2.60
v2.59
v2.58a
v2.58
v2.57b
v2.57a
v2.57
v2.56a
v2.56
v2.55
v2.54
v2.53
v2.52
v2.51
v2.50
v2.49b
v2.49a
v2.49
v2.48a
v2.48
v2.47
v2.46
v2.45
v2.44
v2.43
v2.42a
v2.42
v2.41
v2.40
v2.37a
v2.37
v2.36
v2.35a
v2.35
v2.34
v2.33a
v2.33
v2.32
v2.31a
v2.31
v2.30
v2.28c
v2.28a
v2.28
v2.27
v2.26
v2.25
Labels
Clear labels
Issues relating to security: https://wiki.blender.org/wiki/Process/Vulnerability_Reports
Apply labels
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
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
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
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
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
Issues relating to security: https://wiki.blender.org/wiki/Process/Vulnerability_Reports
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 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
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
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
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
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
Milestone
Set milestone
Clear milestone
No items
No Milestone
Projects
Set Project
Clear projects
No project
Assignees
Assign users
Clear assignees
No Assignees
16 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#70445
Reference in New Issue
There is no content yet.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?
System Information
Operating system: Darwin-18.7.0-x86_64-i386-64bit 64 Bits
Graphics card: AMD Radeon Pro 460 OpenGL Engine ATI Technologies Inc. 4.1 ATI-2.11.20
And macbook pro. (Radeon Pro 560)
Blender Version
Broken: version: 2.81 (sub 12), branch: master, commit date: 2019-10-01 19:51, hash:
3b23685c7d
Worked: 2.80rc1
Short description of error
Blender 2.82 has a very slow Eevee viewport performance. Even after turning off smooth shadows or AO or screen-space reflections. Not possible to work anymore.
In my model it seems that the slowest is the material_pass, but almost everything is the slowest.
Blender 2.82:
Blender 2.80:
I also noticed that the GPU usage is much higher with 2.80.

Exact steps for others to reproduce the error
home_2.8.blend
Added subscriber: @MaciejSobolewski
#66467 was marked as duplicate of this issue
#75475 was marked as duplicate of this issue
Added subscribers: @fclem, @mano-wii
We are aware of many issues with MAC OS, but unfortunately we have no developers with this setup to investigate and reproduce the problem.
Changes are constantly being made to improve viewport peformanse, and it is quite possible that this regression will be resolved in the next builds.
@fclem, any idea why this is happening?
Added subscriber: @jinschoi
Added subscriber: @onedev
Can you try macOS Catalina? Blender 2.80.75 seems to work fine on my hardware on Catalina.
Blender 2.81 has still extremely low performance (not able to work) in comparison to the 2.80 where the scene with more than 2 million of polygons and 10 lights move smooth. I tested yesterday also 2.82 and performance is very slow too. Maybe I can recreate these conditions if it can help you somehow to fix that issue?
Added subscriber: @JacquesLucke
Changed status from 'Needs Developer To Reproduce' to: 'Needs User Info'
Please prepare a file that is significantly faster in 2.80 compared to 2.82. Otherwise, someone with the right hardware who wants to check this report has to do a lot of guess work.
Added subscriber: @VictorBonnet
I have the same problem with my macbook pro. (Radeon Pro 560)
According to the debug values, the Eevee Background is about 10x slower in 2.82 compare to 2.80.
In my model it seems that the slowest is the material_pass, but almost everything is the slowest.
Blender 2.82:
Blender 2.80:
I also noticed that the GPU usage is much higher with 2.80.

I can share a blender file if that could help.
Added subscriber: @ideasman42
@VictorBonnet, yes, please post a blend file that can redo this error (keeping it as simple as possible)
It is probably the same problem described in #66231, since it is related to Mac + AMD and fails in the
material_pass
.I am having the the same issue as #66231 . But I can reproduce it in both versions of Blender (2.8 & 2.82).
While in my model the slowness appeared after the update of Blender 2.81. So I suppose it is a different issue.
Here is the blend file having the slowness issue on latest Blender versions.
home_2.8.blend
Changed status from 'Needs User Info' to: 'Needs Triage'
@VictorBonnet, the textures are not packed in the file, will this affect the tests?

Sorry about that.
I just checked and I have the same issue with the missing textures.
I manage to find which commit introduce the slowness on my computer.
It starts to be slow after this commit which was made in Sept 17th. This was between version 2.80 and 2.81.
This commit is pretty big, I am going to investigate a bit more what could cause this slowness in this change.
Very slow Eevee performance. Not possible to work.to Very slow Eevee performance on Mac with AMD RadeonAdded subscriber: @Mambes
Added subscribers: @jerrsoundripper, @2046411367, @william-70, @ZedDB, @WilliamReynish
Changed status from 'Needs Triage' to: 'Confirmed'
Added subscriber: @DanielGrauer
Added subscriber: @JulianEisel
@JulianEisel Could you test if P1388 changes anything?
@fclem I have tested your patch on my computer. it doesn't fix the issue unfortunately.
When I run an animation in the view port:
@VictorBonnet is workbench also slowing down this much?
It's hard to say. With animation it's limited to 24fps, I don't know how I could properly test that?
You can set framerate to 60fps to test. You can try to make the scene heavier to make it so that the base fps is below 60 and it can be measured.
Ok it seems that the workbench is slower also but not this much.
I profiled the application before and after the commit that cause the slowness.
The CPU is at 100% constantly after the commit:

before the commit:

after.trace.zip
@VictorBonnet Thanks! that's very helpful. This means the slowdown comes from a state change that triggers shader recompilation.
Unfortunatelly I have yet to find what triggers this recompilation. #66231 is the same issue but from another state since D7642 does not fix it.
Added subscriber: @robbott
Probably the same bug as #71398 .
@VictorBonnet it would be nice if you could reduce the complexity of the file. Remove objects until the slowdown does not happen anymore.
I removed plenty of objects to keep only the wall and 1 windows frame.
I noticed that if I change the material of the window frame to metallic it's also much faster. I tried your patch with this simplified model, and it actually speeds it up by a lot.
I have found two others objects that cause the slowdown. It seems removing the Texture coordinate and the Mapping in the node material is reducing CPU usage.
I attach the blend file for this use case
ground.blend
Added subscriber: @dfelinto
@VictorBonnet this is still a too big/complex file. From the bug triaging playbook "Normally .blend files can be simplified by removing most objects and disabling settings, until the problem reveals itself more clearly."
Could you please remove EVERY object/material/texture that is not needed to reproduce the issue, remove EVERY modifier that is not needed to reproduce the issue. If possible I would even go as far as removing all the geometry parts that are stopping it from being reproduceable.
I simply copy the two objects into a new blender project and I am able to reproduce. Hopefully it's gonna help.
It really seems to be related to the materials of those objects. If I switch the output of Texture Coordinate node from UV to Generated in one of the two materials, the fps is much better.
test.blend
@VictorBonnet What if you use the same texture in both materials?
Edit: Also are you sure the slowdown here is still caused by shader compilation?
If I use same texture in both materials then it's fine.
Also are you sure the slowdown here is still caused by shader compilation?
What can I do to ensure it?
Well you just run instrument profiler again and see if the bottleneck is still the same driver function calls (mainly
SCCompileShader
).Ok, it seems so.
I attached a screenshot and the trace file.
Instruments.trace.zip
In renderdoc capture it shows that there is almost nothing happening between the 2 drawcalls. I did a capture of the 2.80 release and it is almost the same.
Using the same Texture in both shaders leads to the 2 drawcalls being merged inside the same shading group (for a reason I can't remember). So this just hide the issue.
After a bit of research I came across this https://html.developreference.com/article/22542374/Is+ordering+between+glUniformBlockBinding+and+glBindBufferBase+important%3F
Which seems to say that calling glUniformBlockBinding might be the trigger to the recompilation if it changes. But after double checking all bindings are the same, for both textures and UBOs.
Since the issue comes from D4997 I can suggest P1412 to see if just this extra bind is responsible for the slowdown but I highly doubt.
I think this is because then the 2 materials don't use the same GPUShader and it does not need to be recompiled because the state of each drawcall is cached inside each shader.
I tried [P1412 ](https://developer.blender.org/T70445) but unfortunately it doesn't fix.
I'll try to play with the APIs on my side.
Added subscriber: @MirekDusin
@fclem I noticed that the issue with the Texture Coordinate is only reproducible on tmp-eevee-material-refactorbranch but not onmaster.
Concerning the home_2.8.blendfile, there is still the slowness compared tov2.80. But this file might not be the best one for debugging.
This issue was referenced by
cecda64e2e
Added subscriber: @bblanimation
Can anyone test with latest master and tell me if this is fixed?
I checked on my macbook. The animation is now even faster than in blender
2.80
.~3.7fps
on master~2.6fps
on 2.80The animation runs faster but when I first switch to render mode it's slower.
~1m50s
on master,~30s
on blender 2.80.This might be intended and I guess this is not in the scope of this issue.
Changed status from 'Confirmed' to: 'Resolved'
What do you mean? what are thoses ~1m50s? Render time? Time for shader compilation?
I think that's shader compilation. When I switch from the workbench to eevee.
@VictorBonnet can you check if the compilation slowdown is caused by
cecda64e2e
(checking before and after the commit, since you won't be able to revert it cleanly).@fclem Yes the slowdown is caused by this commit.
@VictorBonnet can you give me a detailled screenshot of instrument profiling this, like you did for the original issue?
I want to know if it is the interface creation itself or if it compiles the shader twice because of using it in another context.
Here it is.
cecda64e2ead.trace.zip
@VictorBonnet I'm sorry I don't have a Mac nor instrument. Could you unfold the view and see where the hotspot is and just past a screenshot here?
Ah sorry about that.
@VictorBonnet and what is inside
GPU_shaderinterface_create
?Removed subscriber: @Mambes
Huh, this seems to be caused by
glGetActiveUniformsiv
. I don't have a quick test to see if that really is the culprit; but, there is another way to exclude the UBO uniforms which is a bit more involved.Preemptively, I just implemented this other solution in
fd061f61c7
. Hopefully it fixes the issue. Else better open a new task for discussing this.@fclem Your commit fixes the slow shader compilation slowdown.
Basically shader compilation and animation is now faster than what it was in Blender
2.80
.To recap this is the numbers I have with this model on my macbook:
fd061f61c7
That's quite impressive how faster things are now on my computer (at least with this blend file).
Thanks @fclem