Is a Vulkan Compute shader different from a GLSL compute shader?

Hi

I’ve looked at some of the tutorials for Vulkan Compute shaders, and some of them just construct the shader code with something looking akin to assembly (which I’m assuming is just hand constructed SPIR-V), while some of them load up a SPIR-V file. Is the SPIR-V file just the SPIR-V generated from GLSL compute shader?

None of the examples I saw appear to use some distinct shader language - is my understanding correct? And if so, what languages compile to a SPIR-V file usable as a Vulkan compute shader?

Vulkan does not particulary care where you got your SPIR-V from, but yes; it can be generated from GLSL.

Consult this infographic: https://www.khronos.org/spir/
It seems to compile from many languages, but at least GLSL and HLSL that I am aware of.

I’m currently building a library that uses Vulkan for computing, and I would like to know what language can I use for my computing shaders
(I’m currently using GLSL and this is fine, but I would like to know what are the alternatives, and the advantages / drawbacks of them)

[QUOTE=BynaryCobweb;43397]I’m currently building a library that uses Vulkan for computing, and I would like to know what language can I use for my computing shaders
(I’m currently using GLSL and this is fine, but I would like to know what are the alternatives, and the advantages / drawbacks of them)[/QUOTE]

OpenCL, though not “out of the box”. This tool (clspv) is required. I haven’t tried it myself, it’s a prototype but it looks as though it is being actively used and developed.

Given this announcement it looks as though at some time in the future OpenCL will be “the” language to use for Vulkan GPGPU, and even for general graphics tasks … though the statement is vague and doesn’t seem to have been elucidated on since.

I think it would be a fantastic idea to fully integrate OpenCL into Vulkan for use in all existing shader stages, and even for pipeline customisations not currently supported by any shader type. It’s already a much nicer and more expressive language than glsl, and the moves towards supporting a large subset of C++ syntax and features can only improve this. The latest OpenCL 2 features (though not supported on all current hardware) also go a long way towards extending the scope of OpenCL from a “passive” language (invoked from host to crunch numbers) to an “interactive” language which can communicate with the host and to some extent can control overall program flow.