summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2023-09-11 13:39:47 +0800
committerErik Kundiman <erik@megapahit.org>2023-09-11 13:39:47 +0800
commit4a97679e2cbee997b5bcf85e8e2c094e2c7bb936 (patch)
tree834fbdcd7c2b4dca7fd28da762f6970adb0afd87 /indra/newview
parent5dd6cf2db9c6aaaf7337161db85a8920b1b7d835 (diff)
Use non 64 versions when no ARB timer query
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llvoavatar.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 10a257fbb5..c7203a19d7 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -11491,13 +11491,23 @@ void LLVOAvatar::readProfileQuery(S32 retries)
mGPUProfilePending = true;
}
+#if GL_ARB_timer_query
GLuint64 result = 0;
glGetQueryObjectui64v(mGPUTimerQuery, GL_QUERY_RESULT_AVAILABLE, &result);
+#else
+ GLuint result = 0;
+ glGetQueryObjectuiv(mGPUTimerQuery, GL_QUERY_RESULT_AVAILABLE, &result);
+#endif
if (result == GL_TRUE || --retries <= 0)
{ // query available, readback result
+#if GL_ARB_timer_query
GLuint64 time_elapsed = 0;
glGetQueryObjectui64v(mGPUTimerQuery, GL_QUERY_RESULT, &time_elapsed);
+#else
+ GLuint time_elapsed = 0;
+ glGetQueryObjectuiv(mGPUTimerQuery, GL_QUERY_RESULT, &time_elapsed);
+#endif
mGPURenderTime = time_elapsed / 1000000.f;
mGPUProfilePending = false;