diff options
| author | 2019-10-26 16:56:13 -0300 | |
|---|---|---|
| committer | 2019-10-26 16:56:13 -0300 | |
| commit | 26f3e18c5cb882d48af702aa33519f4a2c74fa75 (patch) | |
| tree | f17b70de1e1bca10e67a4f1076691a580f717f56 /src/common | |
| parent | Merge pull request #3027 from lioncash/lookup (diff) | |
| parent | Shader_IR: Address Feedback. (diff) | |
| download | yuzu-26f3e18c5cb882d48af702aa33519f4a2c74fa75.tar.gz yuzu-26f3e18c5cb882d48af702aa33519f4a2c74fa75.tar.xz yuzu-26f3e18c5cb882d48af702aa33519f4a2c74fa75.zip | |
Merge pull request #2976 from FernandoS27/cache-fast-brx-rebased
Implement Fast BRX, fix TXQ and addapt the Shader Cache for it
Diffstat (limited to 'src/common')
| -rw-r--r-- | src/common/CMakeLists.txt | 6 | ||||
| -rw-r--r-- | src/common/hash.h | 11 |
2 files changed, 15 insertions, 2 deletions
diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index 5b51fcafa..9c6f1c07c 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt | |||
| @@ -74,10 +74,12 @@ add_custom_command(OUTPUT scm_rev.cpp | |||
| 74 | "${VIDEO_CORE}/shader/decode/xmad.cpp" | 74 | "${VIDEO_CORE}/shader/decode/xmad.cpp" |
| 75 | "${VIDEO_CORE}/shader/ast.cpp" | 75 | "${VIDEO_CORE}/shader/ast.cpp" |
| 76 | "${VIDEO_CORE}/shader/ast.h" | 76 | "${VIDEO_CORE}/shader/ast.h" |
| 77 | "${VIDEO_CORE}/shader/control_flow.cpp" | ||
| 78 | "${VIDEO_CORE}/shader/control_flow.h" | ||
| 79 | "${VIDEO_CORE}/shader/compiler_settings.cpp" | 77 | "${VIDEO_CORE}/shader/compiler_settings.cpp" |
| 80 | "${VIDEO_CORE}/shader/compiler_settings.h" | 78 | "${VIDEO_CORE}/shader/compiler_settings.h" |
| 79 | "${VIDEO_CORE}/shader/const_buffer_locker.cpp" | ||
| 80 | "${VIDEO_CORE}/shader/const_buffer_locker.h" | ||
| 81 | "${VIDEO_CORE}/shader/control_flow.cpp" | ||
| 82 | "${VIDEO_CORE}/shader/control_flow.h" | ||
| 81 | "${VIDEO_CORE}/shader/decode.cpp" | 83 | "${VIDEO_CORE}/shader/decode.cpp" |
| 82 | "${VIDEO_CORE}/shader/expr.cpp" | 84 | "${VIDEO_CORE}/shader/expr.cpp" |
| 83 | "${VIDEO_CORE}/shader/expr.h" | 85 | "${VIDEO_CORE}/shader/expr.h" |
diff --git a/src/common/hash.h b/src/common/hash.h index 40194d1ee..ebd4125e2 100644 --- a/src/common/hash.h +++ b/src/common/hash.h | |||
| @@ -6,6 +6,8 @@ | |||
| 6 | 6 | ||
| 7 | #include <cstddef> | 7 | #include <cstddef> |
| 8 | #include <cstring> | 8 | #include <cstring> |
| 9 | #include <utility> | ||
| 10 | #include <boost/functional/hash.hpp> | ||
| 9 | #include "common/cityhash.h" | 11 | #include "common/cityhash.h" |
| 10 | #include "common/common_types.h" | 12 | #include "common/common_types.h" |
| 11 | 13 | ||
| @@ -68,4 +70,13 @@ struct HashableStruct { | |||
| 68 | } | 70 | } |
| 69 | }; | 71 | }; |
| 70 | 72 | ||
| 73 | struct PairHash { | ||
| 74 | template <class T1, class T2> | ||
| 75 | std::size_t operator()(const std::pair<T1, T2>& pair) const noexcept { | ||
| 76 | std::size_t seed = std::hash<T1>()(pair.first); | ||
| 77 | boost::hash_combine(seed, std::hash<T2>()(pair.second)); | ||
| 78 | return seed; | ||
| 79 | } | ||
| 80 | }; | ||
| 81 | |||
| 71 | } // namespace Common | 82 | } // namespace Common |