summaryrefslogtreecommitdiffstats
path: root/src/shader_recompiler/frontend/ir/value.cpp
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2021-04-16 03:46:11 +0200
committerameerj <52414509+ameerj@users.noreply.github.com>2021-07-23 03:51:27 +0200
commit183855e396cc6918d36fbf3e38ea426e934b4e3e (patch)
treea665794753520c09a1d34d8a086352894ec1cb72 /src/shader_recompiler/frontend/ir/value.cpp
parentshader: Mark atomic instructions as writes (diff)
downloadyuzu-183855e396cc6918d36fbf3e38ea426e934b4e3e.tar
yuzu-183855e396cc6918d36fbf3e38ea426e934b4e3e.tar.gz
yuzu-183855e396cc6918d36fbf3e38ea426e934b4e3e.tar.bz2
yuzu-183855e396cc6918d36fbf3e38ea426e934b4e3e.tar.lz
yuzu-183855e396cc6918d36fbf3e38ea426e934b4e3e.tar.xz
yuzu-183855e396cc6918d36fbf3e38ea426e934b4e3e.tar.zst
yuzu-183855e396cc6918d36fbf3e38ea426e934b4e3e.zip
Diffstat (limited to '')
-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} {}
Value::Value(IR::Attribute value) noexcept : type{Type::Attribute}, attribute{value} {}
+Value::Value(IR::Patch value) noexcept : type{Type::Patch}, patch{value} {}
+
Value::Value(bool value) noexcept : type{Type::U1}, imm_u1{value} {}
Value::Value(u8 value) noexcept : type{Type::U8}, imm_u8{value} {}
@@ -109,6 +111,11 @@ IR::Attribute Value::Attribute() const {
return attribute;
}
+IR::Patch Value::Patch() const {
+ ValidateAccess(Type::Patch);
+ return patch;
+}
+
bool Value::U1() const {
if (IsIdentity()) {
return inst->Arg(0).U1();
@@ -182,6 +189,8 @@ bool Value::operator==(const Value& other) const {
return pred == other.pred;
case Type::Attribute:
return attribute == other.attribute;
+ case Type::Patch:
+ return patch == other.patch;
case Type::U1:
return imm_u1 == other.imm_u1;
case Type::U8: