mirror of
https://github.com/azahar-emu/sirit.git
synced 2026-03-28 06:11:02 +01:00
Fix OpExtension.
There were two issues: - The word0 was omitted entirely. - The word count didn't account for the nul terminator.
This commit is contained in:
@@ -42,8 +42,10 @@ std::vector<u32> Module::Assemble() const {
|
||||
}
|
||||
|
||||
for (const std::string_view extension_name : extensions) {
|
||||
size_t count = WordsInString(extension_name);
|
||||
words.push_back(MakeWord0(spv::Op::OpExtension, count + 1));
|
||||
size_t insert_index = words.size();
|
||||
words.resize(words.size() + WordsInString(extension_name));
|
||||
words.resize(words.size() + count);
|
||||
InsertStringView(words, insert_index, extension_name);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user