[Bf-blender-cvs] [ac8c795429f] master: GPU: added debug value to investigate lagging issue in T6147

Brecht Van Lommel noreply at git.blender.org
Tue Jul 9 01:37:54 CEST 2019


Commit: ac8c795429f9552c9bb626d0adee46786d3c810a
Author: Brecht Van Lommel
Date:   Tue Jul 9 01:20:44 2019 +0200
Branches: master
https://developer.blender.org/rBac8c795429f9552c9bb626d0adee46786d3c810a

GPU: added debug value to investigate lagging issue in T6147

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

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

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

diff --git a/source/blender/gpu/intern/gpu_select_sample_query.c b/source/blender/gpu/intern/gpu_select_sample_query.c
index 56f9ef69221..9dc225b4190 100644
--- a/source/blender/gpu/intern/gpu_select_sample_query.c
+++ b/source/blender/gpu/intern/gpu_select_sample_query.c
@@ -40,6 +40,8 @@
 
 #include "PIL_time.h"
 
+#include "BKE_global.h"
+
 #include "gpu_select_private.h"
 
 /* Ad hoc number of queries to allocate to skip doing many glGenQueries */
@@ -177,9 +179,11 @@ uint gpu_select_query_end(void)
     while (result == 0) {
       glGetQueryObjectuiv(g_query_state.queries[i], GL_QUERY_RESULT_AVAILABLE, &result);
       if (result == 0) {
-        /* (fclem) Not sure if this is better than calling
-         * glGetQueryObjectuiv() indefinitely. */
-        PIL_sleep_ms(1);
+        /* (fclem) Not sure if this is better than calling glGetQueryObjectuiv() indefinitely.
+         * (brecht) Added debug test for lagging issue in T61474. */
+        if (G.debug_value != 474) {
+          PIL_sleep_ms(1);
+        }
       }
     }
     glGetQueryObjectuiv(g_query_state.queries[i], GL_QUERY_RESULT, &result);



More information about the Bf-blender-cvs mailing list