summaryrefslogtreecommitdiff
path: root/indra/llrender/llimagegl.cpp
diff options
context:
space:
mode:
authorJonathan "Geenz" Goodman <geenz@geenzo.com>2026-08-11 21:39:19 -0400
committerJonathan "Geenz" Goodman <geenz@geenzo.com>2026-08-11 21:39:19 -0400
commit8cabc33e960ca93fdc1a32c77cf611269d95d51b (patch)
tree931fcecac10bf73214efa07cc3d704ba2bd01272 /indra/llrender/llimagegl.cpp
parent9b7ab49575b54523128952af6686d17eb6696725 (diff)
parentd045f9aa32789a35628aced166145c182751acbf (diff)
Merge remote-tracking branch 'origin/develop-linux' into geenz/linux-to-develop
Diffstat (limited to 'indra/llrender/llimagegl.cpp')
-rw-r--r--indra/llrender/llimagegl.cpp22
1 files changed, 8 insertions, 14 deletions
diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp
index 8057149d73..c004b36fef 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;
@@ -838,14 +837,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,
@@ -861,7 +852,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);
@@ -1054,7 +1044,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
@@ -2010,7 +2004,7 @@ bool LLImageGL::getIsResident(bool test_now)
{
if (mTexName != 0)
{
- glAreTexturesResident(1, (GLuint*)&mTexName, &mIsResident);
+ mIsResident = true;
}
else
{
@@ -2148,7 +2142,7 @@ void LLImageGL::calcAlphaChannelOffsetAndStride()
case GL_SRGB_ALPHA:
mAlphaStride = 4;
break;
- case GL_BGRA_EXT:
+ case GL_BGRA:
mAlphaStride = 4;
break;
default:
@@ -2185,7 +2179,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;