Skip to content

Instantly share code, notes, and snippets.

@nidefawl
Created March 29, 2017 03:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nidefawl/b27d72c6eceb0922e3bf90b6de79d4e1 to your computer and use it in GitHub Desktop.
Save nidefawl/b27d72c6eceb0922e3bf90b6de79d4e1 to your computer and use it in GitHub Desktop.
glslangvalidator compilation fail
E:\>glslangvalidator -v
Glslang Version: Overload400-PrecQual.1721 21-Dec-2016
ESSL Version: OpenGL ES GLSL 3.00 glslang LunarG Khronos.Overload400-PrecQual.1721 21-Dec-2016
GLSL Version: 4.20 glslang LunarG Khronos.Overload400-PrecQual.1721 21-Dec-2016
SPIR-V Version 0x00010000, Revision 8
GLSL.std.450 Version 100, Revision 1
Khronos Tool ID 8
GL_KHR_vulkan_glsl version 100
ARB_GL_gl_spirv version 100
E:\>glslangvalidator -S frag -G -o test.fsh.spv testshader.fsh
testshader.fsh
Warning, version 450 is not yet complete; most version-specific features are present, but some are missing.
ERROR: testshader.fsh:8: '' : syntax error
ERROR: 1 compilation errors. No code generated.
SPIR-V is not generated for failed compile or link
#version 450
#define BLACK_COLOR
layout (location = 0) out vec4 out_Color;
void main(void) {
vec3 sample;
#ifdef BLACK_COLOR
sample = vec3(0);
#else
sample = vec3(1);
#endif
out_Color = vec4(sample, 1);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment