From 10cd1ccd8ca2048456d07c629d34d8a28a3e6d73 Mon Sep 17 00:00:00 2001 From: Christian Legnitto Date: Mon, 24 Mar 2025 05:36:30 -0400 Subject: [PATCH] [spv_in] Finish emitter after function arguments (#7397) Fixes https://github.com/gfx-rs/wgpu/issues/7358. --- naga/src/front/spv/mod.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/naga/src/front/spv/mod.rs b/naga/src/front/spv/mod.rs index ca40b8efd..b62f00d28 100644 --- a/naga/src/front/spv/mod.rs +++ b/naga/src/front/spv/mod.rs @@ -3040,7 +3040,6 @@ impl> Frontend { } 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> Frontend { 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);