diff options
| -rw-r--r-- | indra/llprimitive/llgltfmaterial.cpp | 10 | ||||
| -rw-r--r-- | indra/llprimitive/llgltfmaterial.h | 9 | ||||
| -rw-r--r-- | indra/llprimitive/llmaterial.cpp | 2 | ||||
| -rw-r--r-- | indra/newview/llvovolume.cpp | 3 | 
4 files changed, 14 insertions, 10 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; +} + diff --git a/indra/llprimitive/llgltfmaterial.h b/indra/llprimitive/llgltfmaterial.h index b453b91e67..a53b68a50f 100644 --- a/indra/llprimitive/llgltfmaterial.h +++ b/indra/llprimitive/llgltfmaterial.h @@ -115,14 +115,7 @@ public:      bool mOverrideAlphaMode = false;      // get a UUID based on a hash of this LLGLTFMaterial -    LLUUID 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(S32), sizeof(this) - sizeof(S32)); -        return hash; -    } +    LLUUID getHash() const;      //setters for various members (will clamp to acceptable ranges)      // for_override - set to true if this value is being set as part of an override (important for handling override to default value) diff --git a/indra/llprimitive/llmaterial.cpp b/indra/llprimitive/llmaterial.cpp index a694a666c6..37525e4a3d 100644 --- a/indra/llprimitive/llmaterial.cpp +++ b/indra/llprimitive/llmaterial.cpp @@ -481,7 +481,7 @@ 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(S32), sizeof(this) - sizeof(S32)); +    HBXXH128::digest(id, (unsigned char*)this + sizeof(LLRefCount), sizeof(*this) - sizeof(LLRefCount));      return id;  } diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index e1335acc17..237f9e34a0 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -5416,7 +5416,8 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep,          if (gltf_mat)          { -            // nothing to do, render pools will reference the GLTF material +            // just remember the material ID, render pools will reference the GLTF material +            draw_info->mMaterialID = mat_id;          }          else if (mat)  		{ | 
