News for hackers. Stuff that matters.
Re:Adding HLSL and DirectX Support to Clang and LLVM by iamcreasy on Friday March 11, 2022 @09:59PM (#30648604)
Thank you. Could you please also elaborate on this part.

> Additionally DXC can be used to generate SPIR-V which can then be used either with the Vulkan runtime or, through SPIR-V cross, converted to GLSL or Metal Shader Language for use with their respective APIs.

Is it like saying HSLS can be converted to GSLS or Metal Shaders by converting it to some intermediate representation first?

Re:Adding HLSL and DirectX Support to Clang and LLVM by raphlinus on Friday March 11, 2022 @10:11PM (#30648664)
Exactly that. You compile down to SPIR-V, then use spirv-cross to generate Metal Shading Language or GLSL. It's clunky and there are some rough edges - these conversions aren't 100% lossless - but it does work. If you play a game on a mac, there's a very good chance this is the compilation strategy used.