From 2972db3c5097bfa435dc97886320c888e1e6fae9 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Sun, 31 Dec 2023 20:20:32 +0800 Subject: Fix recommended GPU class lower than it should which was caused by the different kind of expected value from the samples query, which then caused the memory bandwidth to be detected as 0 according to ARB timer query, which then affected the GPU class, which eventually affected the texture loading, especially missing colours when zoomed in. --- indra/llrender/llglslshader.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/indra/llrender/llglslshader.cpp b/indra/llrender/llglslshader.cpp index c0485d3b97..cca41479aa 100644 --- a/indra/llrender/llglslshader.cpp +++ b/indra/llrender/llglslshader.cpp @@ -239,7 +239,9 @@ void LLGLSLShader::placeProfileQuery(bool for_runtime) if (!for_runtime) { - glBeginQuery(GL_ANY_SAMPLES_PASSED, mSamplesQuery); +#if GL_VERSION_1_5 + glBeginQuery(GL_SAMPLES_PASSED, mSamplesQuery); +#endif #if GL_VERSION_3_0 glBeginQuery(GL_PRIMITIVES_GENERATED, mPrimitivesQuery); #endif @@ -258,7 +260,9 @@ bool LLGLSLShader::readProfileQuery(bool for_runtime, bool force_read) #endif if (!for_runtime) { - glEndQuery(GL_ANY_SAMPLES_PASSED); +#if GL_VERSION_1_5 + glEndQuery(GL_SAMPLES_PASSED); +#endif #if GL_VERSION_3_0 glEndQuery(GL_PRIMITIVES_GENERATED); #endif -- cgit v1.2.3