Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/intern/draw_cache_impl_mesh.c
| Show First 20 Lines • Show All 1,513 Lines • ▼ Show 20 Lines | mesh_buffer_cache_create_requested(task_graph, | ||||
| ob->obmat, | ob->obmat, | ||||
| true, | true, | ||||
| false, | false, | ||||
| use_subsurf_fdots, | use_subsurf_fdots, | ||||
| &cache->cd_used, | &cache->cd_used, | ||||
| scene, | scene, | ||||
| ts, | ts, | ||||
| use_hide); | use_hide); | ||||
| BLI_task_graph_work_and_wait(task_graph); | |||||
| #ifdef DEBUG | #ifdef DEBUG | ||||
| check: | check: | ||||
| /* Make sure all requested batches have been setup. */ | /* Make sure all requested batches have been setup. */ | ||||
| /* TODO(jbakker): we should move this to the draw_manager but that needs refactoring and | /* TODO(jbakker): we should move this to the draw_manager but that needs refactoring and | ||||
| * additional looping.*/ | * additional looping.*/ | ||||
| BLI_task_graph_work_and_wait(task_graph); | |||||
| for (int i = 0; i < sizeof(cache->batch) / sizeof(void *); i++) { | for (int i = 0; i < sizeof(cache->batch) / sizeof(void *); i++) { | ||||
| BLI_assert(!DRW_batch_requested(((GPUBatch **)&cache->batch)[i], 0)); | BLI_assert(!DRW_batch_requested(((GPUBatch **)&cache->batch)[i], 0)); | ||||
| } | } | ||||
| for (int i = 0; i < sizeof(cache->final.vbo) / sizeof(void *); i++) { | for (int i = 0; i < sizeof(cache->final.vbo) / sizeof(void *); i++) { | ||||
| BLI_assert(!DRW_vbo_requested(((GPUVertBuf **)&cache->final.vbo)[i])); | BLI_assert(!DRW_vbo_requested(((GPUVertBuf **)&cache->final.vbo)[i])); | ||||
| } | } | ||||
| for (int i = 0; i < sizeof(cache->final.ibo) / sizeof(void *); i++) { | for (int i = 0; i < sizeof(cache->final.ibo) / sizeof(void *); i++) { | ||||
| BLI_assert(!DRW_ibo_requested(((GPUIndexBuf **)&cache->final.ibo)[i])); | BLI_assert(!DRW_ibo_requested(((GPUIndexBuf **)&cache->final.ibo)[i])); | ||||
| Show All 17 Lines | |||||