summaryrefslogtreecommitdiffstats
path: root/src/shader_recompiler/frontend/ir/value.cpp
diff options
context:
space:
mode:
authorameerj <52414509+ameerj@users.noreply.github.com>2021-03-18 07:53:57 +0100
committerameerj <52414509+ameerj@users.noreply.github.com>2021-07-23 03:51:23 +0200
commit72990df7bad1c81d6ebc51179d34e1bfc71e0caf (patch)
treefd681d1875c91bd823841d8ca76138f729338526 /src/shader_recompiler/frontend/ir/value.cpp
parentshader: Implement CSET and CSETP (diff)
downloadyuzu-72990df7bad1c81d6ebc51179d34e1bfc71e0caf.tar
yuzu-72990df7bad1c81d6ebc51179d34e1bfc71e0caf.tar.gz
yuzu-72990df7bad1c81d6ebc51179d34e1bfc71e0caf.tar.bz2
yuzu-72990df7bad1c81d6ebc51179d34e1bfc71e0caf.tar.lz
yuzu-72990df7bad1c81d6ebc51179d34e1bfc71e0caf.tar.xz
yuzu-72990df7bad1c81d6ebc51179d34e1bfc71e0caf.tar.zst
yuzu-72990df7bad1c81d6ebc51179d34e1bfc71e0caf.zip
Diffstat (limited to 'src/shader_recompiler/frontend/ir/value.cpp')
-rw-r--r--src/shader_recompiler/frontend/ir/value.cpp8
1 files changed, 8 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 {
return imm_u64;
}
+f64 Value::F64() const {
+ if (IsIdentity()) {
+ return inst->Arg(0).F64();
+ }
+ ValidateAccess(Type::F64);
+ return imm_f64;
+}
+
bool Value::operator==(const Value& other) const {
if (type != other.type) {
return false;