diff options
| author | Rodrigo Locatti <reinuseslisp@airmail.cc> | 2019-10-26 16:56:13 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-10-26 16:56:13 -0300 |
| commit | 26f3e18c5cb882d48af702aa33519f4a2c74fa75 (patch) | |
| tree | f17b70de1e1bca10e67a4f1076691a580f717f56 /src/video_core/shader/expr.h | |
| parent | a0d79085c436623252f06fe735900fb9140d5285 (diff) | |
| parent | be856a38d6b0c7c90c861baf3204ac48a108f3d2 (diff) | |
Merge pull request #2976 from FernandoS27/cache-fast-brx-rebased
Implement Fast BRX, fix TXQ and addapt the Shader Cache for it
Diffstat (limited to 'src/video_core/shader/expr.h')
| -rw-r--r-- | src/video_core/shader/expr.h | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/src/video_core/shader/expr.h b/src/video_core/shader/expr.h index d3dcd00ec..4e8264367 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,22 @@ 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; + } + + bool operator!=(const ExprGprEqual& b) const { + return !operator==(b); + } + + u32 gpr; + u32 value; +}; + template <typename T, typename... Args> Expr MakeExpr(Args&&... args) { static_assert(std::is_convertible_v<T, ExprData>); |
