diff options
author | marha <marha@users.sourceforge.net> | 2011-09-09 16:49:03 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-09-09 16:49:03 +0200 |
commit | 05cf7dd22994a1dbfd3580b00690c01c392a5797 (patch) | |
tree | ec1c29b5f8a67c54b13b44f1eb7aa700f91fef9e /mesalib/src/glsl/linker.cpp | |
parent | 0947b921a3223c14322f10d83e71618d1724b734 (diff) | |
parent | f9cf11136d65f20aab4fb6d5fc3ec3c59185a0b4 (diff) | |
download | vcxsrv-05cf7dd22994a1dbfd3580b00690c01c392a5797.tar.gz vcxsrv-05cf7dd22994a1dbfd3580b00690c01c392a5797.tar.bz2 vcxsrv-05cf7dd22994a1dbfd3580b00690c01c392a5797.zip |
Merge remote-tracking branch 'origin/released'
Conflicts:
mesalib/include/GL/internal/dri_interface.h
mesalib/scons/gallium.py
mesalib/src/glsl/ast_to_hir.cpp
mesalib/src/glsl/glsl_parser_extras.cpp
mesalib/src/glsl/ir_variable.cpp
mesalib/src/glsl/linker.cpp
mesalib/src/mesa/SConscript
mesalib/src/mesa/drivers/common/driverfuncs.c
mesalib/src/mesa/main/compiler.h
mesalib/src/mesa/main/formats.c
mesalib/src/mesa/main/formats.h
mesalib/src/mesa/main/texcompress.c
mesalib/src/mesa/main/texgetimage.c
mesalib/src/mesa/sources.mak
Diffstat (limited to 'mesalib/src/glsl/linker.cpp')
-rw-r--r-- | mesalib/src/glsl/linker.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/mesalib/src/glsl/linker.cpp b/mesalib/src/glsl/linker.cpp index 3538dc5fe..ad50fe18d 100644 --- a/mesalib/src/glsl/linker.cpp +++ b/mesalib/src/glsl/linker.cpp @@ -262,6 +262,25 @@ validate_vertex_shader_executable(struct gl_shader_program *prog, return false;
}
+ if (prog->Version >= 130) {
+ /* From section 7.1 (Vertex Shader Special Variables) of the
+ * GLSL 1.30 spec:
+ *
+ * "It is an error for a shader to statically write both
+ * gl_ClipVertex and gl_ClipDistance."
+ */
+ find_assignment_visitor clip_vertex("gl_ClipVertex");
+ find_assignment_visitor clip_distance("gl_ClipDistance");
+
+ clip_vertex.run(shader->ir);
+ clip_distance.run(shader->ir);
+ if (clip_vertex.variable_found() && clip_distance.variable_found()) {
+ linker_error(prog, "vertex shader writes to both `gl_ClipVertex' "
+ "and `gl_ClipDistance'\n");
+ return false;
+ }
+ }
+
return true;
}
|