[spv-in] patch function calls before deriving the global use

This commit is contained in:
Dzmitry Malyshau authored and Dzmitry Malyshau committed 2021-02-13 12:33:15 -05:00
1 parent 89f62bc584
commit de39e7f4d1
2 files changed
+1 -7

No files matched your search

+1
View File
@@ -146,6 +146,7 @@ impl<I: Iterator<Item = u32>> super::Parser<I> {
fun.body = flow_graph.to_naga()?;
// done
self.patch_function_calls(&mut fun)?;
fun.fill_global_use(module.global_variables.len(), &module.functions);
let dump_suffix = match self.lookup_entry_point.remove(&fun_id) {
-7
View File
@@ -1689,13 +1689,6 @@ impl<I: Iterator<Item = u32>> Parser<I> {
}
}
for (_, func) in module.functions.iter_mut() {
self.patch_function_calls(func)?;
}
for (_, ep) in module.entry_points.iter_mut() {
self.patch_function_calls(&mut ep.function)?;
}
if !self.future_decor.is_empty() {
log::warn!("Unused item decorations: {:?}", self.future_decor);
self.future_decor.clear();