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/llrender/llglslshader.cpp | |
parent | 4a97679e2cbee997b5bcf85e8e2c094e2c7bb936 (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.cpp | 8 |
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); |