Skip to content

GRVK 0.2.0

Compare
Choose a tag to compare
@libcg libcg released this 10 Sep 02:54
· 529 commits to master since this release

This is the second release of GRVK, a Mantle to Vulkan translation layer. After bringing up an initial triangle, I focused on the AMDIL shader compiler, to get it in shape before starting to bring up real games.

GRVK is now able to run various pixel shaders sourced from shadertoy.com, available to test in the attached archive.

Screenshot from 2020-09-09 19-59-07

While Vulkan uses SPIR-V shaders, Mantle expects AMDIL shaders as an input: GRVK needs to translate AMDIL to SPIR-V on the fly to get the games running. The problem is that AMDIL looks very much like assembly and has a limited ecosystem, which makes it hard to work with. To bring up the compiler, I needed some human-readable shaders with a known output to test against.

To do this, I sourced some shaders from shadertoy.com, rewrote them to HLSL, then compiled them to AMDIL using AMD's CodeXL compiler. I used this Shader Playground website to compare the AMDIL disassembly with GRVK's output, then implemented the missing instructions, until I got a frog 🐸 on the screen. I got several shaders up and running, that are available to test in the archive below.

GRVK 0.2.0 changelog:

  • Improved shader compiler to run non-trivial pixel shaders
  • Improved MangoHud compatibility
  • Added GRVK_DUMP_SHADERS=1 environment variable to dump IL shaders and SPIR-V output
  • Removed some hardcoded dimensions to allow arbitrary render size
  • Fixed some validation errors around dynamic state

GRVK was tested with the following drivers:

  • RADV 20.2.0 or later on Linux
  • Nvidia 450.56.06 (beta) or later on Linux
  • Adrenalin 20.8.3 or later on Windows
  • Nvidia 451.98 (beta) or later on Windows

Have fun!

  • libcg