From c0c11c8cb0f1c5683b6c0103e1be7f3ccdfa227a Mon Sep 17 00:00:00 2001 From: Kalyan Kondapally Date: Mon, 1 Sep 2014 19:45:58 -0700 Subject: [PATCH] Linking fails when not writing gl_Position. According to GLES 3.0 Spec, gl_Position value is undefined after the vertex processing stage if we don't write gl_Position. It's not an error and atleast the linking should pass. Currently, Mesa throws an linker error in case we dont write to a gl_position, this patch changes the linker error to warning. Signed-off-by: Kalyan Kondapally --- src/glsl/linker.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp index d5473ad..209b163 100644 --- a/src/glsl/linker.cpp +++ b/src/glsl/linker.cpp @@ -566,7 +566,9 @@ validate_vertex_shader_executable(struct gl_shader_program *prog, find_assignment_visitor find("gl_Position"); find.run(shader->ir); if (!find.variable_found()) { - linker_error(prog, "vertex shader does not write to `gl_Position'\n"); + linker_warning(prog, + "vertex shader does not write to `gl_Position'." + "It's value is undefined. \n"); return; } } -- 1.7.9.5