Valve has unveiled a new shader compiler for AMD GPUs

Valve Company suggested new shader compiler on Mesa developer mailing list ACO for the RADV Vulkan driver, positioned as an alternative to the AMDGPU shader compiler used in the RadeonSI and RADV OpenGL and Vulkan drivers for AMD graphics chips.
After testing is completed and the functionality is refined, ACO is planned to be offered for inclusion in the main composition of Mesa.

Valve's proposed code aims to ensure code generation is as optimal as possible for game application shaders, as well as to achieve very high compilation speeds. Mesa's shader compiler uses LLVM components that do not achieve the desired compilation speed and do not allow full control flow control, which has already caused serious errors in the past. In addition, moving away from LLVM allows for more aggressive discrepancy analysis and more fine-grained control over register loading, which allows more efficient executables to be generated.

ACO is written in C++, designed with JIT-compilation in mind, and uses fast-to-iterate data structures, avoiding pointer-based structures such as linked lists and def-use chains. Intermediate code representation is entirely based on SSA (Static Single Assignment) and allows you to perform register allocation by accurately precomputing the register depending on the shader.

Currently, only pixel (fragment) and compute shaders are supported on discrete AMD GPUs (dGPU VI+). However, ACO already correctly builds shaders for all tested games, including complex shaders from Shadow of the Tomb Raider and Wolfenstein II. The ACO prototype proposed for testing is almost twice as fast as the AMDGPU shader compiler and demonstrates an increase in FPS in some games when they run on systems with the RADV driver.

Valve has unveiled a new shader compiler for AMD GPUs

Valve has unveiled a new shader compiler for AMD GPUs

Source: opennet.ru

Add a comment