summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2023-12-31 20:20:32 +0800
committerErik Kundiman <erik@megapahit.org>2023-12-31 20:20:32 +0800
commit2972db3c5097bfa435dc97886320c888e1e6fae9 (patch)
treed94c0e05107d26892eb3cec3e822735ed406a665
parent39850d709889ce38b884b939166e5a40f38c82eb (diff)
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.
-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 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