[libre-riscv-dev] Vulkanizing

Luke Kenneth Casson Leighton lkcl at lkcl.net
Wed Feb 19 22:32:56 GMT 2020


On Wed, Feb 19, 2020 at 10:11 PM Scheming Pony
<scheming-pony at protonmail.com> wrote:

> I had a whole rant going there (Graphics Wars XXI--Spok vs. Vadre/Vulkan--I tend to think in screen plays).  But I decided to play it straight.

:)

> [actual idea] I ain't going to use the LLVM compiler to get a pixel to the screen.  CEPL for a shader language, bye, bye LLVM--I write my AST by hand.

this is just the reality of shaders.  they're either in a high-level
language (GLSL) and have to be turned into GPU-assembler, or they're
already "half-compiled" into an Intermediary Representation (SPIR-V)
and have to be turned into GPU-assembler...

we have to use something (which turns the shader AST into assembly
code).  we have a number of choices:

* write that "something" entirely ourselves.  this would be... several
man-years of effort.
* use the gcc AST to assembly library.  jacob *did* actually mention -
i think - designing Kazan so that it could  in fact use the GCC
compiler.  we are not using this right now because gcc is man-years to
man-decades behind LLVM
* leverage the man DECADES of work that's already gone into LLVM for
GPU usage, doing very little work ourselves and "riding the wave".

Shaders are just how things work, now.  AMDGPU uses LLVM and has
actually published the source code (including the backend LLVM-IR to
AMDGPU-assembly).

if we applied for funding to do a "full complete Shader Assembly
Compiler", it would have quite reasonably been refused.


> (On Github, sorry Luke, wait *is* this that space opera movie?

Spaceballs? https://en.wikipedia.org/wiki/Spaceballs
In the Pirkinning? https://en.wikipedia.org/wiki/Star_Wreck:_In_the_Pirkinning

> I was doing A Space Odyssey earlier this month.).

try the above - and... what is it... one of my favourites, with Tim Allen...

l.



More information about the libre-riscv-dev mailing list