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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2019-07-09 02:20:44 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-07-09 02:33:20 +0300
commitac8c795429f9552c9bb626d0adee46786d3c810a (patch)
treeeb6a3fb95134a62430672caf7ac62daa8ebbc882 /source
parenta42cae160082afaf5507fa558fbaf5d1d5987f17 (diff)
GPU: added debug value to investigate lagging issue in T6147
Diffstat (limited to 'source')
-rw-r--r--source/blender/gpu/intern/gpu_select_sample_query.c10
1 files changed, 7 insertions, 3 deletions
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);