Blender Git Commit Log

Git Commits -> Revision a127025

Revision a127025 by Brecht Van Lommel (cycles-x)
September 14, 2021, 13:13 (GMT)
Fix deadlock due to lock order inversion in rendering after GPU display changes

Main thread:
* Acquires DST.gl_context_mutex lock for drawing image editor
* Acquires mutex_ in GPUDisplay::draw()

Render thread:
* Acquires mutex_ in GPUDisplay::update_begin()
* Acquires DST.gl_context_mutex for updating texture

Ideally DST.gl_context_mutex would not be needed at all, for best performance.
But this requires deep changes to the draw manager since it relies on global
variables in many places.

Instead rely on DST.gl_context_mutex for mutual exclusion between update and
draw operations in the subclass, and only use mutex_ for thread safe access to
the parameters.

Differential Revision: https://developer.blender.org/D12468

Commit Details:

Full Hash: a127025f1d876ac8a6352607e9b560b275554f07
Parent Commit: 9da9944
Lines Changed: +70, -37

4 Modified Paths:

/intern/cycles/blender/blender_gpu_display.cpp (+27, -15) (Diff)
/intern/cycles/blender/blender_gpu_display.h (+5, -3) (Diff)
/intern/cycles/render/gpu_display.cpp (+26, -10) (Diff)
/intern/cycles/render/gpu_display.h (+12, -9) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021