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:
authorKévin Dietrich <kevin.dietrich@mailoo.org>2021-01-25 09:37:41 +0300
committerKévin Dietrich <kevin.dietrich@mailoo.org>2021-01-25 09:40:49 +0300
commit7a0281914ec94e6a495cc354844e91d88b8b18ae (patch)
tree9a7245f6d1cdd40c02a87c6587b5040cb7c7c781 /intern/cycles/render/geometry.cpp
parentb90ccaa0672e353d7ed929d0062684c0e60ae090 (diff)
Fix T85010: Cycles viewport not showing certain material changes when using GPU compute
Modifications to triangle shader association were not considered when checking for updates and the associated device data array was not tagged as modified so it was not resent to the device(s).
Diffstat (limited to 'intern/cycles/render/geometry.cpp')
-rw-r--r--intern/cycles/render/geometry.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/intern/cycles/render/geometry.cpp b/intern/cycles/render/geometry.cpp
index beee0b797ee..b6fe8a66b87 100644
--- a/intern/cycles/render/geometry.cpp
+++ b/intern/cycles/render/geometry.cpp
@@ -1532,7 +1532,7 @@ void GeometryManager::device_update_preprocess(Device *device, Scene *scene, Pro
if (mesh->need_update_rebuild) {
device_update_flags |= DEVICE_MESH_DATA_NEEDS_REALLOC;
}
- else if (mesh->verts_is_modified()) {
+ else if (mesh->is_modified()) {
device_update_flags |= DEVICE_MESH_DATA_MODIFIED;
}
}
@@ -1612,9 +1612,10 @@ void GeometryManager::device_update_preprocess(Device *device, Scene *scene, Pro
}
if (device_update_flags & DEVICE_MESH_DATA_MODIFIED) {
- /* if anything else than vertices are modified, we would need to reallocate, so this is the
- * only array that can be updated */
+ /* if anything else than vertices or shaders are modified, we would need to reallocate, so
+ * these are the only arrays that can be updated */
dscene->tri_vnormal.tag_modified();
+ dscene->tri_shader.tag_modified();
}
if (device_update_flags & DEVICE_CURVE_DATA_MODIFIED) {