Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Stockner <lukas.stockner@freenet.de>2022-05-04 21:05:59 +0300
committerBrecht Van Lommel <brecht@blender.org>2022-05-04 21:07:19 +0300
commit0fa1c65ee30d5a9e742ab313de440d44424e427e (patch)
treea8364ab554ad6b8cf9225b77b84d13ceca00ca0e
parent54f447ecde72ab97c058d3b81f616751ef1677e1 (diff)
Fix T95644: Cycles doesn't update modified object attributes on GPU
evice_update_preprocess is supposed to detect modified attributes and flag the device_vector for a copy through device_update_flags. However, since object attributes are only created in device_update_attributes afterwards, they can't be included in that check. Change the function that actually updates the device_vector to tag it as modified as soon as its content gets updated. Differential Revision: https://developer.blender.org/D14815
-rw-r--r--intern/cycles/scene/geometry.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/intern/cycles/scene/geometry.cpp b/intern/cycles/scene/geometry.cpp
index 349d8ad39c7..9152abacbdb 100644
--- a/intern/cycles/scene/geometry.cpp
+++ b/intern/cycles/scene/geometry.cpp
@@ -618,6 +618,7 @@ void GeometryManager::update_attribute_element_offset(Geometry *geom,
for (size_t k = 0; k < size; k++) {
attr_uchar4[offset + k] = data[k];
}
+ attr_uchar4.tag_modified();
}
attr_uchar4_offset += size;
}
@@ -630,6 +631,7 @@ void GeometryManager::update_attribute_element_offset(Geometry *geom,
for (size_t k = 0; k < size; k++) {
attr_float[offset + k] = data[k];
}
+ attr_float.tag_modified();
}
attr_float_offset += size;
}
@@ -642,6 +644,7 @@ void GeometryManager::update_attribute_element_offset(Geometry *geom,
for (size_t k = 0; k < size; k++) {
attr_float2[offset + k] = data[k];
}
+ attr_float2.tag_modified();
}
attr_float2_offset += size;
}
@@ -654,6 +657,7 @@ void GeometryManager::update_attribute_element_offset(Geometry *geom,
for (size_t k = 0; k < size * 3; k++) {
attr_float4[offset + k] = (&tfm->x)[k];
}
+ attr_float4.tag_modified();
}
attr_float4_offset += size * 3;
}
@@ -666,6 +670,7 @@ void GeometryManager::update_attribute_element_offset(Geometry *geom,
for (size_t k = 0; k < size; k++) {
attr_float4[offset + k] = data[k];
}
+ attr_float4.tag_modified();
}
attr_float4_offset += size;
}
@@ -678,6 +683,7 @@ void GeometryManager::update_attribute_element_offset(Geometry *geom,
for (size_t k = 0; k < size; k++) {
attr_float3[offset + k] = data[k];
}
+ attr_float3.tag_modified();
}
attr_float3_offset += size;
}