Will there be a SPIR-V layer to allow running DirectX over Vulkan?
That is certainly a technical possibility. The issue is translating DirectX shader code that is post-compiled code into SPIR-V for consumption. The other option is to compile directly from the HLSL if that’s how you’re generating your binary blobs, which may be typical in the more modern DirectX APIs. Either path will work.
Many applications porting to Vulkan need a way to port their HLSL shaders to SPIR-V. Glslang provides a method to translate HLSL shaders to SPIR-V, which is now available and ready to use. Currently, the HLSL mode of the glslang frontend is complete enough to run complex, real-world workloads such as Dota 2 and Ashes of the Singularity. It accepts shaders for any shader stage, and handles common language constructs for functions, control flow, variable and type declarations, registers and pack offsets, most DX10 and later texture methods, most intrinsic functions, most preprocessor functionality, most built-in semantics, and attributes that affect stage functionality. To learn more about the HLSL to SPIR-V translator, visit this FAQ at the glslang GitHub.