veldrid-spirv
veldrid-spirv copied to clipboard
Proposal to support passing target version when cross compiling
- adds TargetVersion to CrossCompileInfo so that the caller can control the target compilation version (if 0 is passed, the behavior is as before)
- adds targetVersion param to SpirvCompilation.CompileCompute/CompileVertexFragment
- adds SpirvCompilation.SetDefaultTargetVersionForCrossCompileTarget(CrossCompileTarget, uint version) to allow caller to set global default to avoid having to pass versions into every Compile call
While working on the PBR sample, I found that I ran into compilation errors due to the default MSL version being too low. This change allows me to set the MSL version as seen here.
Just wanted to chime in and say that veldrid-spirv translation generates shaders with different versions and causes Error linking GL program: L0001 Shader languages do not match
on my Android. This PR may be a "solution" to this problem. My current solution is to just replace the lang version in the generated files to the highest version generated.