From 8018e7935a8c25a92d700aeceb3d8f75d3ea5f16 Mon Sep 17 00:00:00 2001
From: Cosmic Linden <cosmic@lindenlab.com>
Date: Wed, 29 Mar 2023 14:10:02 -0700
Subject: [PATCH] SL-19331: Clarify that mipmapping on media prims being
 disabled is known behavior that should be corrected at some point

---
 indra/newview/llviewermedia.cpp | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index 0bd58b8d4d6..d7426b70922 100644
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -79,6 +79,8 @@
 #include <boost/bind.hpp>	// for SkinFolder listener
 #include <boost/signals2.hpp>
 
+// *TODO: Consider enabling mipmaps (they have been disabled for a long time). Likely has a significant performance impact for tiled/high texture repeat media. Mip generation in a shader may also be an option if necessary.
+constexpr BOOL USE_MIPMAPS = FALSE;
 
 void init_threaded_picker_load_dialog(LLPluginClassMedia* plugin, LLFilePicker::ELoadFilter filter, bool get_multiple)
 {
@@ -1564,8 +1566,8 @@ LLViewerMediaImpl::LLViewerMediaImpl(	  const LLUUID& texture_id,
 
 	// connect this media_impl to the media texture, creating it if it doesn't exist.0
 	// This is necessary because we need to be able to use getMaxVirtualSize() even if the media plugin is not loaded.
-    const BOOL use_mipmaps = FALSE;
-	LLViewerMediaTexture* media_tex = LLViewerTextureManager::getMediaTexture(mTextureId, use_mipmaps);
+    // *TODO: Consider enabling mipmaps (they have been disabled for a long time). Likely has a significant performance impact for tiled/high texture repeat media. Mip generation in a shader may also be an option if necessary.
+	LLViewerMediaTexture* media_tex = LLViewerTextureManager::getMediaTexture(mTextureId, USE_MIPMAPS);
 	if(media_tex)
 	{
 		media_tex->setMediaImpl();
@@ -3006,8 +3008,8 @@ LLViewerMediaTexture* LLViewerMediaImpl::updateMediaImage()
     }
 
     llassert(!mTextureId.isNull());
-    const BOOL use_mipmaps = FALSE;
-    LLViewerMediaTexture* media_tex = LLViewerTextureManager::getMediaTexture( mTextureId, use_mipmaps );
+    // *TODO: Consider enabling mipmaps (they have been disabled for a long time). Likely has a significant performance impact for tiled/high texture repeat media. Mip generation in a shader may also be an option if necessary.
+    LLViewerMediaTexture* media_tex = LLViewerTextureManager::getMediaTexture( mTextureId, USE_MIPMAPS );
  
     if ( mNeedsNewTexture
         || (media_tex->getWidth() != mMediaSource->getTextureWidth())
-- 
GitLab