mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-28 00:59:12 +01:00
[spv-in] patch function calls before deriving the global use
This commit is contained in:
1 parent
89f62bc584
commit
de39e7f4d1
2 files changed
+1
-7
No files matched your search
@@ -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) {
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in new issue
Block a user