X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fglsl%2Fdebug.h;h=3837c569bb18e13aacf3d02a9d1d58eadecd5cb0;hb=801c209fa0a2878c0675b7808154de93bc42f5fd;hp=b2de993da648e39a06a8f8f93d03c112b596cd39;hpb=50ab5ca2babc8d9592903da6072a13b381ed6656;p=libs%2Fgl.git diff --git a/source/glsl/debug.h b/source/glsl/debug.h index b2de993d..3837c569 100644 --- a/source/glsl/debug.h +++ b/source/glsl/debug.h @@ -22,6 +22,16 @@ private: REACH = 0x2574 // ╴ }; + struct Branch + { + std::string text; + Node *node; + + Branch(const char *t, Node *n = 0): text(t), node(n) { } + Branch(const std::string &t, Node *n = 0): text(t), node(n) { } + Branch(Node *n): node(n) { } + }; + std::map node_labels; std::string formatted; std::vector tree; @@ -31,6 +41,7 @@ public: private: void append(const std::string &); + void append_subtree(const std::vector &); void begin_sub(); void last_branch(); void end_sub(); @@ -47,6 +58,7 @@ private: virtual void visit(VariableReference &); virtual void visit(InterfaceBlockReference &); virtual void visit(MemberAccess &); + virtual void visit(Swizzle &); virtual void visit(UnaryExpression &); virtual void visit(BinaryExpression &); virtual void visit(Assignment &);