diff --git a/native/cocos/renderer/gfx-base/GFXDef.cpp b/native/cocos/renderer/gfx-base/GFXDef.cpp index 734e7f716b..3ef36f4680 100644 --- a/native/cocos/renderer/gfx-base/GFXDef.cpp +++ b/native/cocos/renderer/gfx-base/GFXDef.cpp @@ -113,12 +113,14 @@ bool operator==(const RenderPassInfo& lhs, const RenderPassInfo& rhs) { template <> size_t Hasher::operator()(const FramebufferInfo& info) const { // render pass is mostly irrelevant - size_t seed = (info.colorTextures.size() + 1) * 2; + size_t seed = (info.colorTextures.size() + 1) * 3; for (auto* colorTexture : info.colorTextures) { + boost::hash_combine(seed, colorTexture); boost::hash_combine(seed, colorTexture->getRaw()); boost::hash_combine(seed, colorTexture->getHash()); } + boost::hash_combine(seed, info.depthStencilTexture); boost::hash_combine(seed, info.depthStencilTexture->getRaw()); boost::hash_combine(seed, info.depthStencilTexture->getHash()); return seed;