diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2024-01-18 13:15:32 -0500 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2024-01-18 13:15:32 -0500 |
commit | fea1d9f4d21ceccb6ebb13270c40ebbae737e769 (patch) | |
tree | c6e4fa3a9c1f0ff39e3a65e4694b3bb891d2812e /indra/llprimitive/llmaterial.cpp | |
parent | 5fa7f69101a889009194eeddb927599d7536613f (diff) | |
parent | fe796dac711c7ecdc7d6d17e0b692abf468b754a (diff) |
SL-20546: Merge branch 'DRTVWR-588-maint-W' into sl-20546.
Diffstat (limited to 'indra/llprimitive/llmaterial.cpp')
-rw-r--r-- | indra/llprimitive/llmaterial.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/indra/llprimitive/llmaterial.cpp b/indra/llprimitive/llmaterial.cpp index fa22145972..0d146de949 100644 --- a/indra/llprimitive/llmaterial.cpp +++ b/indra/llprimitive/llmaterial.cpp @@ -27,6 +27,7 @@ #include "linden_common.h" #include "llmaterial.h" +#include "hbxxh.h" /** * Materials cap parameters @@ -464,4 +465,12 @@ U32 LLMaterial::getShaderMask(U32 alpha_mode, BOOL is_alpha) return ret; } +LLUUID LLMaterial::getHash() const +{ + LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE; + // HACK - hash the bytes of this LLMaterial, but trim off the S32 in LLRefCount + LLUUID id; + HBXXH128::digest(id, (unsigned char*)this + sizeof(LLRefCount), sizeof(*this) - sizeof(LLRefCount)); + return id; +} |