Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2020-09-07 22:09:18 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-09-08 01:02:04 +0300
commitd4fd363d05943eaf021ef3bff8756cdf96241c0e (patch)
tree84a2650fe736310bb2be370d1c4e06f2047e6605 /source
parentb7a28b315a0ba85f9796845718e578abf5379f7d (diff)
GPU: Select Pick: Remove last GL call
This is part of the Vulkan task T68990 This is just a cleanup.
Diffstat (limited to 'source')
-rw-r--r--source/blender/gpu/intern/gpu_select_pick.c14
1 files changed, 3 insertions, 11 deletions
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;