diff options
author | Jonathan "Geenz" Goodman <geenz@geenzo.com> | 2025-05-21 20:43:45 -0400 |
---|---|---|
committer | Jonathan "Geenz" Goodman <geenz@geenzo.com> | 2025-05-21 20:43:45 -0400 |
commit | 30b72ba4106a3d818666e9a6e8a0aad5fbc0c7cb (patch) | |
tree | 30d36e8eda8b6cfbd6c31b7039256f7c45fbd92c | |
parent | 18182b137a6ad99c314b43c0cd388d73248a0e41 (diff) |
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.
-rw-r--r-- | indra/newview/gltf/asset.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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); |