diff options
| author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2025-11-19 21:05:46 +0200 |
|---|---|---|
| committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2025-11-19 21:05:46 +0200 |
| commit | 093d969eb97ca03dbf4ae5cd3a3c784f58613a32 (patch) | |
| tree | 916a65d49f2bfe6c12effba979bfa39417d6304a /indra/llrender/llimagegl.cpp | |
| parent | 7e09943d57ecf2d9b15249cbc19b4e2ec16f7bf3 (diff) | |
| parent | ae659adab6f8d1adf0224d12fb3b379251eaa501 (diff) | |
Merge branch 'develop-linux' into marchcat/slua-linux
# Conflicts:
# indra/newview/llfeaturemanager.cpp
# indra/newview/llstartup.cpp
Diffstat (limited to 'indra/llrender/llimagegl.cpp')
| -rw-r--r-- | indra/llrender/llimagegl.cpp | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp index 97ea6f67bd..3165cb313b 100644 --- a/indra/llrender/llimagegl.cpp +++ b/indra/llrender/llimagegl.cpp @@ -138,7 +138,6 @@ U32 LLImageGL::sUniqueCount = 0; U32 LLImageGL::sBindCount = 0; S32 LLImageGL::sCount = 0; -bool LLImageGL::sGlobalUseAnisotropic = false; F32 LLImageGL::sLastFrameTime = 0.f; LLImageGL* LLImageGL::sDefaultGLTexture = NULL ; bool LLImageGL::sCompressTextures = false; @@ -837,14 +836,6 @@ bool LLImageGL::setImage(const U8* data_in, bool data_hasmips /* = false */, S32 mMipLevels = wpo2(llmax(w, h)); - //use legacy mipmap generation mode (note: making this condional can cause rendering issues) - // -- but making it not conditional triggers deprecation warnings when core profile is enabled - // (some rendering issues while core profile is enabled are acceptable at this point in time) - if (!LLRender::sGLCoreProfile) - { - glTexParameteri(mTarget, GL_GENERATE_MIPMAP, GL_TRUE); - } - LLImageGL::setManualImage(mTarget, 0, mFormatInternal, w, h, mFormatPrimary, mFormatType, @@ -860,7 +851,6 @@ bool LLImageGL::setImage(const U8* data_in, bool data_hasmips /* = false */, S32 stop_glerror(); } - if (LLRender::sGLCoreProfile) { LL_PROFILE_GPU_ZONE("generate mip map"); glGenerateMipmap(mTarget); @@ -1053,7 +1043,11 @@ U32 type_width_from_pixtype(U32 pixtype) bool should_stagger_image_set(bool compressed) { -#if LL_DARWIN +#if LL_MESA_HEADLESS + return false; +#elif LL_LINUX + return !compressed && on_main_thread() && gGLManager.mIsNVIDIA; +#elif LL_DARWIN return !compressed && on_main_thread() && gGLManager.mIsAMD; #else // glTexSubImage2D doesn't work with compressed textures on select tested Nvidia GPUs on Windows 10 -Cosmic,2023-03-08 @@ -2006,7 +2000,7 @@ bool LLImageGL::getIsResident(bool test_now) { if (mTexName != 0) { - glAreTexturesResident(1, (GLuint*)&mTexName, &mIsResident); + mIsResident = true; } else { @@ -2141,7 +2135,7 @@ void LLImageGL::calcAlphaChannelOffsetAndStride() case GL_SRGB_ALPHA: mAlphaStride = 4; break; - case GL_BGRA_EXT: + case GL_BGRA: mAlphaStride = 4; break; default: @@ -2178,7 +2172,7 @@ void LLImageGL::calcAlphaChannelOffsetAndStride() if( mAlphaStride < 1 || //unsupported format mAlphaOffset < 0 || //unsupported type - (mFormatPrimary == GL_BGRA_EXT && mFormatType != GL_UNSIGNED_BYTE)) //unknown situation + (mFormatPrimary == GL_BGRA && mFormatType != GL_UNSIGNED_BYTE)) //unknown situation { LL_WARNS() << "Cannot analyze alpha for image with format type " << std::hex << mFormatType << std::dec << LL_ENDL; |
