summaryrefslogtreecommitdiff
path: root/indra/newview/llvoavatar.cpp
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2023-09-11 13:45:57 +0800
committerErik Kundiman <erik@megapahit.org>2023-09-11 13:45:57 +0800
commit6109cd400049f95d800cb2d847db9d6659e48011 (patch)
tree390f2121ae2a9fbc71a2ca48f0b94ecbecfc363a /indra/newview/llvoavatar.cpp
parent4a97679e2cbee997b5bcf85e8e2c094e2c7bb936 (diff)
Use the more portable GL_TIME_ELAPSED_EXT
and only when it's available.
Diffstat (limited to 'indra/newview/llvoavatar.cpp')
-rw-r--r--indra/newview/llvoavatar.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index c7203a19d7..1c2ecfe693 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -11480,14 +11480,18 @@ void LLVOAvatar::placeProfileQuery()
glGenQueries(1, &mGPUTimerQuery);
}
- glBeginQuery(GL_TIME_ELAPSED, mGPUTimerQuery);
+#if GL_EXT_timer_query || GL_EXT_disjoint_timer_query
+ glBeginQuery(GL_TIME_ELAPSED_EXT, mGPUTimerQuery);
+#endif
}
void LLVOAvatar::readProfileQuery(S32 retries)
{
if (!mGPUProfilePending)
{
- glEndQuery(GL_TIME_ELAPSED);
+#if GL_EXT_timer_query || GL_EXT_disjoint_timer_query
+ glEndQuery(GL_TIME_ELAPSED_EXT);
+#endif
mGPUProfilePending = true;
}