Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The caveats: Slang is a transpiled language so you're putting in extra abstraction layers, and there's a difference between what people commonly use for GPU programming in games/graphics vs general compute apps. For example people on AMD chips seem to be gravitating to Vulkan for LLM stuff now and Slang/HLSL are not involved.


Slang compiles directly to SPIR-V which is now directly supported by both DirectX (as of Shader Model 7) and Vulkan (from the very beginning). Where is the transpilation or abstraction?

> For example people on AMD chips seem to be gravitating to Vulkan for LLM stuff now and Slang/HLSL are not involved.

You seem to be confusing different layers of the graphics stack. The SDK operates on the host CPU but the GPU needs something else. For Windows, that was DirectX (CPU) with HLSL compiled to DXIL (GPU). For Linux/Android, that was Vulkan (CPU) with GLSL compiled to SPIR-V (GPU).

As of now, those are DirectX with (HLSL or Slang) to SPIR-V and Vulkan with Slang to SPIR-V.

Microsoft announcement of support for SPIR-V in SM7: https://devblogs.microsoft.com/directx/directx-adopting-spir...

Vulkan announcement of Slang as supported shading language: https://www.khronos.org/news/press/khronos-group-launches-sl... . You can also see it in the fact that the Vulkan examples now all have slang shaders as well.

The biggest reason to quit using GLSL is simply that development of it occurs at a snail's pace relative to the others because Microsoft and NVIDIA pour so much resource at HLSL and Slang, respectively.


Ok, I had the wrong idea (or out of date?) about Slang, thanks for the correction.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: