diff options
author | Dave Parks <davep@lindenlab.com> | 2024-07-09 15:54:18 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-09 15:54:18 -0500 |
commit | e6e41e71b7bc860faee8cd13c56f7180e8eb4745 (patch) | |
tree | 57921be1de663dbcf0dd1ff1fb10aa1dd4c4dda7 /indra/newview | |
parent | 21f40280eca12bca53e9894f01cac2e205bb2827 (diff) |
#1943 make sys free in texture console llmemorysavailphysicalmeminkb tell the truth (#1966)
* Also fix for crash when applying MoaP to PBR material
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llappviewer.cpp | 1 | ||||
-rw-r--r-- | indra/newview/llviewertexture.cpp | 14 |
2 files changed, 13 insertions, 2 deletions
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 |