diff options
author | Erik Kundiman <erik@megapahit.org> | 2023-09-11 13:45:57 +0800 |
---|---|---|
committer | Erik Kundiman <erik@megapahit.org> | 2023-09-11 13:45:57 +0800 |
commit | 6109cd400049f95d800cb2d847db9d6659e48011 (patch) | |
tree | 390f2121ae2a9fbc71a2ca48f0b94ecbecfc363a /indra/newview/llvoavatar.cpp | |
parent | 4a97679e2cbee997b5bcf85e8e2c094e2c7bb936 (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.cpp | 8 |
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; } |