Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/intern/draw_cache_impl_mesh.c
| Show First 20 Lines • Show All 992 Lines • ▼ Show 20 Lines | |||||
| MDEPS_ASSERT_MAP(ibo.fdots); | MDEPS_ASSERT_MAP(ibo.fdots); | ||||
| MDEPS_ASSERT_MAP(ibo.edituv_tris); | MDEPS_ASSERT_MAP(ibo.edituv_tris); | ||||
| MDEPS_ASSERT_MAP(ibo.edituv_lines); | MDEPS_ASSERT_MAP(ibo.edituv_lines); | ||||
| MDEPS_ASSERT_MAP(ibo.edituv_points); | MDEPS_ASSERT_MAP(ibo.edituv_points); | ||||
| MDEPS_ASSERT_MAP(ibo.edituv_fdots); | MDEPS_ASSERT_MAP(ibo.edituv_fdots); | ||||
| MDEPS_ASSERT_MAP_INDEX(TRIS_PER_MAT_INDEX); | MDEPS_ASSERT_MAP_INDEX(TRIS_PER_MAT_INDEX); | ||||
| const bool use_subsurf_fdots = me->runtime.subsurf_face_dot_tags != NULL; | |||||
| if (do_uvcage) { | if (do_uvcage) { | ||||
| mesh_buffer_cache_create_requested(task_graph, | mesh_buffer_cache_create_requested(task_graph, | ||||
| cache, | cache, | ||||
| &cache->uv_cage, | &cache->uv_cage, | ||||
| ob, | ob, | ||||
| me, | me, | ||||
| is_editmode, | is_editmode, | ||||
| is_paint_mode, | is_paint_mode, | ||||
| is_mode_active, | is_mode_active, | ||||
| ob->obmat, | ob->obmat, | ||||
| false, | false, | ||||
| true, | true, | ||||
| false, | |||||
| scene, | scene, | ||||
| ts, | ts, | ||||
| true); | true); | ||||
| } | } | ||||
| if (do_cage) { | if (do_cage) { | ||||
| mesh_buffer_cache_create_requested(task_graph, | mesh_buffer_cache_create_requested(task_graph, | ||||
| cache, | cache, | ||||
| &cache->cage, | &cache->cage, | ||||
| ob, | ob, | ||||
| me, | me, | ||||
| is_editmode, | is_editmode, | ||||
| is_paint_mode, | is_paint_mode, | ||||
| is_mode_active, | is_mode_active, | ||||
| ob->obmat, | ob->obmat, | ||||
| false, | false, | ||||
| false, | false, | ||||
| use_subsurf_fdots, | |||||
| scene, | scene, | ||||
| ts, | ts, | ||||
| true); | true); | ||||
| } | } | ||||
| if (do_subdivision) { | if (do_subdivision) { | ||||
| DRW_create_subdivision(scene, | DRW_create_subdivision(scene, | ||||
| ob, | ob, | ||||
| me, | me, | ||||
| cache, | cache, | ||||
| &cache->final, | &cache->final, | ||||
| is_editmode, | is_editmode, | ||||
| is_paint_mode, | is_paint_mode, | ||||
| is_mode_active, | is_mode_active, | ||||
| ob->obmat, | ob->obmat, | ||||
| true, | true, | ||||
| false, | false, | ||||
| use_subsurf_fdots, | |||||
| ts, | ts, | ||||
| use_hide); | use_hide); | ||||
| } | } | ||||
| else { | else { | ||||
| /* The subsurf modifier may have been recently removed, or another modifier was added after it, | /* The subsurf modifier may have been recently removed, or another modifier was added after it, | ||||
| * so free any potential subdivision cache as it is not needed anymore. */ | * so free any potential subdivision cache as it is not needed anymore. */ | ||||
| mesh_batch_cache_free_subdiv_cache(cache); | mesh_batch_cache_free_subdiv_cache(cache); | ||||
| } | } | ||||
| mesh_buffer_cache_create_requested(task_graph, | mesh_buffer_cache_create_requested(task_graph, | ||||
| cache, | cache, | ||||
| &cache->final, | &cache->final, | ||||
| ob, | ob, | ||||
| me, | me, | ||||
| is_editmode, | is_editmode, | ||||
| is_paint_mode, | is_paint_mode, | ||||
| is_mode_active, | is_mode_active, | ||||
| ob->obmat, | ob->obmat, | ||||
| true, | true, | ||||
| false, | false, | ||||
| use_subsurf_fdots, | |||||
| scene, | scene, | ||||
| ts, | ts, | ||||
| use_hide); | use_hide); | ||||
| /* Ensure that all requested batches have finished. | /* Ensure that all requested batches have finished. | ||||
| * Ideally we want to remove this sync, but there are cases where this doesn't work. | * Ideally we want to remove this sync, but there are cases where this doesn't work. | ||||
| * See T79038 for example. | * See T79038 for example. | ||||
| * | * | ||||
| Show All 10 Lines | |||||