From 30b72ba4106a3d818666e9a6e8a0aad5fbc0c7cb Mon Sep 17 00:00:00 2001 From: "Jonathan \"Geenz\" Goodman" Date: Wed, 21 May 2025 20:43:45 -0400 Subject: Make sure we're guarding texture uploads to the GPU properly If we're not loading a texture, most of this should not be necessary. --- indra/newview/gltf/asset.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview/gltf/asset.cpp') diff --git a/indra/newview/gltf/asset.cpp b/indra/newview/gltf/asset.cpp index d4d935ecc0..4e66bf2cbf 100644 --- a/indra/newview/gltf/asset.cpp +++ b/indra/newview/gltf/asset.cpp @@ -963,7 +963,7 @@ bool Image::prep(Asset& asset) mTexture = LLViewerTextureManager::getFetchedTextureFromMemory(data, bufferView.mByteLength, mMimeType); } - else if (mTexture.isNull()) + else if (mTexture.isNull() && mLoadIntoTexturePipe) { LL_WARNS("GLTF") << "Failed to load image from buffer:" << LL_ENDL; LL_WARNS("GLTF") << " image: " << mName << LL_ENDL; @@ -983,7 +983,7 @@ bool Image::prep(Asset& asset) LLUUID world_id = LLLocalBitmapMgr::getInstance()->getWorldID(tracking_id); mTexture = LLViewerTextureManager::getFetchedTexture(world_id); } - else + else if (mLoadIntoTexturePipe) { LL_WARNS("GLTF") << "Failed to load image from file:" << LL_ENDL; LL_WARNS("GLTF") << " image: " << mName << LL_ENDL; @@ -998,7 +998,7 @@ bool Image::prep(Asset& asset) return false; } - if (!asset.mFilename.empty()) + if (!asset.mFilename.empty() && mLoadIntoTexturePipe) { // local preview, boost image so it doesn't discard and force to save raw image in case we save out or upload mTexture->setBoostLevel(LLViewerTexture::BOOST_PREVIEW); mTexture->forceToSaveRawImage(0, F32_MAX); -- cgit v1.2.3