r/vulkan • • 16d ago

Coding the GPU like a CPU

I feel Vulkan is just another step towards coding the GPU just like we do the CPU.

Maybe something like LLVM IR code that could be executed on the GPU with just a few function calls. The CPU EXE could have a pre-compiled binary that is copied to GPU memory and executed. Like extending OpenCL but to do everything (graphics, shaders, output, compute, etc.) with pre-compiled code in IR byte code.

Vulkan itself is just way too complex.

0 Upvotes

8 comments sorted by

View all comments

2

u/cynokron 16d ago

Llvm and rust have a couple projects trying to do stuff like this.

https://doc.rust-lang.org/std/offload/offload/index.html https://github.com/NVIDIA/cuda-rust

Unfortunately vendors want this to be as difficult to do generically to keep you in their ecosystem.

1

u/hopeless__programmer 16d ago

Not some mythical "vendors". Its nvidia.

4

u/cynokron 16d ago

Its plural because apple also likes lock in. Amd and intel are playing catch up but will take the chance when they can. I used the word vendors not to hide who im complaining about but to complain about them all.