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
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2019-04-27 21:37:11 +0300
committerClément Foucault <foucault.clem@gmail.com>2019-04-27 21:37:29 +0300
commitd2f1705b15be406d5565e510ae82f07d27345af1 (patch)
tree557b20d3ce7f043abd3f770a7d7e312e3bc3cdf9 /source/blender/gpu/intern/gpu_select_pick.c
parent6cb90d180f405e010f4588ec3cfe031f8dbac6cf (diff)
Fix T63936 GPUSelect: Read depth in the end
fix T63936 introduced in 86914e713347. Reviewers: fclem Reviewed By: fclem Tags: #bf_blender Maniphest Tasks: T63936 Differential Revision: https://developer.blender.org/D4750
Diffstat (limited to 'source/blender/gpu/intern/gpu_select_pick.c')
-rw-r--r--source/blender/gpu/intern/gpu_select_pick.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/gpu/intern/gpu_select_pick.c b/source/blender/gpu/intern/gpu_select_pick.c
index ffd4cd6efbc..1880a0cfbdf 100644
--- a/source/blender/gpu/intern/gpu_select_pick.c
+++ b/source/blender/gpu/intern/gpu_select_pick.c
@@ -476,12 +476,12 @@ static void gpu_select_load_id_pass_nearest(const DepthBufCache *rect_prev,
}
}
-bool gpu_select_pick_load_id(uint id)
+bool gpu_select_pick_load_id(uint id, bool end)
{
GPUPickState *ps = &g_pick_state;
if (ps->gl.is_init) {
- if (id == ps->gl.prev_id) {
+ if (id == ps->gl.prev_id && !end) {
/* No need to read if we are still drawing for the same id since
* all these depths will be merged / deduplicated in the end. */
return true;
@@ -543,7 +543,7 @@ uint gpu_select_pick_end(void)
if (ps->is_cached == false) {
if (ps->gl.is_init) {
/* force finishing last pass */
- gpu_select_pick_load_id(ps->gl.prev_id);
+ gpu_select_pick_load_id(ps->gl.prev_id, true);
}
gpuPopAttr();
glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);