summaryrefslogtreecommitdiffstats
path: root/src/shader_recompiler/frontend/ir/value.h
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2021-02-05 23:19:36 +0100
committerameerj <52414509+ameerj@users.noreply.github.com>2021-07-23 03:51:21 +0200
commitbe94ee88d227d0d3dbeabe9ade98bacd910c7a7e (patch)
tree68a2043d48b8d1ecb7df23d03c1f92f277c70f9a /src/shader_recompiler/frontend/ir/value.h
parentshader: Remove illegal character in SSA pass (diff)
downloadyuzu-be94ee88d227d0d3dbeabe9ade98bacd910c7a7e.tar
yuzu-be94ee88d227d0d3dbeabe9ade98bacd910c7a7e.tar.gz
yuzu-be94ee88d227d0d3dbeabe9ade98bacd910c7a7e.tar.bz2
yuzu-be94ee88d227d0d3dbeabe9ade98bacd910c7a7e.tar.lz
yuzu-be94ee88d227d0d3dbeabe9ade98bacd910c7a7e.tar.xz
yuzu-be94ee88d227d0d3dbeabe9ade98bacd910c7a7e.tar.zst
yuzu-be94ee88d227d0d3dbeabe9ade98bacd910c7a7e.zip
Diffstat (limited to 'src/shader_recompiler/frontend/ir/value.h')
-rw-r--r--src/shader_recompiler/frontend/ir/value.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/shader_recompiler/frontend/ir/value.h b/src/shader_recompiler/frontend/ir/value.h
index 31f831794..2f3688c73 100644
--- a/src/shader_recompiler/frontend/ir/value.h
+++ b/src/shader_recompiler/frontend/ir/value.h
@@ -28,7 +28,9 @@ public:
explicit Value(u8 value) noexcept;
explicit Value(u16 value) noexcept;
explicit Value(u32 value) noexcept;
+ explicit Value(f32 value) noexcept;
explicit Value(u64 value) noexcept;
+ explicit Value(f64 value) noexcept;
[[nodiscard]] bool IsIdentity() const noexcept;
[[nodiscard]] bool IsEmpty() const noexcept;
@@ -46,6 +48,7 @@ public:
[[nodiscard]] u8 U8() const;
[[nodiscard]] u16 U16() const;
[[nodiscard]] u32 U32() const;
+ [[nodiscard]] f32 F32() const;
[[nodiscard]] u64 U64() const;
[[nodiscard]] bool operator==(const Value& other) const;
@@ -65,7 +68,9 @@ private:
u8 imm_u8;
u16 imm_u16;
u32 imm_u32;
+ f32 imm_f32;
u64 imm_u64;
+ f64 imm_f64;
};
};
@@ -93,8 +98,13 @@ using U8 = TypedValue<Type::U8>;
using U16 = TypedValue<Type::U16>;
using U32 = TypedValue<Type::U32>;
using U64 = TypedValue<Type::U64>;
+using F16 = TypedValue<Type::F16>;
+using F32 = TypedValue<Type::F32>;
+using F64 = TypedValue<Type::F64>;
using U32U64 = TypedValue<Type::U32 | Type::U64>;
+using F32F64 = TypedValue<Type::F32 | Type::F64>;
using U16U32U64 = TypedValue<Type::U16 | Type::U32 | Type::U64>;
+using F16F32F64 = TypedValue<Type::F16 | Type::F32 | Type::F64>;
using UAny = TypedValue<Type::U8 | Type::U16 | Type::U32 | Type::U64>;
} // namespace Shader::IR