Blender Git Loki

Git Commits -> Revision f9bc8c8

Revision f9bc8c8 by Kvin Dietrich (cycles_texture_cache)
May 6, 2021, 09:25 (GMT)
Cycles: use reference count to detect used shaders

Shaders are only compiled if they are used by some other Node (Geometry, Light, etc.).
This usage detection is done before updating the Scene, however it fails at detecting
Shaders used by Procedurals not known to Cycles (e.g. ones defined by third party
applications), as Procedurals are only updated after the shaders are compiled.

To remedy this, we now use the Node reference counting mechanism to detect whether a
Shader is used and therefore should be compiled.

This removes `ShaderManager::update_shaders_used` as it is not needed anymore, however,
since it would also update the Shader ids, this is now performed in
`ShaderManager::device_update`, and a new virtual `device_update_specific` method was
added to handle device updates for SVM and OSL.

Reviewed By: brecht

Differential Revision:

Commit Details:

Full Hash: f9bc8c8ac522c67b715c9638b3715a4c6d8e2ae6
Parent Commit: 2577e31
Committed By: Stefan Werner
Lines Changed: +53, -65

Tehnyt: Miika HämäläinenViimeksi p?ivitetty: 07.11.2014 14:18 MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021