X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcore%2Fmodule.cpp;h=5475e434ac2636331c846a529bdf99fb508efb04;hb=d9c437291135255422c71918cd0cab8a735848af;hp=11d11af5d6485b1f7a80671f15dba95394554c21;hpb=3efe3bab1c8290bd49a957ebec0ad97e58a35fcf;p=libs%2Fgl.git diff --git a/source/core/module.cpp b/source/core/module.cpp index 11d11af5..5475e434 100644 --- a/source/core/module.cpp +++ b/source/core/module.cpp @@ -14,6 +14,7 @@ enum SpirVConstants OP_NAME = 5, OP_MEMBER_NAME = 6, OP_ENTRY_POINT = 15, + OP_EXECUTION_MODE = 16, OP_TYPE_VOID = 19, OP_TYPE_BOOL = 20, OP_TYPE_INT = 21, @@ -269,6 +270,8 @@ SpirVModule *SpirVModule::specialize(const map &spec_values) const } } + for(const EntryPoint &e: entry_points) + flags[e.id] = 0; for(const Variable &v: variables) flags[v.id] = 0; for(const InstructionBlock &b: blocks) @@ -307,9 +310,10 @@ SpirVModule *SpirVModule::specialize(const map &spec_values) const unsigned start = new_code.size(); new_code.push_back(opcode); new_code.push_back(*(op+1)); - new_code.push_back(*(op+2)); + unsigned func_id = *(op+2); + new_code.push_back(func_id); - unsigned i=3; + unsigned i = 3; while(i &spec_values) const break; } + unsigned var_count = 0; for(; i