diff options
author | Patrick Mours <pmours@nvidia.com> | 2022-09-09 12:55:35 +0300 |
---|---|---|
committer | Patrick Mours <pmours@nvidia.com> | 2022-09-09 16:35:44 +0300 |
commit | ef7c9e793ec5331ac694eec9336565bd2254c406 (patch) | |
tree | ca30908bae0bac8c58d18b964af7dc388f9de463 /intern/cycles/scene/osl.h | |
parent | 291c313f80b4cccc8fcce3035584caeaa654844f (diff) |
Cycles: Remove separate OSL attribute map and instead always use SVM attribute map
The SVM attribute map is always generated and uses a simple
linear search to lookup by an opaque ID, so can reuse that for OSL
as well and simply use the attribute name hash as ID instead of
generating a unique value separately. This works for both object
and geometry attributes since the SVM attribute map already
stores both. Simplifies code somewhat and reduces memory
usage slightly.
This patch was split from D15902.
Differential Revision: https://developer.blender.org/D15918
Diffstat (limited to 'intern/cycles/scene/osl.h')
-rw-r--r-- | intern/cycles/scene/osl.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/intern/cycles/scene/osl.h b/intern/cycles/scene/osl.h index bf27069b1b1..76c6bd96ce1 100644 --- a/intern/cycles/scene/osl.h +++ b/intern/cycles/scene/osl.h @@ -66,6 +66,9 @@ class OSLShaderManager : public ShaderManager { return true; } + uint64_t get_attribute_id(ustring name) override; + uint64_t get_attribute_id(AttributeStandard std) override; + void device_update_specific(Device *device, DeviceScene *dscene, Scene *scene, |