DRW: Make shaded batch validation more correct
This is in order to support garbage collection of unused Custom data layer uploaded to the GPU. Actual Garbage Collection is not added by this commit.
This commit is contained in:
@@ -914,17 +914,6 @@ static void rna_3DViewShading_type_update(Main *bmain, Scene *scene, PointerRNA
|
||||
return;
|
||||
}
|
||||
|
||||
for (Material *ma = bmain->materials.first; ma; ma = ma->id.next) {
|
||||
/* XXX Dependency graph does not support CD mask tracking,
|
||||
* so we trigger materials shading for until it's properly supported.
|
||||
* This is to ensure material batches are all recreated when switching
|
||||
* shading type. In the future DEG should replace this and just tag
|
||||
* the meshes itself.
|
||||
* This hack just tag BKE_MESH_BATCH_DIRTY_SHADING for every mesh that
|
||||
* have a material. (see T55059) */
|
||||
DEG_id_tag_update(&ma->id, ID_RECALC_SHADING);
|
||||
}
|
||||
|
||||
View3DShading *shading = ptr->data;
|
||||
if (shading->type == OB_MATERIAL ||
|
||||
(shading->type == OB_RENDER &&
|
||||
|
||||
Reference in New Issue
Block a user