google / shaderc

A collection of tools, libraries, and tests for Vulkan shader compilation.
Other
1.82k stars 353 forks source link

compile Hlsl To Spv #1200

Open jmoguillansky-gpsw opened 3 years ago

jmoguillansky-gpsw commented 3 years ago

How do we compile hlsl to spirv, using shaderc APIs, with the C API, and also with the C++ API?

For C API, are we supposed to first call: shaderc_compile_options_set_source_language and then call shaderc_compile_into_spv?

Maybe the documentation should be updated: Takes a GLSL source string -> Takes a GLSL/HLSL source string

For C++ API, there's already an API: "CompileGlslToSpv" Should there be another API added, like "CompileHlslToSpv"?

zoddicus commented 3 years ago

@dneto0 can you comment on this?