diff options
| author | 2021-03-30 03:19:50 -0300 | |
|---|---|---|
| committer | 2021-07-22 21:51:25 -0400 | |
| commit | 514a6b07eedace58b4a0c95282bdfc729623d1d9 (patch) | |
| tree | b384c882fa5e24ce9a0a2d287076d23949b3e266 /src/shader_recompiler/frontend/ir/value.cpp | |
| parent | shader: Fix indirect branches to scheduler instructions (diff) | |
| download | yuzu-514a6b07eedace58b4a0c95282bdfc729623d1d9.tar.gz yuzu-514a6b07eedace58b4a0c95282bdfc729623d1d9.tar.xz yuzu-514a6b07eedace58b4a0c95282bdfc729623d1d9.zip | |
shader: Store type of phi nodes in flags
This is needed because pseudo-instructions where invalidated.
Diffstat (limited to '')
| -rw-r--r-- | src/shader_recompiler/frontend/ir/value.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/shader_recompiler/frontend/ir/value.cpp b/src/shader_recompiler/frontend/ir/value.cpp index e8e4662e7..837c1b487 100644 --- a/src/shader_recompiler/frontend/ir/value.cpp +++ b/src/shader_recompiler/frontend/ir/value.cpp | |||
| @@ -56,7 +56,11 @@ bool Value::IsLabel() const noexcept { | |||
| 56 | } | 56 | } |
| 57 | 57 | ||
| 58 | IR::Type Value::Type() const noexcept { | 58 | IR::Type Value::Type() const noexcept { |
| 59 | if (IsIdentity() || IsPhi()) { | 59 | if (IsPhi()) { |
| 60 | // The type of a phi node is stored in its flags | ||
| 61 | return inst->Flags<IR::Type>(); | ||
| 62 | } | ||
| 63 | if (IsIdentity()) { | ||
| 60 | return inst->Arg(0).Type(); | 64 | return inst->Arg(0).Type(); |
| 61 | } | 65 | } |
| 62 | if (type == Type::Opaque) { | 66 | if (type == Type::Opaque) { |