summaryrefslogtreecommitdiff
path: root/indra/llrender/llglslshader.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/llrender/llglslshader.cpp
parent4a97679e2cbee997b5bcf85e8e2c094e2c7bb936 (diff)
Use the more portable GL_TIME_ELAPSED_EXT
and only when it's available.
Diffstat (limited to 'indra/llrender/llglslshader.cpp')
-rw-r--r--indra/llrender/llglslshader.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/indra/llrender/llglslshader.cpp b/indra/llrender/llglslshader.cpp
index 67c5da3005..58f2a4d91d 100644
--- a/indra/llrender/llglslshader.cpp
+++ b/indra/llrender/llglslshader.cpp
@@ -233,7 +233,9 @@ void LLGLSLShader::placeProfileQuery(bool for_runtime)
glGenQueries(1, &mPrimitivesQuery);
}
- glBeginQuery(GL_TIME_ELAPSED, mTimerQuery);
+#if GL_EXT_timer_query || GL_EXT_disjoint_timer_query
+ glBeginQuery(GL_TIME_ELAPSED_EXT, mTimerQuery);
+#endif
if (!for_runtime)
{
@@ -251,7 +253,9 @@ bool LLGLSLShader::readProfileQuery(bool for_runtime, bool force_read)
{
if (!mProfilePending)
{
- glEndQuery(GL_TIME_ELAPSED);
+#if GL_EXT_timer_query || GL_EXT_disjoint_timer_query
+ glEndQuery(GL_TIME_ELAPSED_EXT);
+#endif
if (!for_runtime)
{
glEndQuery(GL_SAMPLES_PASSED);