GRVK 0.2 Continues Advancing This AMD Mantle To Vulkan Translation Layer
While there aren't too many Windows games out there still popular and supporting AMD's Mantle graphics API that was the precursor to Vulkan, open-source developer Clément Guérin continues work on his "GRVK" initiative for mapping Mantle on top of Vulkan as a learning exercise and for allowing those still relevant Mantle-supported games to in turn run on Vulkan.
It was just last month that brought the inaugural GRVK release for this open-source project when it got a Mantle triangle rendered and begins to correctly translate AMDIL shaders to SPIR-V on-demand.
With GRVK 0.2, more work has been placed on the shader compiler and with this new milestone is able to handle various Shader Toy pixel shaders.
Guérin explained of his process for improving the shader support, "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 frog on the screen."
More details on the GRVK 0.2 changes for Windows and Linux via the GitHub announcement.