Browse Source
Merge pull request #1380 from lioncash/const
shader_bytecode: Make operator== and operator!= of IpaMode const qualified
pull/15/merge
bunnei
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
19 additions and
8 deletions
-
src/video_core/engines/shader_bytecode.h
|
|
@ -5,9 +5,8 @@ |
|
|
#pragma once |
|
|
#pragma once |
|
|
|
|
|
|
|
|
#include <bitset> |
|
|
#include <bitset> |
|
|
#include <cstring> |
|
|
|
|
|
#include <map> |
|
|
|
|
|
#include <string> |
|
|
#include <string> |
|
|
|
|
|
#include <tuple> |
|
|
#include <vector> |
|
|
#include <vector> |
|
|
|
|
|
|
|
|
#include <boost/optional.hpp> |
|
|
#include <boost/optional.hpp> |
|
|
@ -315,17 +314,29 @@ enum class TextureMiscMode : u64 { |
|
|
PTP, |
|
|
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 { |
|
|
struct IpaMode { |
|
|
IpaInterpMode interpolation_mode; |
|
|
IpaInterpMode interpolation_mode; |
|
|
IpaSampleMode sampling_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); |
|
|
} |
|
|
} |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
|