Open unit-404 opened 6 years ago
Adding direct support for SPIR-V shouldn't be too difficult. Design wise it is just a matter of registering a new GpuProgramFactory
, similar to the current VulkanGLSLProgramFactory
. Do you have a specific use-case for this feature or is it just a general request?
I'm wondering what would be the purpose of integrating SPIRV-Cross? If its used for just pure translation purposes, then it should be easy enough for developers to include it in their project on a case-by-case basis rather than integrating it. Or would it be used similarly to the current BSL and used for generating high-level Shader
that works on all platforms? But in that case we are lacking a lot of information to generate a complete Shader
. Plus if you are doing that you lose the (only?) benefit of using SPIRV directly, which is the ability to fully optimize and tweak the code - so you might just want to use a higher level language straight away.
SPIRV-Cross idea suggested for backward compatibility with other API (if possible), in my use case SPIR-V I could to use in Vulkan API 1.1 backend only.
Isn't the use case here to avoid doing shader source compiles at runtime and to instead just turn it all into SPIR-V at build time?
SPIR-V is cached at build/import time under the current system.
I want ask about direct support of precompiled (i.e. from
.spv
files) SPIR-V for Vulkan API 1.1, and probably, support SPIRV-Cross for compilation to other API (HLSL, GLSL, "VKSL").