diff options
| author | Dave Parks <davep@lindenlab.com> | 2023-03-22 18:25:47 -0500 |
|---|---|---|
| committer | Dave Parks <davep@lindenlab.com> | 2023-03-22 18:25:47 -0500 |
| commit | e23b3972a00370aff25d582ce33dc0db6d795213 (patch) | |
| tree | 2ef6e4ecbe88a340a1bde00f8fd65d5bf29b8a0e /indra/llprimitive/llgltfmaterial.cpp | |
| parent | c4bc71766922c4f810e38f7dc91e521ed87fccf2 (diff) | |
DRTVWR-559 Fix for bad hashing of materials breaking render batches and who knows what else.
Diffstat (limited to 'indra/llprimitive/llgltfmaterial.cpp')
| -rw-r--r-- | indra/llprimitive/llgltfmaterial.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/indra/llprimitive/llgltfmaterial.cpp b/indra/llprimitive/llgltfmaterial.cpp index 62b693919c..f3aa5b0648 100644 --- a/indra/llprimitive/llgltfmaterial.cpp +++ b/indra/llprimitive/llgltfmaterial.cpp @@ -692,3 +692,13 @@ void LLGLTFMaterial::applyOverride(const LLGLTFMaterial& override_mat) } } } + +LLUUID LLGLTFMaterial::getHash() const +{ + LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE; + // HACK - hash the bytes of this object but don't include the ref count + LLUUID hash; + HBXXH128::digest(hash, (unsigned char*)this + sizeof(LLRefCount), sizeof(*this) - sizeof(LLRefCount)); + return hash; +} + |
