From 7c831d115b55b96129806353a51a01dcf2bcebba Mon Sep 17 00:00:00 2001 From: RunitaiLinden Date: Mon, 3 Apr 2023 17:22:40 -0500 Subject: SL-18458 Make LLVOCache the one source of truth on most recently received overrides. (#147) --- indra/llprimitive/lltextureentry.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'indra/llprimitive/lltextureentry.cpp') diff --git a/indra/llprimitive/lltextureentry.cpp b/indra/llprimitive/lltextureentry.cpp index a665db378b..17b1f4cf5c 100644 --- a/indra/llprimitive/lltextureentry.cpp +++ b/indra/llprimitive/lltextureentry.cpp @@ -559,10 +559,17 @@ void LLTextureEntry::setGLTFMaterial(LLGLTFMaterial* material, bool local_origin } } -void LLTextureEntry::setGLTFMaterialOverride(LLGLTFMaterial* mat) +S32 LLTextureEntry::setGLTFMaterialOverride(LLGLTFMaterial* mat) { llassert(mat == nullptr || getGLTFMaterial() != nullptr); // if override is not null, base material must not be null - mGLTFMaterialOverrides = mat; + if (mat == mGLTFMaterialOverrides) + { + return TEM_CHANGE_NONE; + } + + mGLTFMaterialOverrides = mat; + + return TEM_CHANGE_TEXTURE; } S32 LLTextureEntry::setBaseMaterial() -- cgit v1.2.3