diff options
Diffstat (limited to 'src/shader_recompiler/ir_opt/verification_pass.cpp')
| -rw-r--r-- | src/shader_recompiler/ir_opt/verification_pass.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/shader_recompiler/ir_opt/verification_pass.cpp b/src/shader_recompiler/ir_opt/verification_pass.cpp index 4080b37cc..dbec96d84 100644 --- a/src/shader_recompiler/ir_opt/verification_pass.cpp +++ b/src/shader_recompiler/ir_opt/verification_pass.cpp | |||
| @@ -14,14 +14,14 @@ namespace Shader::Optimization { | |||
| 14 | static void ValidateTypes(const IR::Program& program) { | 14 | static void ValidateTypes(const IR::Program& program) { |
| 15 | for (const auto& block : program.blocks) { | 15 | for (const auto& block : program.blocks) { |
| 16 | for (const IR::Inst& inst : *block) { | 16 | for (const IR::Inst& inst : *block) { |
| 17 | if (inst.Opcode() == IR::Opcode::Phi) { | 17 | if (inst.GetOpcode() == IR::Opcode::Phi) { |
| 18 | // Skip validation on phi nodes | 18 | // Skip validation on phi nodes |
| 19 | continue; | 19 | continue; |
| 20 | } | 20 | } |
| 21 | const size_t num_args{inst.NumArgs()}; | 21 | const size_t num_args{inst.NumArgs()}; |
| 22 | for (size_t i = 0; i < num_args; ++i) { | 22 | for (size_t i = 0; i < num_args; ++i) { |
| 23 | const IR::Type t1{inst.Arg(i).Type()}; | 23 | const IR::Type t1{inst.Arg(i).Type()}; |
| 24 | const IR::Type t2{IR::ArgTypeOf(inst.Opcode(), i)}; | 24 | const IR::Type t2{IR::ArgTypeOf(inst.GetOpcode(), i)}; |
| 25 | if (!IR::AreTypesCompatible(t1, t2)) { | 25 | if (!IR::AreTypesCompatible(t1, t2)) { |
| 26 | throw LogicError("Invalid types in block:\n{}", IR::DumpBlock(*block)); | 26 | throw LogicError("Invalid types in block:\n{}", IR::DumpBlock(*block)); |
| 27 | } | 27 | } |