[spv_in] Finish emitter after function arguments (#7397)

Fixes https://github.com/gfx-rs/wgpu/issues/7358.
This commit is contained in:
Christian Legnitto authored and GitHub committed 2025-03-24 10:36:30 +01:00
1 parent ccaf9a84f8
commit 10cd1ccd8c
1 file changed
+2 -1
+2 -1
View File
@@ -3040,7 +3040,6 @@ impl<I: Iterator<Item = u32>> Frontend<I> {
}
Op::FunctionCall => {
inst.expect_at_least(4)?;
block.extend(emitter.finish(ctx.expressions));
let result_type_id = self.next()?;
let result_id = self.next()?;
@@ -3053,6 +3052,8 @@ impl<I: Iterator<Item = u32>> Frontend<I> {
arguments.push(get_expr_handle!(arg_id, lexp));
}
block.extend(emitter.finish(ctx.expressions));
// We just need an unique handle here, nothing more.
let function = self.add_call(ctx.function_id, func_id);