[Mesa-dev] [PATCH 5/5] glsl/linker: Fail if gl_FragDepth layouts don't match.

Fabian Bieler fabianbieler at fastmail.fm
Wed May 8 15:51:41 PDT 2013


This fixes Piglit test shaders/link-mismatch-layout-02.
---
 src/glsl/linker.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp
index 4415b8d..4bc0eee 100644
--- a/src/glsl/linker.cpp
+++ b/src/glsl/linker.cpp
@@ -561,6 +561,7 @@ cross_validate_globals(struct gl_shader_program *prog,
 			       "All redeclarations of gl_FragDepth in all "
 			       "fragment shaders in a single program must have "
 			       "the same set of qualifiers.");
+		  return false;
 	       }
 
 	       if (var->used && layout_differs) {
@@ -570,6 +571,7 @@ cross_validate_globals(struct gl_shader_program *prog,
 			       "redeclared with the same layout qualifier in "
 			       "all fragment shaders that have assignments to "
 			       "gl_FragDepth");
+		  return false;
 	       }
 	    }
 
-- 
1.8.1.2



More information about the mesa-dev mailing list