summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/NativeVertexFormat.h
diff options
context:
space:
mode:
authorcomex <comexk@gmail.com>2014-09-28 21:59:27 -0400
committercomex <comexk@gmail.com>2014-09-28 21:59:27 -0400
commitfbabc03b3f684d57cc25bd8b86c0b1d30a237bb8 (patch)
tree64695c3c67d9f975b7e1c7835e0e405620a562e9 /Source/Core/VideoCommon/NativeVertexFormat.h
parent431fb4d82a9fa9597df3c35c27e55714ff3e27c0 (diff)
parent6c0a68d50765c24a205f7133205b54c26ae1bbfb (diff)
Merge pull request #885 from comex/gpu-determinism
GPU determinism (apparently it is ready for merge)
Diffstat (limited to 'Source/Core/VideoCommon/NativeVertexFormat.h')
-rw-r--r--Source/Core/VideoCommon/NativeVertexFormat.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/Source/Core/VideoCommon/NativeVertexFormat.h b/Source/Core/VideoCommon/NativeVertexFormat.h
index ebc95cdc45..8778423d3f 100644
--- a/Source/Core/VideoCommon/NativeVertexFormat.h
+++ b/Source/Core/VideoCommon/NativeVertexFormat.h
@@ -4,7 +4,7 @@
#pragma once
-#include "Common/CommonTypes.h"
+#include "Common/Hash.h"
// m_components
enum
@@ -87,6 +87,20 @@ struct PortableVertexDeclaration
}
};
+namespace std
+{
+
+template <>
+struct hash<PortableVertexDeclaration>
+{
+ size_t operator()(const PortableVertexDeclaration& decl) const
+ {
+ return HashFletcher((u8 *) &decl, sizeof(decl));
+ }
+};
+
+}
+
// The implementation of this class is specific for GL/DX, so NativeVertexFormat.cpp
// is in the respective backend, not here in VideoCommon.