Commit: e247261b98513362429a45b6d8604e20376e0a40
Author: Campbell Barton
Date:   Wed Mar 8 02:34:40 2017 +1100
Branches: temp-select-pick
https://developer.blender.org/rBe247261b98513362429a45b6d8604e20376e0a40

Use cache

===================================================================

M       source/blender/gpu/intern/gpu_select_pick.c

===================================================================

diff --git a/source/blender/gpu/intern/gpu_select_pick.c 
b/source/blender/gpu/intern/gpu_select_pick.c
index 706197193d..0282c745af 100644
--- a/source/blender/gpu/intern/gpu_select_pick.c
+++ b/source/blender/gpu/intern/gpu_select_pick.c
@@ -459,8 +459,7 @@ unsigned int gpu_select_pick_end(void)
                        }
                        else {
                                /* same as above but different rect sizes */
-                               unsigned int i_src = 0;
-                               unsigned int i_dst = 0;
+                               unsigned int i_src = 0, i_dst = 0;
                                i_src += ps->cache.sub_rect.start;
                                for (unsigned int j = 0; j < 
ps->cache.sub_rect.len; j++) {
                                        const unsigned int i_src_final = i_src 
+ ps->cache.sub_rect.span;
@@ -564,8 +563,12 @@ bool gpu_select_pick_is_cached(void)
        return g_pick_state.is_cached;
 }
 
-
 void gpu_select_pick_cache_load_id(void)
 {
-
+       GPUPickState *ps = &g_pick_state;
+       for (DepthBufCache *rect_depth = ps->cache.bufs.first; rect_depth; 
rect_depth = rect_depth->next) {
+               if (rect_depth->next != NULL) {
+                       gpu_select_load_id_pass(rect_depth, rect_depth->next);
+               }
+       }
 }

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to