Remove decoration of undefined IDs
Fix issue #185 by removing OpDecorate instructions whose target IDs are defined in unreachable blocks and thus not dumped in the generated SPIR-V code.
This commit is contained in:
parent
f7497e289b
commit
da39733f28
4 changed files with 38 additions and 0 deletions
|
|
@ -719,6 +719,7 @@ void TGlslangToSpvTraverser::dumpSpv(std::vector<unsigned int>& out)
|
|||
for (auto it = iOSet.cbegin(); it != iOSet.cend(); ++it)
|
||||
entryPoint->addIdOperand(*it);
|
||||
|
||||
builder.eliminateDeadDecorations();
|
||||
builder.dump(out);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue