summaryrefslogtreecommitdiff
path: root/src/shader_recompiler/frontend/ir/value.h
diff options
context:
space:
mode:
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:
28 explicit Value(u8 value) noexcept; 28 explicit Value(u8 value) noexcept;
29 explicit Value(u16 value) noexcept; 29 explicit Value(u16 value) noexcept;
30 explicit Value(u32 value) noexcept; 30 explicit Value(u32 value) noexcept;
31 explicit Value(f32 value) noexcept;
31 explicit Value(u64 value) noexcept; 32 explicit Value(u64 value) noexcept;
33 explicit Value(f64 value) noexcept;
32 34
33 [[nodiscard]] bool IsIdentity() const noexcept; 35 [[nodiscard]] bool IsIdentity() const noexcept;
34 [[nodiscard]] bool IsEmpty() const noexcept; 36 [[nodiscard]] bool IsEmpty() const noexcept;
@@ -46,6 +48,7 @@ public:
46 [[nodiscard]] u8 U8() const; 48 [[nodiscard]] u8 U8() const;
47 [[nodiscard]] u16 U16() const; 49 [[nodiscard]] u16 U16() const;
48 [[nodiscard]] u32 U32() const; 50 [[nodiscard]] u32 U32() const;
51 [[nodiscard]] f32 F32() const;
49 [[nodiscard]] u64 U64() const; 52 [[nodiscard]] u64 U64() const;
50 53
51 [[nodiscard]] bool operator==(const Value& other) const; 54 [[nodiscard]] bool operator==(const Value& other) const;
@@ -65,7 +68,9 @@ private:
65 u8 imm_u8; 68 u8 imm_u8;
66 u16 imm_u16; 69 u16 imm_u16;
67 u32 imm_u32; 70 u32 imm_u32;
71 f32 imm_f32;
68 u64 imm_u64; 72 u64 imm_u64;
73 f64 imm_f64;
69 }; 74 };
70}; 75};
71 76
@@ -93,8 +98,13 @@ using U8 = TypedValue<Type::U8>;
93using U16 = TypedValue<Type::U16>; 98using U16 = TypedValue<Type::U16>;
94using U32 = TypedValue<Type::U32>; 99using U32 = TypedValue<Type::U32>;
95using U64 = TypedValue<Type::U64>; 100using U64 = TypedValue<Type::U64>;
101using F16 = TypedValue<Type::F16>;
102using F32 = TypedValue<Type::F32>;
103using F64 = TypedValue<Type::F64>;
96using U32U64 = TypedValue<Type::U32 | Type::U64>; 104using U32U64 = TypedValue<Type::U32 | Type::U64>;
105using F32F64 = TypedValue<Type::F32 | Type::F64>;
97using U16U32U64 = TypedValue<Type::U16 | Type::U32 | Type::U64>; 106using U16U32U64 = TypedValue<Type::U16 | Type::U32 | Type::U64>;
107using F16F32F64 = TypedValue<Type::F16 | Type::F32 | Type::F64>;
98using UAny = TypedValue<Type::U8 | Type::U16 | Type::U32 | Type::U64>; 108using UAny = TypedValue<Type::U8 | Type::U16 | Type::U32 | Type::U64>;
99 109
100} // namespace Shader::IR 110} // namespace Shader::IR