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);