summaryrefslogtreecommitdiff
path: root/src/shader_recompiler/backend/spirv/emit_spirv.cpp
diff options
context:
space:
mode:
authorGravatar ReinUsesLisp2021-03-30 03:19:50 -0300
committerGravatar ameerj2021-07-22 21:51:25 -0400
commit514a6b07eedace58b4a0c95282bdfc729623d1d9 (patch)
treeb384c882fa5e24ce9a0a2d287076d23949b3e266 /src/shader_recompiler/backend/spirv/emit_spirv.cpp
parentshader: Fix indirect branches to scheduler instructions (diff)
downloadyuzu-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 'src/shader_recompiler/backend/spirv/emit_spirv.cpp')
-rw-r--r--src/shader_recompiler/backend/spirv/emit_spirv.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/shader_recompiler/backend/spirv/emit_spirv.cpp b/src/shader_recompiler/backend/spirv/emit_spirv.cpp
index 2e7e6bb0c..6389d80bf 100644
--- a/src/shader_recompiler/backend/spirv/emit_spirv.cpp
+++ b/src/shader_recompiler/backend/spirv/emit_spirv.cpp
@@ -288,7 +288,8 @@ Id EmitPhi(EmitContext& ctx, IR::Inst* inst) {
288 operands.push_back(PhiArgDef(ctx, inst, index)); 288 operands.push_back(PhiArgDef(ctx, inst, index));
289 operands.push_back(inst->PhiBlock(index)->Definition<Id>()); 289 operands.push_back(inst->PhiBlock(index)->Definition<Id>());
290 } 290 }
291 const Id result_type{TypeId(ctx, inst->Arg(0).Type())}; 291 // The type of a phi instruction is stored in its flags
292 const Id result_type{TypeId(ctx, inst->Flags<IR::Type>())};
292 return ctx.OpPhi(result_type, std::span(operands.data(), operands.size())); 293 return ctx.OpPhi(result_type, std::span(operands.data(), operands.size()));
293} 294}
294 295