Both GLSL 1.10 and 1.20 specs say: "The #version directive must occur in a shader before anything else, except for comments and white space." But glsl/tests/glslparsertest/shaders/CorrectVersion1.V110.frag fails with below output: Successfully compiled fragment shader /GFX/Test/Piglit_ext/piglit/tests/glslparsertest/shaders/CorrectVersion1.V110.frag: (no compiler output) Output: PIGLIT: {'result': 'fail' } This piglit test case was changed as below with http://cgit.freedesktop.org/piglit/commit/?id=5752c9a33a66e91544a6af2e926833183318357b /* Only one version statement is allowed; two should raise an error. */ #version 110 #version 110
Right - this is fixed in the glsl2 branch. Mesa master (incorrectly) allows this to pass, but the new compiler does not.
verified in the latest mesa (after glsl2 merge)
bug/show.html.tmpl processed on Mar 20, 2017 at 09:46:43. (provided by the Example extension).