blender/intern/cycles/session
Sergey Sharybin 0d73d5c1a2 Fix frozen image editor when Cycles compiles kernels
It is possible that the image editor redraw happens prior to the
"Loading render kernels" status is reported from status but after
the display driver is created. This will make the image editor to
wait on the scene mutex to update the display pass in the film.
If it happens to be that the kernels are actually to be compiled
then the Blender interface appears to be completely frozen, without
any information line in the image editor.

This change makes it so the amount of time the scene mutex is held
during the kernel compilation is minimal.

It is a bit unideal to unlock and re-lock the scene mutex in the
middle of update, while nested reset mutex is held, but this is
already what is needed for the OptiX denoiser optimization some
lines below. We can probably reduce the lifetime of some locks,
avoiding such potential out-of-order re-locking. Doing so is
outside of the scope of this patch.

The scene update only happens from the single place in the session,
which makes it easy to ensure the kernels are loaded prior the rest
of the scene update.

Not only this change makes it so that the "Loading render kernels"
status appears in the image editor, but also allows to pan and zoom
in the image editor, potentially allowing artists to re-adjust their
point of interest.

Differential Revision: https://developer.blender.org/D16581
2022-11-23 10:23:05 +01:00
..
buffers.cpp Fix T98367: Light group passes do not work when shadow catcher is used 2022-07-24 20:36:46 +02:00
buffers.h Cycles: Add support for light groups 2022-04-02 06:14:27 +02:00
CMakeLists.txt Cleanup OpenGL linking and related code after libepoxy merge 2022-08-15 16:47:20 +02:00
denoising.cpp Cleanup: spelling in comments, additional white space 2022-06-07 15:01:03 +10:00
denoising.h Cycles: use SPDX license headers 2022-02-11 17:47:34 +01:00
display_driver.h Cycles: use SPDX license headers 2022-02-11 17:47:34 +01:00
merge.cpp Cycles: Fix a few type casting warnings 2022-04-05 18:09:21 +02:00
merge.h Cleanup: spelling in comments 2022-11-10 11:34:10 +11:00
output_driver.h Cycles: use SPDX license headers 2022-02-11 17:47:34 +01:00
session.cpp Fix frozen image editor when Cycles compiles kernels 2022-11-23 10:23:05 +01:00
session.h Cycles: Add Hydra render delegate 2022-03-23 16:39:05 +01:00
tile.cpp Fix T101354: Cycles crash with baking and adaptive sampling 2022-09-26 22:16:01 +02:00
tile.h Cycles: use SPDX license headers 2022-02-11 17:47:34 +01:00