Live data from Hacker News

Show HN: A Minimal Code Example of Using Vulkan for Computations on the GPU

github.com

1–10 of 13 posts

Re: Show HN: A Minimal Code Example of Using Vulkan for Computations on the GPU

#4
post #2

OP here. This is a small code example of how to use Vulkan for compute operations. Only ~400LOC. It's pretty short, and has plenty of comments, so it should be useful for people learning Vulkan, I hope.

Might wanna open a PR to add your sample to the list of Vulkan resources too, under samples and demos [0].

[0] https://github.com/KhronosGroup/Khronosdotorg/blob/master/ap...

Re: Show HN: A Minimal Code Example of Using Vulkan for Computations on the GPU

#7
Has someone created a wrapper or higher-level API that takes care of some of the details for common use-cases?

For example, say I don't need to optimize my command submittal, or I just want the main device. Or maybe my common use case is a compute shader just like the program submitted in this Hacker News post. I would want a class that just exposed a simple API like runComputeShader() or something.

Re: Show HN: A Minimal Code Example of Using Vulkan for Computations on the GPU

#9
post #2

OP here. This is a small code example of how to use Vulkan for compute operations. Only ~400LOC. It's pretty short, and has plenty of comments, so it should be useful for people learning Vulkan, I hope.

Might wanna open a PR to add your sample to the list of Vulkan resources too, under samples and demos [0]. [0] https://github.com/KhronosGroup/Khronosdotorg/blob/master/ap...

Ah, thanks for the tip :-)

Re: Show HN: A Minimal Code Example of Using Vulkan for Computations on the GPU

#10
post #3

I haven't used GPGPU in a while. Is Vulkan expected to take over from OpenCL?

OpenCL (the API) will merge into Vulkan, but OpenCL C/C++/DCompute/compute shaders (the kernel languages) will remain separate as they compile to SPIRV, which is compiled into the native binary format.
Post reply on HN