diff options
author | bunnei <bunneidev@gmail.com> | 2018-09-22 07:37:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-22 07:37:36 +0200 |
commit | fb9f273e90bdd113ed4f0e57c9ef5adad8f25a3f (patch) | |
tree | 12f41422c8cb4e8ed94de474af4ef9806dc8ebb4 | |
parent | Merge pull request #1382 from lioncash/inc (diff) | |
parent | shader_bytecode: Lay out the Ipa-related enums better (diff) | |
download | yuzu-fb9f273e90bdd113ed4f0e57c9ef5adad8f25a3f.tar yuzu-fb9f273e90bdd113ed4f0e57c9ef5adad8f25a3f.tar.gz yuzu-fb9f273e90bdd113ed4f0e57c9ef5adad8f25a3f.tar.bz2 yuzu-fb9f273e90bdd113ed4f0e57c9ef5adad8f25a3f.tar.lz yuzu-fb9f273e90bdd113ed4f0e57c9ef5adad8f25a3f.tar.xz yuzu-fb9f273e90bdd113ed4f0e57c9ef5adad8f25a3f.tar.zst yuzu-fb9f273e90bdd113ed4f0e57c9ef5adad8f25a3f.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/engines/shader_bytecode.h | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/src/video_core/engines/shader_bytecode.h b/src/video_core/engines/shader_bytecode.h index 7e1de0fa1..b1f137b9c 100644 --- a/src/video_core/engines/shader_bytecode.h +++ b/src/video_core/engines/shader_bytecode.h @@ -5,9 +5,8 @@ #pragma once #include <bitset> -#include <cstring> -#include <map> #include <string> +#include <tuple> #include <vector> #include <boost/optional.hpp> @@ -315,17 +314,29 @@ enum class TextureMiscMode : u64 { PTP, }; -enum class IpaInterpMode : u64 { Linear = 0, Perspective = 1, Flat = 2, Sc = 3 }; -enum class IpaSampleMode : u64 { Default = 0, Centroid = 1, Offset = 2 }; +enum class IpaInterpMode : u64 { + Linear = 0, + Perspective = 1, + Flat = 2, + Sc = 3, +}; + +enum class IpaSampleMode : u64 { + Default = 0, + Centroid = 1, + Offset = 2, +}; struct IpaMode { IpaInterpMode interpolation_mode; IpaSampleMode sampling_mode; - inline bool operator==(const IpaMode& a) { - return (a.interpolation_mode == interpolation_mode) && (a.sampling_mode == sampling_mode); + + bool operator==(const IpaMode& a) const { + return std::tie(interpolation_mode, sampling_mode) == + std::tie(a.interpolation_mode, a.sampling_mode); } - inline bool operator!=(const IpaMode& a) { - return !((*this) == a); + bool operator!=(const IpaMode& a) const { + return !operator==(a); } }; |