]> git.tdb.fi Git - libs/gl.git/blobdiff - source/glsl/finalize.h
Don't add depth range conversion if an assignment to gl_Position.z exists
[libs/gl.git] / source / glsl / finalize.h
index 6e96c65eaecb46c0b7d04aaae3027cb063d7bbdf..ec5f459ae53b59f1db6371dedcc2928e6d75cd36 100644 (file)
@@ -61,10 +61,20 @@ Converts the output depth range to match expectations of the target API.
 */
 class DepthRangeConverter: private TraversingVisitor
 {
+private:
+       bool assignment_target = false;
+       bool r_gl_pervertex = false;
+       bool r_gl_position = false;
+       bool r_position_z_assigned = false;
+
 public:
        void apply(Stage &, const Features &);
 
 private:
+       virtual void visit(VariableReference &);
+       virtual void visit(MemberAccess &);
+       virtual void visit(Swizzle &);
+       virtual void visit(Assignment &);
        virtual void visit(FunctionDeclaration &);
 };