diff options
author | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2021-02-09 16:49:33 +0300 |
---|---|---|
committer | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2021-02-09 16:50:00 +0300 |
commit | 5213b18eb2d57153e0e394190af1624401fed74b (patch) | |
tree | 7cb1c20090849be8598741c045b84b0e4088a59d /intern/cycles/render/geometry.cpp | |
parent | 5321e844d3fa8a3421df1c9d7aedc52e22ca5264 (diff) |
Cycles: fix wrong flags used to tag device data as dirty
Also fixes missing modified tag for float2 and float3 attributes arrays.
Diffstat (limited to 'intern/cycles/render/geometry.cpp')
-rw-r--r-- | intern/cycles/render/geometry.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/intern/cycles/render/geometry.cpp b/intern/cycles/render/geometry.cpp index 9ea56b30ffa..f79b1689c14 100644 --- a/intern/cycles/render/geometry.cpp +++ b/intern/cycles/render/geometry.cpp @@ -1388,8 +1388,8 @@ enum { ATTRS_NEED_REALLOC = (ATTR_FLOAT_NEEDS_REALLOC | ATTR_FLOAT2_NEEDS_REALLOC | ATTR_FLOAT3_NEEDS_REALLOC | ATTR_UCHAR4_NEEDS_REALLOC), - DEVICE_MESH_DATA_NEEDS_REALLOC = (CURVE_DATA_NEED_REALLOC | ATTRS_NEED_REALLOC), - DEVICE_CURVE_DATA_NEEDS_REALLOC = (MESH_DATA_NEED_REALLOC | ATTRS_NEED_REALLOC), + DEVICE_MESH_DATA_NEEDS_REALLOC = (MESH_DATA_NEED_REALLOC | ATTRS_NEED_REALLOC), + DEVICE_CURVE_DATA_NEEDS_REALLOC = (CURVE_DATA_NEED_REALLOC | ATTRS_NEED_REALLOC), }; static void update_device_flags_attribute(uint32_t &device_update_flags, @@ -1591,16 +1591,16 @@ void GeometryManager::device_update_preprocess(Device *device, Scene *scene, Pro dscene->attributes_map.tag_realloc(); dscene->attributes_float2.tag_realloc(); } - else if (device_update_flags & ATTR_FLOAT_MODIFIED) { - dscene->attributes_float.tag_modified(); + else if (device_update_flags & ATTR_FLOAT2_MODIFIED) { + dscene->attributes_float2.tag_modified(); } if (device_update_flags & ATTR_FLOAT3_NEEDS_REALLOC) { dscene->attributes_map.tag_realloc(); dscene->attributes_float3.tag_realloc(); } - else if (device_update_flags & ATTR_FLOAT_MODIFIED) { - dscene->attributes_float.tag_modified(); + else if (device_update_flags & ATTR_FLOAT3_MODIFIED) { + dscene->attributes_float3.tag_modified(); } if (device_update_flags & ATTR_UCHAR4_NEEDS_REALLOC) { |