Revert "Fix T68826 Eevee: Multi-Mat not working if switching from Solid shading"
This reverts commit d357e7b065
. This caused crashes in UV editor drawing and
updates in lookdev mode.
Fixes T69087, T69083, T69088, T69096.
This commit is contained in:
parent
777ca2dcdb
commit
f16a28c4af
Notes:
blender-bot
2023-02-14 08:42:54 +01:00
Referenced by issue #69096, Crash in drawcode in a BI character file. Referenced by issue #69083, Blender crashes when switching from solid view to rendered or lookdev mode in eevee. Referenced by issue #69087, Error when using vertex color Referenced by issue #69088, Assert entering editmode with a UVEditor open Referenced by issue #68826, eevee not showing multi material object properly when blend is loaded until mesh is updated
|
@ -1088,25 +1088,6 @@ void DRW_mesh_batch_cache_create_requested(
|
|||
}
|
||||
}
|
||||
|
||||
/* HACK: if MBC_SURF_PER_MAT is requested and ibo.tris is already available, it won't have it's
|
||||
* index ranges initialized. So discard ibo.tris in order to recreate it. */
|
||||
if ((batch_requested & MBC_SURF_PER_MAT) != 0 && (cache->batch_ready & MBC_SURF_PER_MAT) == 0) {
|
||||
FOREACH_MESH_BUFFER_CACHE(cache, mbuffercache)
|
||||
{
|
||||
GPU_INDEXBUF_DISCARD_SAFE(mbuffercache->ibo.tris);
|
||||
}
|
||||
/* Clear all batches that reference ibo.tris. */
|
||||
GPU_BATCH_CLEAR_SAFE(cache->batch.surface);
|
||||
GPU_BATCH_CLEAR_SAFE(cache->batch.surface_weights);
|
||||
GPU_BATCH_CLEAR_SAFE(cache->batch.edit_mesh_analysis);
|
||||
GPU_BATCH_CLEAR_SAFE(cache->batch.edit_triangles);
|
||||
GPU_BATCH_CLEAR_SAFE(cache->batch.edit_lnor);
|
||||
GPU_BATCH_CLEAR_SAFE(cache->batch.edit_selection_faces);
|
||||
|
||||
cache->batch_ready &= ~(MBC_SURFACE | MBC_SURFACE_WEIGHTS | MBC_EDIT_MESH_ANALYSIS |
|
||||
MBC_EDIT_TRIANGLES | MBC_EDIT_LNOR | MBC_EDIT_SELECTION_FACES);
|
||||
}
|
||||
|
||||
/* Second chance to early out */
|
||||
if ((batch_requested & ~cache->batch_ready) == 0) {
|
||||
#ifdef DEBUG
|
||||
|
|
Loading…
Reference in New Issue