Blender Git Loki

Git Commits -> Revision cad409f

Revision cad409f by Sergey Sharybin (cycles-x)
March 12, 2021, 14:29 (GMT)
Cycles: Fix parameters modification blocking UI

If any Cycles property which triggers re-synchronization is modified
during viewport rendering the interface could have been blocked until
the current sample is finished.

This was caused by the following factors:

- run_cpu acquires a buffer lock for rendering
- set_denoising also acquires lock, avoiding denoising to be triggered
while settings are modified.

This was not noticeable during run_cpu() rendering with old integrator
because the render buffer was not locked during entire duration of
sample rendering (despite the claim in the comment in the code). So what
was happening instead is that the render buffer was only locked during
scheduling on the path tracing tasks. Waiting for the tasks to be
complete was done outside of the buffers lock.

This was avoiding interface lock, but could have caused other threading
issues (those issues are outside of the scope of this change).

On the run_gpu() rendering it was possible to have interface locked for
no reason if sample takes noticeable amount of time.

This change makes it so there is no render buffer locked acquired
during synchronization unless denoiser settings did actually change.
This is still sub-optimal, but makes interaction more pleasant.

Commit Details:

Full Hash: cad409f82f25e49397f3d6aa87bd8e7a9d5bb4e1
Parent Commit: bc148c6
Lines Changed: +18, -0

2 Modified Paths:

/intern/cycles/device/device_task.h (+9, -0) (Diff)
/intern/cycles/render/session.cpp (+9, -0) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021