Hacker News new | ask | show | jobs
by raincole 43 days ago
I wonder what it means for Slang[0]. Presumably the point is that people want to do GPU programming with a more modern language. But now you can just use Rust...

(Disclaimer: I like Slang a lot.)

[0]: https://shader-slang.org/

2 comments

They serve different public, Slag folks are more interested in graphics programming not AI algorithms.

Also shading languages are more user friendly given their features.

Finally NVida already has Slang in production and those folks aren't going to rewrite shader pipelines into Rust.

I am working on a graphics library that integrates slang into rust: https://github.com/koubaa/goldy

There's library code in rust that manages GPU memory and schedules pipelines and use a slang reflection to ensure memory layouts between rust and shaders match.

Oh and it supports metal/vulkan/dx12

Writing shaders is materially different from writing CUDA kernels, at least for now. Shaders are simultaneously higher and lower level, and have a lot of idiosyncrasies as a result of being designed for a specific and limited set of driver/GPU features.

Stuff like descriptor sets, resource registers, dispatch limitations, …