From: Mikko Rasa Date: Mon, 3 Oct 2022 20:43:33 +0000 (+0300) Subject: Handle OpPhi when specializing SPIR-V modules X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=commitdiff_plain;h=cdefdb4b0f94613c2b41757fb33ae155efa9a205 Handle OpPhi when specializing SPIR-V modules --- 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