From da3002bd0c25cfe922db1e40e46e48de9201501f Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Sun, 12 Feb 2023 13:37:08 +0100 Subject: SL-18964 Move creating of LLViewerFetchedTexture::sSmokeImagep to LLDrawPoolAlpha::renderDebugAlpha() --- indra/newview/lldrawpoolalpha.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'indra/newview/lldrawpoolalpha.cpp') diff --git a/indra/newview/lldrawpoolalpha.cpp b/indra/newview/lldrawpoolalpha.cpp index 6c1abb24c9..d4797321bb 100644 --- a/indra/newview/lldrawpoolalpha.cpp +++ b/indra/newview/lldrawpoolalpha.cpp @@ -280,6 +280,13 @@ void LLDrawPoolAlpha::renderDebugAlpha() { gHighlightProgram.bind(); gGL.diffuseColor4f(1, 0, 0, 1); + + // SL-18964 : The creating of this texture was moved here from LLViewerTextureManager::init() to make the texture transparent before adding to cache + if (!LLViewerFetchedTexture::sSmokeImagep) + { + LLViewerFetchedTexture::sSmokeImagep = LLViewerTextureManager::getFetchedTexture(IMG_SMOKE, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_UI); + LLViewerFetchedTexture::sSmokeImagep->setNoDelete(); + } LLViewerFetchedTexture::sSmokeImagep->addTextureStats(1024.f * 1024.f); gGL.getTexUnit(0)->bindFast(LLViewerFetchedTexture::sSmokeImagep); -- cgit v1.2.3 From d2a8a3bd53f011b7137717ece39f01b5242bb45a Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 16 Mar 2023 00:04:11 +0200 Subject: SL-18964 Smoke texture can fail to load Debt from SL-18221. Keep init together, after we got the cap; texture should finish loading before it's needed. --- indra/newview/lldrawpoolalpha.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'indra/newview/lldrawpoolalpha.cpp') diff --git a/indra/newview/lldrawpoolalpha.cpp b/indra/newview/lldrawpoolalpha.cpp index d4797321bb..f91069185a 100644 --- a/indra/newview/lldrawpoolalpha.cpp +++ b/indra/newview/lldrawpoolalpha.cpp @@ -281,12 +281,7 @@ void LLDrawPoolAlpha::renderDebugAlpha() gHighlightProgram.bind(); gGL.diffuseColor4f(1, 0, 0, 1); - // SL-18964 : The creating of this texture was moved here from LLViewerTextureManager::init() to make the texture transparent before adding to cache - if (!LLViewerFetchedTexture::sSmokeImagep) - { - LLViewerFetchedTexture::sSmokeImagep = LLViewerTextureManager::getFetchedTexture(IMG_SMOKE, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_UI); - LLViewerFetchedTexture::sSmokeImagep->setNoDelete(); - } + LLViewerFetchedTexture::sSmokeImagep->addTextureStats(1024.f * 1024.f); gGL.getTexUnit(0)->bindFast(LLViewerFetchedTexture::sSmokeImagep); -- cgit v1.2.3 From d134d155e2ddaf07ba1cdac50c1e31781e451ee5 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 1 Jun 2023 22:15:33 +0300 Subject: SL-19806 Crash at vobj --- indra/newview/lldrawpoolalpha.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/lldrawpoolalpha.cpp') diff --git a/indra/newview/lldrawpoolalpha.cpp b/indra/newview/lldrawpoolalpha.cpp index edd0afe357..ab1ac7e30c 100644 --- a/indra/newview/lldrawpoolalpha.cpp +++ b/indra/newview/lldrawpoolalpha.cpp @@ -349,7 +349,7 @@ void LLDrawPoolAlpha::renderAlphaHighlight(U32 mask) if(params.mFace) { LLViewerObject* vobj = (LLViewerObject *)params.mFace->getViewerObject(); - if(vobj->isAttachment()) + if(vobj && vobj->isAttachment()) { trackAttachments( vobj, params.mFace->isState(LLFace::RIGGED), &ratPtr ); } @@ -622,7 +622,7 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask, bool depth_only, bool rigged) { LLViewerObject* vobj = (LLViewerObject *)params.mFace->getViewerObject(); - if(vobj->isAttachment()) + if(vobj && vobj->isAttachment()) { trackAttachments( vobj, params.mFace->isState(LLFace::RIGGED), &ratPtr ); } -- cgit v1.2.3