RADV Vulkan driver switched to use ACO shader compilation backend

In the codebase used to build the Mesa 20.2 release, carried out switching RADV, the Vulkan driver for AMD chips, to use the default shader compilation backend "ACO", which is being developed by Valve as an alternative to the LLVM shader compiler. The specified change will lead to an increase in the performance of games and a reduction in the time they start. To return the old backend, the environment variable "RADV_DEBUG=llvm" is provided.

Switching the RADV driver to the new backend became possible after ACO achieved parity in functionality with the old backend developed by AMD for the AMDGPU driver, which continues to be used in the RadeonSI OpenGL driver. Valve Testing has shownthat ACO is almost twice as fast as the AMDGPU Shader Compiler in terms of compilation speed and shows an increase in FPS in some games when they are running on systems with the RADV driver.

RADV Vulkan driver switched to use ACO shader compilation backend

RADV Vulkan driver switched to use ACO shader compilation backend

The ACO backend aims to provide code generation that is as optimal as possible for game application shaders, as well as achieving very high compilation speeds. ACO is written in C++, designed with JIT-compilation in mind, and uses fast data structures to iterate over, avoiding pointer-based structures. Code Intermediate Representation is fully based on SSA (Static Single Assignment) and allows for register allocation by accurately precalculating the register depending on the shader.

Addendum: At the moment, ACO only works for the Mesa RADV Vulkan driver. But the ACO developers confirmedthat their next step will be to start working on extending ACO to support the RadeonSI OpenGL driver so that in the future, ACO can replace the default LLVM shader compiler for this driver as well.

Source: opennet.ru

Add a comment