diff options
author | marha <marha@users.sourceforge.net> | 2013-09-18 08:03:04 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2013-09-18 08:03:04 +0200 |
commit | 7f669a708bd35bdf8e842f762ec68f9ad0ec0486 (patch) | |
tree | 332fc6d6e6f70503d717249e4e387bf3eea29637 /mesalib/src/glsl/linker.cpp | |
parent | a7d3f63ee5e292379ed6d6eba0c65512205a4786 (diff) | |
download | vcxsrv-7f669a708bd35bdf8e842f762ec68f9ad0ec0486.tar.gz vcxsrv-7f669a708bd35bdf8e842f762ec68f9ad0ec0486.tar.bz2 vcxsrv-7f669a708bd35bdf8e842f762ec68f9ad0ec0486.zip |
libX11 mesa pixman xserver git update 18 Sep 2013
xserver commit 8010d3a48bd0b224dcb0883e39c2351ad364d846
libX11 commit 5dcb40f28d59587597d2ff6e6ac64c71cfe6ff7b
pixman commit 58a79dfe6d1fd62c2b66c69fdb64f6b8ecf61da5
mesa commit a3b51a22f71819236baa6bbda9d0d050914b149d
Diffstat (limited to 'mesalib/src/glsl/linker.cpp')
-rw-r--r-- | mesalib/src/glsl/linker.cpp | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/mesalib/src/glsl/linker.cpp b/mesalib/src/glsl/linker.cpp index 65afc2e69..8a143fddf 100644 --- a/mesalib/src/glsl/linker.cpp +++ b/mesalib/src/glsl/linker.cpp @@ -249,6 +249,33 @@ public: }; +/** + * Visitor that determines whether or not a shader uses ir_end_primitive. + */ +class find_end_primitive_visitor : public ir_hierarchical_visitor { +public: + find_end_primitive_visitor() + : found(false) + { + /* empty */ + } + + virtual ir_visitor_status visit(ir_end_primitive *) + { + found = true; + return visit_stop; + } + + bool end_primitive_found() + { + return found; + } + +private: + bool found; +}; + + void linker_error(gl_shader_program *prog, const char *fmt, ...) { @@ -517,6 +544,10 @@ validate_geometry_shader_executable(struct gl_shader_program *prog, analyze_clip_usage("geometry", prog, shader, &prog->Geom.UsesClipDistance, &prog->Geom.ClipDistanceArraySize); + + find_end_primitive_visitor end_primitive; + end_primitive.run(shader->ir); + prog->Geom.UsesEndPrimitive = end_primitive.end_primitive_found(); } |