From cdefdb4b0f94613c2b41757fb33ae155efa9a205 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Mon, 3 Oct 2022 23:43:33 +0300 Subject: [PATCH 1/1] Handle OpPhi when specializing SPIR-V modules --- source/core/module.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/source/core/module.cpp b/source/core/module.cpp index 5a736914..04a37fcc 100644 --- a/source/core/module.cpp +++ b/source/core/module.cpp @@ -38,6 +38,8 @@ enum SpirVConstants OP_ACCESS_CHAIN = 65, OP_DECORATE = 71, OP_MEMBER_DECORATE = 72, + OP_COPY_OBJECT = 83, + OP_PHI = 245, OP_SELECTION_MERGE = 247, OP_LABEL = 248, OP_BRANCH = 249, @@ -393,6 +395,26 @@ SpirVModule *SpirVModule::specialize(const map &spec_values) const } } } + else if(opcode==OP_PHI) + { + unsigned active_count = 0; + unsigned result_id = 0; + for(unsigned i=3; i