Changeset View
Changeset View
Standalone View
Standalone View
source/blender/gpu/intern/gpu_select_pick.c
| Show First 20 Lines • Show All 725 Lines • ▼ Show 20 Lines | |||||
| void gpu_select_pick_cache_load_id(void) | void gpu_select_pick_cache_load_id(void) | ||||
| { | { | ||||
| BLI_assert(g_pick_state.is_cached == true); | BLI_assert(g_pick_state.is_cached == true); | ||||
| GPUPickState *ps = &g_pick_state; | GPUPickState *ps = &g_pick_state; | ||||
| #ifdef DEBUG_PRINT | #ifdef DEBUG_PRINT | ||||
| printf("%s (building depth from cache)\n", __func__); | printf("%s (building depth from cache)\n", __func__); | ||||
| #endif | #endif | ||||
| for (DepthBufCache *rect_depth = ps->cache.bufs.first; rect_depth; | LISTBASE_FOREACH (DepthBufCache *, rect_depth, &ps->cache.bufs) { | ||||
| rect_depth = rect_depth->next) { | |||||
| if (rect_depth->next != NULL) { | if (rect_depth->next != NULL) { | ||||
| /* we know the buffers differ, but this sub-region may not. | /* we know the buffers differ, but this sub-region may not. | ||||
| * double check before adding an id-pass */ | * double check before adding an id-pass */ | ||||
| if (g_pick_state.mode == GPU_SELECT_PICK_ALL) { | if (g_pick_state.mode == GPU_SELECT_PICK_ALL) { | ||||
| if (depth_buf_subrect_depth_any(rect_depth->next, &ps->cache.sub_rect)) { | if (depth_buf_subrect_depth_any(rect_depth->next, &ps->cache.sub_rect)) { | ||||
| gpu_select_load_id_pass_all(rect_depth->next); | gpu_select_load_id_pass_all(rect_depth->next); | ||||
| } | } | ||||
| } | } | ||||
| Show All 9 Lines | |||||