Commit: d4fd363d05943eaf021ef3bff8756cdf96241c0e Author: Clément Foucault Date: Mon Sep 7 21:09:18 2020 +0200 Branches: master https://developer.blender.org/rBd4fd363d05943eaf021ef3bff8756cdf96241c0e
GPU: Select Pick: Remove last GL call This is part of the Vulkan task T68990 This is just a cleanup. =================================================================== 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 c3ccb68a998..769b52bf593 100644 --- a/source/blender/gpu/intern/gpu_select_pick.c +++ b/source/blender/gpu/intern/gpu_select_pick.c @@ -346,16 +346,9 @@ void gpu_select_pick_begin(uint (*buffer)[4], uint bufsize, const rcti *input, c ps->gl.rect_depth = depth_buf_malloc(rect_len); /* set initial 'far' value */ -#if 0 - glReadPixels(UNPACK4(ps->gl.clip_readpixels), - GL_DEPTH_COMPONENT, - GL_UNSIGNED_INT, - ps->gl.rect_depth->buf); -#else for (uint i = 0; i < rect_len; i++) { ps->gl.rect_depth->buf[i] = DEPTH_MAX; } -#endif ps->gl.is_init = false; ps->gl.prev_id = 0; @@ -486,10 +479,9 @@ bool gpu_select_pick_load_id(uint id, bool end) } const uint rect_len = ps->src.rect_len; - glReadPixels(UNPACK4(ps->gl.clip_readpixels), - GL_DEPTH_COMPONENT, - GL_UNSIGNED_INT, - ps->gl.rect_depth_test->buf); + GPUFrameBuffer *fb = GPU_framebuffer_active_get(); + GPU_framebuffer_read_depth( + fb, UNPACK4(ps->gl.clip_readpixels), GPU_DATA_UNSIGNED_INT, ps->gl.rect_depth_test->buf); /* perform initial check since most cases the array remains unchanged */ bool do_pass = false; _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs