From 194579bc4f409ba9a232afc54f19d0610102954e Mon Sep 17 00:00:00 2001
From: Fernando Sahmkow <fsahmkow27@gmail.com>
Date: Mon, 1 Nov 2021 22:26:17 +0100
Subject: ShaderCache: Fix Phi Nodes Type on OGL.

---
 src/shader_recompiler/frontend/ir/microinstruction.cpp | 4 ++++
 1 file changed, 4 insertions(+)

(limited to 'src/shader_recompiler/frontend/ir/microinstruction.cpp')

diff --git a/src/shader_recompiler/frontend/ir/microinstruction.cpp b/src/shader_recompiler/frontend/ir/microinstruction.cpp
index e563b40225..30b470bdd3 100644
--- a/src/shader_recompiler/frontend/ir/microinstruction.cpp
+++ b/src/shader_recompiler/frontend/ir/microinstruction.cpp
@@ -254,6 +254,10 @@ Inst* Inst::GetAssociatedPseudoOperation(IR::Opcode opcode) {
 }
 
 IR::Type Inst::Type() const {
+    if (op == IR::Opcode::Phi) {
+        // The type of a phi node is stored in its flags
+        return Flags<IR::Type>();
+    }
     return TypeOf(op);
 }
 
-- 
cgit v1.2.3-70-g09d2