summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorGravatar bunnei2015-10-09 22:46:47 -0400
committerGravatar bunnei2015-10-21 21:58:59 -0400
commit240a3b80d970b56b4ed3671536489eb0e32532ae (patch)
tree487d5b0cda1965e8e80cd8e3c17b0cece3ad3cec /src/common
parentgl_shader_gen: Require explicit uniform locations. (diff)
downloadyuzu-240a3b80d970b56b4ed3671536489eb0e32532ae.tar.gz
yuzu-240a3b80d970b56b4ed3671536489eb0e32532ae.tar.xz
yuzu-240a3b80d970b56b4ed3671536489eb0e32532ae.zip
gl_rasterizer: Use MMH3 hash for shader cache hey.
- Includes a check to confirm no hash collisions.
Diffstat (limited to 'src/common')
-rw-r--r--src/common/common_funcs.h18
1 files changed, 0 insertions, 18 deletions
diff --git a/src/common/common_funcs.h b/src/common/common_funcs.h
index 7a8dd39a0..ed20c3629 100644
--- a/src/common/common_funcs.h
+++ b/src/common/common_funcs.h
@@ -4,9 +4,6 @@
4 4
5#pragma once 5#pragma once
6 6
7#include <cstddef>
8#include <functional>
9
10#include "common_types.h" 7#include "common_types.h"
11 8
12#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0])) 9#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0]))
@@ -98,18 +95,3 @@ inline u64 _rotr64(u64 x, unsigned int shift){
98// This function might change the error code. 95// This function might change the error code.
99// Defined in Misc.cpp. 96// Defined in Misc.cpp.
100const char* GetLastErrorMsg(); 97const char* GetLastErrorMsg();
101
102template <typename T>
103inline std::size_t hash(const T& o) {
104 return std::hash<T>()(o);
105}
106
107template <typename T>
108inline std::size_t combine_hash(const T& o) {
109 return hash(o);
110}
111
112template <typename T, typename... Args>
113inline std::size_t combine_hash(const T& o, const Args&... args) {
114 return hash(o) * 3 + combine_hash(args...);
115}