diff options
| author | 2018-09-04 23:09:24 -0400 | |
|---|---|---|
| committer | 2018-09-05 20:15:47 -0400 | |
| commit | e63b229f4a0704b37e0a6b57dde76deb2f151c81 (patch) | |
| tree | 500d239fea733b32022a123c1b5be9ef68ed0b2c /src/video_core/engines | |
| parent | Merge pull request #1240 from degasus/optimizations (diff) | |
| download | yuzu-e63b229f4a0704b37e0a6b57dde76deb2f151c81.tar.gz yuzu-e63b229f4a0704b37e0a6b57dde76deb2f151c81.tar.xz yuzu-e63b229f4a0704b37e0a6b57dde76deb2f151c81.zip | |
Implemented IPA Properly
Diffstat (limited to 'src/video_core/engines')
| -rw-r--r-- | src/video_core/engines/shader_bytecode.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/video_core/engines/shader_bytecode.h b/src/video_core/engines/shader_bytecode.h index a7daea766..d2388673e 100644 --- a/src/video_core/engines/shader_bytecode.h +++ b/src/video_core/engines/shader_bytecode.h | |||
| @@ -76,6 +76,7 @@ union Attribute { | |||
| 76 | Position = 7, | 76 | Position = 7, |
| 77 | Attribute_0 = 8, | 77 | Attribute_0 = 8, |
| 78 | Attribute_31 = 39, | 78 | Attribute_31 = 39, |
| 79 | PointCoord = 46, | ||
| 79 | // This attribute contains a tuple of (~, ~, InstanceId, VertexId) when inside a vertex | 80 | // This attribute contains a tuple of (~, ~, InstanceId, VertexId) when inside a vertex |
| 80 | // shader, and a tuple of (TessCoord.x, TessCoord.y, TessCoord.z, ~) when inside a Tess Eval | 81 | // shader, and a tuple of (TessCoord.x, TessCoord.y, TessCoord.z, ~) when inside a Tess Eval |
| 81 | // shader. | 82 | // shader. |
| @@ -246,6 +247,17 @@ enum class TextureType : u64 { | |||
| 246 | enum class IpaInterpMode : u64 { Linear = 0, Perspective = 1, Flat = 2, Sc = 3 }; | 247 | enum class IpaInterpMode : u64 { Linear = 0, Perspective = 1, Flat = 2, Sc = 3 }; |
| 247 | enum class IpaSampleMode : u64 { Default = 0, Centroid = 1, Offset = 2 }; | 248 | enum class IpaSampleMode : u64 { Default = 0, Centroid = 1, Offset = 2 }; |
| 248 | 249 | ||
| 250 | struct IpaMode { | ||
| 251 | IpaInterpMode interpolation_mode; | ||
| 252 | IpaSampleMode sampling_mode; | ||
| 253 | inline bool operator==(const IpaMode& a) { | ||
| 254 | return (a.interpolation_mode == interpolation_mode) && (a.sampling_mode == sampling_mode); | ||
| 255 | } | ||
| 256 | inline bool operator!=(const IpaMode& a) { | ||
| 257 | return !((*this) == a); | ||
| 258 | } | ||
| 259 | }; | ||
| 260 | |||
| 249 | union Instruction { | 261 | union Instruction { |
| 250 | Instruction& operator=(const Instruction& instr) { | 262 | Instruction& operator=(const Instruction& instr) { |
| 251 | value = instr.value; | 263 | value = instr.value; |