summaryrefslogtreecommitdiff
path: root/src/shader_recompiler/frontend/ir/value.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/shader_recompiler/frontend/ir/value.cpp')
-rw-r--r--src/shader_recompiler/frontend/ir/value.cpp9
1 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 1e7ffb86d..bf5f8c0c2 100644
--- a/src/shader_recompiler/frontend/ir/value.cpp
+++ b/src/shader_recompiler/frontend/ir/value.cpp
@@ -18,6 +18,8 @@ Value::Value(IR::Pred value) noexcept : type{Type::Pred}, pred{value} {}
18 18
19Value::Value(IR::Attribute value) noexcept : type{Type::Attribute}, attribute{value} {} 19Value::Value(IR::Attribute value) noexcept : type{Type::Attribute}, attribute{value} {}
20 20
21Value::Value(IR::Patch value) noexcept : type{Type::Patch}, patch{value} {}
22
21Value::Value(bool value) noexcept : type{Type::U1}, imm_u1{value} {} 23Value::Value(bool value) noexcept : type{Type::U1}, imm_u1{value} {}
22 24
23Value::Value(u8 value) noexcept : type{Type::U8}, imm_u8{value} {} 25Value::Value(u8 value) noexcept : type{Type::U8}, imm_u8{value} {}
@@ -109,6 +111,11 @@ IR::Attribute Value::Attribute() const {
109 return attribute; 111 return attribute;
110} 112}
111 113
114IR::Patch Value::Patch() const {
115 ValidateAccess(Type::Patch);
116 return patch;
117}
118
112bool Value::U1() const { 119bool Value::U1() const {
113 if (IsIdentity()) { 120 if (IsIdentity()) {
114 return inst->Arg(0).U1(); 121 return inst->Arg(0).U1();
@@ -182,6 +189,8 @@ bool Value::operator==(const Value& other) const {
182 return pred == other.pred; 189 return pred == other.pred;
183 case Type::Attribute: 190 case Type::Attribute:
184 return attribute == other.attribute; 191 return attribute == other.attribute;
192 case Type::Patch:
193 return patch == other.patch;
185 case Type::U1: 194 case Type::U1:
186 return imm_u1 == other.imm_u1; 195 return imm_u1 == other.imm_u1;
187 case Type::U8: 196 case Type::U8: