From e6e41e71b7bc860faee8cd13c56f7180e8eb4745 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Tue, 9 Jul 2024 15:54:18 -0500 Subject: #1943 make sys free in texture console llmemorysavailphysicalmeminkb tell the truth (#1966) * Also fix for crash when applying MoaP to PBR material --- indra/newview/llappviewer.cpp | 1 - indra/newview/llviewertexture.cpp | 14 +++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 5b5e42767f..aec721e6c3 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -347,7 +347,6 @@ LLFrameTimer gRestoreGLTimer; bool gRestoreGL = false; bool gUseWireframe = false; -LLMemoryInfo gSysMemory; U64Bytes gMemoryAllocated(0); // updated in display_stats() in llviewerdisplay.cpp std::string gLastVersionChannel; diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index c754580fc0..9fa71fdff7 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -3489,7 +3489,19 @@ void LLViewerMediaTexture::setPlaying(bool playing) for(std::list< LLFace* >::iterator iter = mMediaFaceList.begin(); iter!= mMediaFaceList.end(); ++iter) { - switchTexture(LLRender::DIFFUSE_MAP, *iter); + LLFace* facep = *iter; + const LLTextureEntry* te = facep->getTextureEntry(); + if (te->getGLTFMaterial()) + { + // PBR material, switch emissive and basecolor + switchTexture(LLRender::EMISSIVE_MAP, *iter); + switchTexture(LLRender::BASECOLOR_MAP, *iter); + } + else + { + // blinn-phong material, switch diffuse map only + switchTexture(LLRender::DIFFUSE_MAP, *iter); + } } } else //stop playing this media -- cgit v1.2.3