# ./bin/glslparsertest tests/spec/arb_shader_subroutine/linker/no-overloads.vert fail 1.50 --check-link Successfully compiled and linked vertex shader tests/spec/arb_shader_subroutine/linker/no-overloads.vert: (no compiler output) Shader source: // [config] // expect_result: fail // glsl_version: 1.50 // require_extensions: GL_ARB_shader_subroutine // check_link: true // [end config] #version 150 #extension GL_ARB_shader_subroutine: require subroutine void func_type(); /* A program will fail to link if any shader contains two or more * functions with the same name, at least one of which is associated * with a subroutine type. */ subroutine (func_type) void f() {} void f(int x) {} void main() {} PIGLIT: {"result": "fail" } Accordingly to GLSL spec 4.0 this test shouldn't fail: Section 6.1.2 Subroutines: "A program will fail to compile or link if any shader or stage contains two or more functions with the same name if the name is associated with a subroutine type."
Patch: https://patchwork.freedesktop.org/patch/254237/
Fixed with: commit 5f0567a4f60c6671d4e2a942ab3f3248dbbd6997 (HEAD -> master, origin/master, origin/HEAD) Author: Vadym Shovkoplias <vadim.shovkoplias@gmail.com> Date: Wed Oct 3 11:39:04 2018 +0300 glsl/linker: Check the subroutine associated functions names >From Section 6.1.2 (Subroutines) of the GLSL 4.00 specification "A program will fail to compile or link if any shader or stage contains two or more functions with the same name if the name is associated with a subroutine type." v2: - error out earlier (Tapani) - style fixes (Iago) Fixes: * no-overloads.vert Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108109 Signed-off-by: Vadym Shovkoplias <vadym.shovkoplias@globallogic.com> Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Additional check to compiler added: https://patchwork.freedesktop.org/patch/255542/
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.