From ca452502e73389d376c81c7d0ca8aabc294387c7 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Sat, 12 Oct 2024 16:54:25 +0800 Subject: No samples_passed when there's no GL_SAMPLES_PASSED cause it relies on querying mSamplesQuery, which would only have a value if it could run glBeginQuery(GL_SAMPLES_PASSED, mSamplesQuery). --- indra/llrender/llglslshader.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'indra/llrender/llglslshader.cpp') diff --git a/indra/llrender/llglslshader.cpp b/indra/llrender/llglslshader.cpp index 439cf46684..f21f0327fe 100644 --- a/indra/llrender/llglslshader.cpp +++ b/indra/llrender/llglslshader.cpp @@ -307,16 +307,15 @@ bool LLGLSLShader::readProfileQuery(bool for_runtime, bool force_read) GLuint64 primitives_generated = 0; glGetQueryObjectui64v(mPrimitivesQuery, GL_QUERY_RESULT, &primitives_generated); #else - GLuint samples_passed = 0; - glGetQueryObjectuiv(mSamplesQuery, GL_QUERY_RESULT, &samples_passed); - GLuint primitives_generated = 0; glGetQueryObjectuiv(mPrimitivesQuery, GL_QUERY_RESULT, &primitives_generated); #endif sTotalTimeElapsed += time_elapsed; +#if GL_VERSION_1_5 sTotalSamplesDrawn += samples_passed; mSamplesDrawn += samples_passed; +#endif U32 tri_count = (U32)primitives_generated / 3; -- cgit v1.2.3