The developers of the Asahi Linux project, which is porting Linux for Apple Mac computers with ARM chips, have introduced a toolkit for running modern computer games in Linux environments on systems with the Apple M1 chip. This concerns AAA-class games available in the Steam catalog and built for the x86_64 architecture. The toolkit ensures integration of the drivers created by the project that implement the Vulkan 1.3 and OpenCL 3.0 APIs with components that provide emulation of the x86_64 architecture and compatibility with Windows.
The necessary packages have already been added to the default repository of the Fedora Asahi Remix distribution — to run the games, it is sufficient to update the drivers with the command "dnf upgrade —refresh" and install Steam with the command "dnf install steam", which will pull in all the necessary dependencies. The stack used for launching games is built on the basis of the Honeykrisp Vulkan driver, the FEX emulator that allows running x86 applications on ARM systems, the Wine project, and the DXVK and vkd3d-proton layers that implement the DirectX API over Vulkan.
Due to additional overhead caused by emulation, it is recommended to have 16 GB of RAM in the system. Alignment issues due to discrepancies in memory page sizes used in the operating system and required by applications (programs compiled for x86 are designed for 4K pages, while Apple systems use 16K pages) have been resolved by running a second Linux kernel in a virtual environment configured with a different memory page size. For running games in separate environments, virtual machines the muvm toolkit is utilized with its own kernel. For example, this method was successfully used to run the game Fallout 4.

To ensure the operation of games such as The Witcher 3 and Ghostrunner, which use tessellation and geometry shaders, emulation is enabled through compute shaders. Among the yet-to-be-implemented features is the support for sparse texturing in the Honeykrisp driver, which is necessary for running some DX12-based games, such as Cyberpunk 2077. Additionally, optimization work is underway to achieve a performance level of 60 FPS in the emulated environment.

Source: opennet.ru
