diff options
| author | Jonathan "Geenz" Goodman <geenz@geenzo.com> | 2026-07-22 00:38:20 -0400 |
|---|---|---|
| committer | Jonathan "Geenz" Goodman <geenz@geenzo.com> | 2026-07-22 00:38:20 -0400 |
| commit | 91c11c8d87c963f2b17e45b525396bf8c8386c26 (patch) | |
| tree | 3c5027410c843e8cc31ed2b253df720096529b3d /indra/llrender/llimagegl.cpp | |
| parent | e9fd0450e92c569640a462baecabb89dfd537571 (diff) | |
Revert "Geenz/texture loading speed (#5985)"
This reverts commit a937b237de3651e79cdb517f14381a5bdd4c844b.
Diffstat (limited to 'indra/llrender/llimagegl.cpp')
| -rw-r--r-- | indra/llrender/llimagegl.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
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 |
