From 91c11c8d87c963f2b17e45b525396bf8c8386c26 Mon Sep 17 00:00:00 2001 From: "Jonathan \"Geenz\" Goodman" Date: Wed, 22 Jul 2026 00:38:20 -0400 Subject: Revert "Geenz/texture loading speed (#5985)" This reverts commit a937b237de3651e79cdb517f14381a5bdd4c844b. --- indra/llrender/llimagegl.cpp | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'indra/llrender/llimagegl.cpp') diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp index b3cd8d2896..c8a23d873e 100644 --- a/indra/llrender/llimagegl.cpp +++ b/indra/llrender/llimagegl.cpp @@ -1507,7 +1507,7 @@ void LLImageGL::setManualImage(U32 target, S32 miplevel, S32 intformat, S32 widt // Drain stale GL errors so an OOM detected below belongs to this alloc. // Otherwise a failed glTexImage2D is swallowed in release while // alloc_tex_image still counts the bytes, inflating the used-VRAM figure. - drain_glerror(); + while (glGetError() != GL_NO_ERROR) {} const bool use_sub_image = should_stagger_image_set(compress); if (!use_sub_image) @@ -1919,8 +1919,7 @@ bool LLImageGL::readBackRaw(S32 discard_level, LLImageRaw* imageraw, bool compre //----------------------------------------------------------------------------------------------- GLenum error ; - S32 error_count = 0 ; - while((error = glGetError()) != GL_NO_ERROR && ++error_count <= 16) + while((error = glGetError()) != GL_NO_ERROR) { LL_WARNS() << "GL Error happens before reading back texture. Error code: " << error << LL_ENDL ; } @@ -1980,8 +1979,7 @@ bool LLImageGL::readBackRaw(S32 discard_level, LLImageRaw* imageraw, bool compre LL_WARNS() << "GL Error happens after reading back texture. Error code: " << error << LL_ENDL ; imageraw->deleteData() ; - error_count = 0 ; - while((error = glGetError()) != GL_NO_ERROR && ++error_count <= 16) + while((error = glGetError()) != GL_NO_ERROR) { LL_WARNS() << "GL Error happens after reading back texture. Error code: " << error << LL_ENDL ; } @@ -2550,10 +2548,8 @@ bool LLImageGL::scaleDown(S32 desired_discard) { LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE; - // Don't let eviction re-arm the GC: the glGenerateMipmap re-bind below would - // otherwise stamp mLastBindFrame, so the next computeDesiredDiscard treats the - // just-evicted texture as freshly drawn, un-floors it, and re-fetches - the - // evict/refetch oscillation. + // Don't let eviction re-arm visibility: the glGenerateMipmap re-bind below + // would otherwise stamp mLastBindFrame and keep the texture fetch-eligible. LLImageGLStampBypass no_stamp; if (mTarget != GL_TEXTURE_2D -- cgit v1.3