From 2cd5edd08b961a31a3f606c87305b8d046a79487 Mon Sep 17 00:00:00 2001 From: Swung0x48 Date: Wed, 18 Jun 2025 13:05:06 +0800 Subject: [PATCH] [Fix] (EGL_impl.cpp): fix PSO hashing bugs --- MG/MG_GL/Implementations/EGL/Diligent/EGL_impl.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/MG/MG_GL/Implementations/EGL/Diligent/EGL_impl.cpp b/MG/MG_GL/Implementations/EGL/Diligent/EGL_impl.cpp index f43cfdf3..604fb1aa 100644 --- a/MG/MG_GL/Implementations/EGL/Diligent/EGL_impl.cpp +++ b/MG/MG_GL/Implementations/EGL/Diligent/EGL_impl.cpp @@ -95,13 +95,13 @@ namespace MG_Diligent { MG_Global::unordered_map capabilities = commonState.capabilities; - hash ^= std::hash()(commonState.blendSrcRGB); - hash ^= std::hash()(commonState.blendDstRGB); - hash ^= std::hash()(commonState.blendSrcAlpha); - hash ^= std::hash()(commonState.blendDstAlpha); + hash ^= std::hash()(commonState.blendSrcRGB); + hash ^= std::hash()(commonState.blendDstRGB); + hash ^= std::hash()(commonState.blendSrcAlpha); + hash ^= std::hash()(commonState.blendDstAlpha); hash ^= std::hash()(capabilities[GL_BLEND]); - hash ^= std::hash()(commonState.depthFunc); + hash ^= std::hash()(commonState.depthFunc); hash ^= std::hash()(commonState.depthMask); hash ^= std::hash()(capabilities[GL_DEPTH_TEST]); @@ -113,9 +113,9 @@ namespace MG_Diligent { auto *pVAO = vaState.GetCurrentVAO(); for (const auto &[index, attrib]: pVAO->attribs) { if (attrib.enabled) { - hash ^= std::hash()(index); + hash ^= std::hash()(index); hash ^= std::hash()(attrib.size); - hash ^= std::hash()(attrib.type); + hash ^= std::hash()(attrib.type); hash ^= std::hash()(attrib.normalized); } }