From 35f2fb70d3826df70fa2f53af05339137cddefc8 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 16 Apr 2012 13:37:04 -0700 Subject: Revert "glsl: Refuse to link GLSL 1.40+ shaders that would use fixed function." This reverts commit 4ec449a6ed1d2cea3bf83d6518b3b352ce5daceb. I meant to not push this one. Review found that a link error is not mandated: it should link, but you get undefined rendering if you rely on a missing stage. page 42/55 section 2.11 "Vertex Shaders": "If the program object has no vertex shader, or no program object is currently in use, the results of vertex shader execution are undefined." (and similar for page 160/173 section 3.9 "Fragment Shaders" for FS, and page 45/58 section 2.11.2 "Program Objects" for program being 0) It turns out the commit was broken anyway, because it was missing a "goto done", so linkstatus got smashed back to true later and the error just showed up as a warning in the infolog. --- src/glsl/linker.cpp | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'src/glsl/linker.cpp') diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp index 5f8e8830169..6ba297237c7 100644 --- a/src/glsl/linker.cpp +++ b/src/glsl/linker.cpp @@ -2225,20 +2225,6 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog) goto done; } - if (max_version >= 140) { - /* Note that this will change with GL_ARB_separate_shader_objects */ - if (num_vert_shaders == 0) { - linker_error(prog, - "GLSL %.02f without GL_ARB_compatibility requires a " - "vertex shader", max_version / 100.0); - } - if (num_frag_shaders == 0) { - linker_error(prog, - "GLSL %.02f without GL_ARB_compatibility requires a " - "fragment shader", max_version / 100.0); - } - } - prog->Version = max_version; for (unsigned int i = 0; i < MESA_SHADER_TYPES; i++) { -- cgit v1.2.3