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.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 +------ indra/newview/llviewertexture.cpp | 7 ------- indra/newview/llviewertexturelist.cpp | 2 ++ 3 files changed, 3 insertions(+), 13 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); diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 0d82aced23..df65fe8fb8 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -402,13 +402,6 @@ void LLViewerTextureManager::init() LLViewerFetchedTexture::sDefaultImagep->dontDiscard(); LLViewerFetchedTexture::sDefaultImagep->setCategory(LLGLTexture::OTHER); -#if 0 - // When called first time after clearing cache this call creates (and adds to cache) an opaque texture instead of transparent - // SL-18964 : The creating of this texture was moved to LLDrawPoolAlpha::renderDebugAlpha() - LLViewerFetchedTexture::sSmokeImagep = LLViewerTextureManager::getFetchedTexture(IMG_SMOKE, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_UI); - LLViewerFetchedTexture::sSmokeImagep->setNoDelete(); -#endif - image_raw = new LLImageRaw(32,32,3); data = image_raw->getData(); diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 93ae1670c8..52e6a9a2df 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -228,6 +228,8 @@ void LLViewerTextureList::doPrefetchImages() LLViewerTextureManager::getFetchedTexture(IMG_SHOT); LLViewerTextureManager::getFetchedTexture(IMG_SMOKE_POOF); + LLViewerFetchedTexture::sSmokeImagep = LLViewerTextureManager::getFetchedTexture(IMG_SMOKE, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_UI); + LLViewerFetchedTexture::sSmokeImagep->setNoDelete(); LLStandardBumpmap::addstandard(); -- cgit v1.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/lldrawpool.cpp | 12 ++++++------ indra/newview/lldrawpoolalpha.cpp | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'indra/newview/lldrawpoolalpha.cpp') diff --git a/indra/newview/lldrawpool.cpp b/indra/newview/lldrawpool.cpp index 594cfe513d..3fd15d36df 100644 --- a/indra/newview/lldrawpool.cpp +++ b/indra/newview/lldrawpool.cpp @@ -402,7 +402,7 @@ void LLRenderPass::renderGroup(LLSpatialGroup* group, U32 type, U32 mask, BOOL t if(pparams->mFace) { LLViewerObject* vobj = pparams->mFace->getViewerObject(); - if(vobj->isAttachment()) + if(vobj && vobj->isAttachment()) { trackAttachments(vobj, false, &ratPtr); } @@ -429,7 +429,7 @@ void LLRenderPass::renderRiggedGroup(LLSpatialGroup* group, U32 type, U32 mask, if(pparams->mFace) { LLViewerObject* vobj = pparams->mFace->getViewerObject(); - if(vobj->isAttachment()) + if(vobj && vobj->isAttachment()) { trackAttachments( vobj, true ,&ratPtr); } @@ -459,7 +459,7 @@ void LLRenderPass::pushBatches(U32 type, U32 mask, BOOL texture, BOOL batch_text if(pparams->mFace) { LLViewerObject* vobj = pparams->mFace->getViewerObject(); - if(vobj->isAttachment()) + if(vobj && vobj->isAttachment()) { trackAttachments( vobj, false, &ratPtr); } @@ -484,7 +484,7 @@ void LLRenderPass::pushRiggedBatches(U32 type, U32 mask, BOOL texture, BOOL batc if(pparams->mFace) { LLViewerObject* vobj = pparams->mFace->getViewerObject(); - if(vobj->isAttachment()) + if(vobj && vobj->isAttachment()) { trackAttachments( vobj, true, &ratPtr); } @@ -514,7 +514,7 @@ void LLRenderPass::pushMaskBatches(U32 type, U32 mask, BOOL texture, BOOL batch_ if((*pparams).mFace) { LLViewerObject* vobj = (*pparams).mFace->getViewerObject(); - if(vobj->isAttachment()) + if(vobj && vobj->isAttachment()) { trackAttachments( vobj, false, &ratPtr); } @@ -539,7 +539,7 @@ void LLRenderPass::pushRiggedMaskBatches(U32 type, U32 mask, BOOL texture, BOOL if((*pparams).mFace) { LLViewerObject* vobj = (*pparams).mFace->getViewerObject(); - if(vobj->isAttachment()) + if(vobj && vobj->isAttachment()) { trackAttachments( vobj, true, &ratPtr); } 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.3