summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llrender/llglslshader.cpp8
-rw-r--r--indra/newview/llvoavatar.cpp8
2 files changed, 12 insertions, 4 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);
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;
}