diff options
| author | 2021-03-18 02:53:57 -0400 | |
|---|---|---|
| committer | 2021-07-22 21:51:23 -0400 | |
| commit | 72990df7bad1c81d6ebc51179d34e1bfc71e0caf (patch) | |
| tree | fd681d1875c91bd823841d8ca76138f729338526 /src/shader_recompiler/frontend/ir | |
| parent | shader: Implement CSET and CSETP (diff) | |
| download | yuzu-72990df7bad1c81d6ebc51179d34e1bfc71e0caf.tar.gz yuzu-72990df7bad1c81d6ebc51179d34e1bfc71e0caf.tar.xz yuzu-72990df7bad1c81d6ebc51179d34e1bfc71e0caf.zip | |
shader: Implement DADD
Diffstat (limited to 'src/shader_recompiler/frontend/ir')
| -rw-r--r-- | src/shader_recompiler/frontend/ir/value.cpp | 8 | ||||
| -rw-r--r-- | src/shader_recompiler/frontend/ir/value.h | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/shader_recompiler/frontend/ir/value.cpp b/src/shader_recompiler/frontend/ir/value.cpp index 791ba2690..e8e4662e7 100644 --- a/src/shader_recompiler/frontend/ir/value.cpp +++ b/src/shader_recompiler/frontend/ir/value.cpp | |||
| @@ -153,6 +153,14 @@ u64 Value::U64() const { | |||
| 153 | return imm_u64; | 153 | return imm_u64; |
| 154 | } | 154 | } |
| 155 | 155 | ||
| 156 | f64 Value::F64() const { | ||
| 157 | if (IsIdentity()) { | ||
| 158 | return inst->Arg(0).F64(); | ||
| 159 | } | ||
| 160 | ValidateAccess(Type::F64); | ||
| 161 | return imm_f64; | ||
| 162 | } | ||
| 163 | |||
| 156 | bool Value::operator==(const Value& other) const { | 164 | bool Value::operator==(const Value& other) const { |
| 157 | if (type != other.type) { | 165 | if (type != other.type) { |
| 158 | return false; | 166 | return false; |
diff --git a/src/shader_recompiler/frontend/ir/value.h b/src/shader_recompiler/frontend/ir/value.h index 3602883d6..b27601e70 100644 --- a/src/shader_recompiler/frontend/ir/value.h +++ b/src/shader_recompiler/frontend/ir/value.h | |||
| @@ -52,6 +52,7 @@ public: | |||
| 52 | [[nodiscard]] u32 U32() const; | 52 | [[nodiscard]] u32 U32() const; |
| 53 | [[nodiscard]] f32 F32() const; | 53 | [[nodiscard]] f32 F32() const; |
| 54 | [[nodiscard]] u64 U64() const; | 54 | [[nodiscard]] u64 U64() const; |
| 55 | [[nodiscard]] f64 F64() const; | ||
| 55 | 56 | ||
| 56 | [[nodiscard]] bool operator==(const Value& other) const; | 57 | [[nodiscard]] bool operator==(const Value& other) const; |
| 57 | [[nodiscard]] bool operator!=(const Value& other) const; | 58 | [[nodiscard]] bool operator!=(const Value& other) const; |