from cm0002@lemmy.world to programming@programming.dev on 06 Jun 06:05
https://lemmy.world/post/30902064
Vcc - the Vulkan Clang Compiler, is a proof-of-concept C and C++ compiler for Vulkan leveraging Clang as a front-end, and Shady our own research IR and compiler. Unlike other shading languages, Vcc aims to stick closely to standard C/C++ languages and merely adds a few new intrinsics to cover GPU features. Vcc is similar to CUDA or Metal in this regard, and aims to bring the advantages of standard host languages to Vulkan shaders.
Key Features
Vcc supports advanced C/C++ features usually left out of shading languages such as HLSL or GLSL, in particular raising the bar when it comes to pointer support and control-flow:
- Unrestricted pointers
- Arithmetic is legal, they can be bitcasted to and from integers
- Generic pointers
- Generic pointers do not have an address space in their type, rather they carry the address space as a tag in the upper bits.
- True function calls
- Including recursion, a stack is implemented to handle this in the general case
- Function pointers
- Lets you write code in a functional style on the GPU without limitations
- Arbitrary goto statements - code does not need to be strictly structured !
Many of these capabilities are present in compute APIs, but are not supported in most graphics APIs such as DirectX or Vulkan. We aim to address this gap by proving these features can and should be implemented. More on why we think that’s important.
#programming
threaded - newest
I initially thought that meant GPU accelerated compilation. Sadly not.