X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fgraphics%2Fgles-impl%2Fgles-context.cpp;h=ef80683f480d86f6919290843d9d4e1205386050;hb=ba335126885e9b82a7017ece63f32bc8eb8200c9;hp=e38c3cdcc07ed7791945e4f073923bdfa88b60da;hpb=fef5a4aa14a9db372a5eb050b39a1010207857ac;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git diff --git a/dali/internal/graphics/gles-impl/gles-context.cpp b/dali/internal/graphics/gles-impl/gles-context.cpp index e38c3cd..ef80683 100644 --- a/dali/internal/graphics/gles-impl/gles-context.cpp +++ b/dali/internal/graphics/gles-impl/gles-context.cpp @@ -60,7 +60,15 @@ struct Context::Impl std::size_t hash = 0; for(const auto& attr : vertexInputState.attributes) { - hash ^= std::hash{}(attr.location); + // Make unordered hash value by location. + // Note : This hash function varified for locations only under < 20. + std::size_t salt = attr.location + 1; + hash += salt << (sizeof(std::size_t) * 6); + salt *= salt; + salt ^= attr.location; + hash += salt << (sizeof(std::size_t) * 4); + salt *= salt; + hash += salt; } auto& gl = *mController.GetGL();