summaryrefslogtreecommitdiffstats
path: root/src/video_core/shader/expr.h
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2019-09-24 04:55:25 +0200
committerFernandoS27 <fsahmkow27@gmail.com>2019-10-25 15:01:30 +0200
commit8909f52166bf9c27d52b5a722efbd46d1a11e876 (patch)
tree2e21bbc3c3f5422325d8003d72cdb4bb120a26e5 /src/video_core/shader/expr.h
parentShader_Cache: setup connection of ConstBufferLocker (diff)
downloadyuzu-8909f52166bf9c27d52b5a722efbd46d1a11e876.tar
yuzu-8909f52166bf9c27d52b5a722efbd46d1a11e876.tar.gz
yuzu-8909f52166bf9c27d52b5a722efbd46d1a11e876.tar.bz2
yuzu-8909f52166bf9c27d52b5a722efbd46d1a11e876.tar.lz
yuzu-8909f52166bf9c27d52b5a722efbd46d1a11e876.tar.xz
yuzu-8909f52166bf9c27d52b5a722efbd46d1a11e876.tar.zst
yuzu-8909f52166bf9c27d52b5a722efbd46d1a11e876.zip
Diffstat (limited to 'src/video_core/shader/expr.h')
-rw-r--r--src/video_core/shader/expr.h17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/video_core/shader/expr.h b/src/video_core/shader/expr.h
index d3dcd00ec..e41d23e93 100644
--- a/src/video_core/shader/expr.h
+++ b/src/video_core/shader/expr.h
@@ -17,13 +17,14 @@ using Tegra::Shader::Pred;
class ExprAnd;
class ExprBoolean;
class ExprCondCode;
+class ExprGprEqual;
class ExprNot;
class ExprOr;
class ExprPredicate;
class ExprVar;
-using ExprData =
- std::variant<ExprVar, ExprCondCode, ExprPredicate, ExprNot, ExprOr, ExprAnd, ExprBoolean>;
+using ExprData = std::variant<ExprVar, ExprCondCode, ExprPredicate, ExprNot, ExprOr, ExprAnd,
+ ExprBoolean, ExprGprEqual>;
using Expr = std::shared_ptr<ExprData>;
class ExprAnd final {
@@ -118,6 +119,18 @@ public:
bool value;
};
+class ExprGprEqual final {
+public:
+ ExprGprEqual(u32 gpr, u32 value) : gpr{gpr}, value{value} {}
+
+ bool operator==(const ExprGprEqual& b) const {
+ return gpr == b.gpr && value == b.value;
+ }
+
+ u32 gpr;
+ u32 value;
+};
+
template <typename T, typename... Args>
Expr MakeExpr(Args&&... args) {
static_assert(std::is_convertible_v<T, ExprData>);