I am using Ubuntu 16.4 with NVIDIA driver 384.111 and I have a similar problem to this one.
I compiled a minimal GLSL vertex shader (one input and an empty main function) to SPIR-V the same way as described in the linked discussion. When I load and specialize it, the specialization is not successful and the info log contains only random data.
I decided to post this question because the discussion refereced in the linked comment does not exists anymore and is over a year old. I could not find any other references to this problem here or at the NVIDIA dev forums.
Is there any mistake which could legitimately produce a broken info log or is this a driver error? It somehow seems unlikely that this issue has been present for over a year and nobody discussed it.
My GLSL shader looks like this:
#version 330
layout(location = 0) in vec3 vPosition;
void main() {
}
I used the following command to compile the code to SPIR-V:
./glslangValidator -G quad.vert -o quad.vert.spv
The following code loads the shader:
glShaderBinary(1, &shader, GL_SHADER_BINARY_FORMAT_SPIR_V_ARB, shader_source.data(), (GLsizei)shader_source.size());
glSpecializeShader(shader, "main", 0, nullptr, nullptr);