vkd3d-shader: Propagate errors from vkd3d_dxbc_compiler_emit_control_flow_instruction().

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Józef Kucia
2018-10-26 15:06:53 +02:00
committed by Alexandre Julliard
parent b909a5fe04
commit bec3430d88
4 changed files with 30 additions and 17 deletions

View File

@@ -120,10 +120,13 @@ int vkd3d_shader_compile_dxbc(const struct vkd3d_shader_code *dxbc,
return VKD3D_ERROR_INVALID_ARGUMENT;
}
vkd3d_dxbc_compiler_handle_instruction(spirv_compiler, &instruction);
if ((ret = vkd3d_dxbc_compiler_handle_instruction(spirv_compiler, &instruction)) < 0)
break;
}
ret = vkd3d_dxbc_compiler_generate_spirv(spirv_compiler, spirv);
if (ret >= 0)
ret = vkd3d_dxbc_compiler_generate_spirv(spirv_compiler, spirv);
vkd3d_dxbc_compiler_destroy(spirv_compiler);
vkd3d_shader_parser_destroy(&parser);
return ret;