From 95b6d5222dbb059aa14b4641872c6b103185eb74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B3zef=20Kucia?= Date: Mon, 25 Feb 2019 11:59:12 +0100 Subject: [PATCH] vkd3d-shader: Call vkd3d_dxbc_compiler_leave_shader_phase() also for last phase. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Józef Kucia Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- libs/vkd3d-shader/spirv.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libs/vkd3d-shader/spirv.c b/libs/vkd3d-shader/spirv.c index 4225f8f1..08065f9c 100644 --- a/libs/vkd3d-shader/spirv.c +++ b/libs/vkd3d-shader/spirv.c @@ -7870,8 +7870,12 @@ int vkd3d_dxbc_compiler_generate_spirv(struct vkd3d_dxbc_compiler *compiler, const struct vkd3d_shader_compile_arguments *compile_args = compiler->compile_args; const struct vkd3d_shader_domain_shader_compile_arguments *ds_args; struct vkd3d_spirv_builder *builder = &compiler->spirv_builder; + const struct vkd3d_shader_phase *phase; - vkd3d_spirv_build_op_function_end(builder); + if ((phase = vkd3d_dxbc_compiler_get_current_shader_phase(compiler))) + vkd3d_dxbc_compiler_leave_shader_phase(compiler, phase); + else + vkd3d_spirv_build_op_function_end(builder); if (compiler->shader_type == VKD3D_SHADER_TYPE_HULL) vkd3d_dxbc_compiler_emit_hull_shader_main(compiler);