From 77586933c87bcc5439b9aba8fc2b0d5627e263a6 Mon Sep 17 00:00:00 2001 From: sam gateau Date: Tue, 11 Sep 2018 11:43:14 -0700 Subject: [PATCH] Merge and fix the default _value of GLquery so it is 0, not broken --- libraries/gpu-gl-common/src/gpu/gl/GLBackendQuery.cpp | 2 +- libraries/gpu-gl-common/src/gpu/gl/GLQuery.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/gpu-gl-common/src/gpu/gl/GLBackendQuery.cpp b/libraries/gpu-gl-common/src/gpu/gl/GLBackendQuery.cpp index b54a12805b..8aa0f3c699 100644 --- a/libraries/gpu-gl-common/src/gpu/gl/GLBackendQuery.cpp +++ b/libraries/gpu-gl-common/src/gpu/gl/GLBackendQuery.cpp @@ -94,7 +94,7 @@ void GLBackend::do_getQuery(const Batch& batch, size_t paramOffset) { } #else // gles3 is not supporting true time query returns just the batch elapsed time - query->triggerReturnHandler(glquery->_result, glquery->_batchElapsedTime); + query->triggerReturnHandler(0, glquery->_batchElapsedTime); #endif (void)CHECK_GL_ERROR(); } diff --git a/libraries/gpu-gl-common/src/gpu/gl/GLQuery.h b/libraries/gpu-gl-common/src/gpu/gl/GLQuery.h index 18d79d5896..11a4ef0c0a 100644 --- a/libraries/gpu-gl-common/src/gpu/gl/GLQuery.h +++ b/libraries/gpu-gl-common/src/gpu/gl/GLQuery.h @@ -47,7 +47,7 @@ public: const GLuint& _endqo = { _id }; const GLuint _beginqo = { 0 }; - GLuint64 _result { (GLuint64)-1 }; + GLuint64 _result { (GLuint64)0 }; GLuint64 _batchElapsedTime{ (GLuint64)0 }; std::chrono::high_resolution_clock::time_point _batchElapsedTimeBegin; uint64_t _profileRangeId { 0 };