[Libre-soc-dev] Rust as a GPU shader language

Jacob Lifshay programmerjake at gmail.com
Fri Oct 23 08:26:48 BST 2020


On Fri, Oct 23, 2020, 00:18 Luke Kenneth Casson Leighton <lkcl at lkcl.net>
wrote:

> On Fri, Oct 23, 2020 at 7:45 AM Jacob Lifshay <programmerjake at gmail.com>
> wrote:
> >
> > On Thu, Oct 22, 2020, 23:37 Luke Kenneth Casson Leighton <lkcl at lkcl.net>
> > wrote:
> >
> > > On Fri, Oct 23, 2020 at 7:25 AM Jacob Lifshay <
> programmerjake at gmail.com>
> > > wrote:
> > > >
> > > > Just saw this, thought you might find this an interesting read:
> > > >
> > > > https://github.com/EmbarkStudios/rust-gpu/releases/tag/v0.1
> > >
> > > "facilitate code-sharing between GPU and CPU"
> > >
> > > y'know, funnily ennough this is a NOP on a hybrid platform
> > >
> >
> > not quite, you can then run it through the Vulkan API, which gives you
> > cross-platform compatibility.
>
> ok.
>
> > >
> > > "rustc compiler backend to generate SPIR-V, plugging in via -Z
> > > codegen-backend."
> > >
> > > oo.  err... isn't that.. err kazan? :)
> > >
> >
> > nope. they're converting rust source code to spir-v,
>
> okaay, interesting.  so it's a front-end / intermediary compiler.  a
> bit like.. the opencl compiler? (did i see a c/c++ to spir-v compiler
> somewhere?)
>

yup. clang can compile opencl c/c++ to spir-v, using the llvm backend for
spir-v, though clang targets the opencl variant and the linked project
targets the vulkan/opengl variant (the variants are different enough to not
usually be intercompatible).

Jacob


More information about the Libre-soc-dev mailing list