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).
This commit is contained in:
Kévin Dietrich 2021-01-25 07:37:41 +01:00
parent b90ccaa067
commit 7a0281914e
Notes: blender-bot 2023-02-14 02:30:10 +01:00
Referenced by issue #85010, Cycles viewport not showing certain material changes when using GPU compute (2.93)
1 changed files with 4 additions and 3 deletions

View File

@ -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) {