Hello,

I present myself as an experienced OpenGL developper but a complete newbie with Vulkan. I am not a native english speaker, sorry for any language mistakes.

I have been following this tutorial: https://vulkan-tutorial.com/Drawing_a_triangle/Graphics_pipeline_basics/Shader_modules#page_Compiling_the_shaders

Code available here: https://github.com/Overv/VulkanTutorial/blob/master/code/15_hello_triangle.cpp

As stated by the Vulkan FAQ (https://www.lunarg.com/vulkan-sdk/faq/)

“The Vulkan shader language is SPIR-V, which is a low-level binary intermediate representation (IR). The Vulkan API requires the SPIR*-V format for all shaders.”

and by the Shader Module Specifications (https://vulkan.lunarg.com/doc/view/1.0.26.0/linux/vkspec.chunked/ch08s01.html)

“The shader code defining a shader module must be in the SPIR-V format”

However I can confirm the source code of the tutorial is also working with raw GLSL shader files (even though the validation layer warns that the shader module is invalid because it cannot find the Magic Number)

As I understand, the “NV_GLSL_SHADER” extension allow such a behaviour (I am using a GTX 1050) but I verified it wasn’t enabled in this example through “createInfo.ppEnabledExtensionNames[i]”.

Source:

https://developer.nvidia.com/engaging-voyage-vulkan (Very bottom paragraph)

https://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers/pull/1452/commits/ce33c489d0192995a3ef63dfd64df19365f71674

Am I missing something here ? is it because of something in the code I have missed ? or is it just NVIDIA going funky with the standard ? Is it worth opening a Github issue ?