this post was submitted on 06 Jun 2025
10 points (100.0% liked)

General Programming Discussion

8580 readers
1 users here now

A general programming discussion community.

Rules:

  1. Be civil.
  2. Please start discussions that spark conversation

Other communities

Systems

Functional Programming

Also related

founded 6 years ago
MODERATORS
 

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.

no comments (yet)
sorted by: hot top controversial new old
there doesn't seem to be anything here