Mesa (master): glsl: Improve documentation of ir_loop counter/ control fields.

Paul Berry stereotype441 at kemper.freedesktop.org
Sat Nov 30 06:12:45 UTC 2013


Module: Mesa
Branch: master
Commit: af9af2965bbd7ba8d18cd1064afcf57392904edb
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=af9af2965bbd7ba8d18cd1064afcf57392904edb

Author: Paul Berry <stereotype441 at gmail.com>
Date:   Wed Nov 27 11:39:51 2013 -0800

glsl: Improve documentation of ir_loop counter/control fields.

Reviewed-by: Eric Anholt <eric at anholt.net>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

---

 src/glsl/ir.h |   34 ++++++++++++++++++++++++++++------
 1 files changed, 28 insertions(+), 6 deletions(-)

diff --git a/src/glsl/ir.h b/src/glsl/ir.h
index 4f775da..b898d61 100644
--- a/src/glsl/ir.h
+++ b/src/glsl/ir.h
@@ -1032,13 +1032,33 @@ public:
     * If \c from and \c to are the same value, the loop will execute once.
     */
    /*@{*/
-   ir_rvalue *from;             /** Value of the loop counter on the first
-				 * iteration of the loop.
-				 */
-   ir_rvalue *to;               /** Value of the loop counter on the last
-				 * iteration of the loop.
-				 */
+
+   /**
+    * Value which should be assigned to \c counter before the first iteration
+    * of the loop.  Must be non-null whenever \c counter is non-null, and vice
+    * versa.
+    */
+   ir_rvalue *from;
+
+   /**
+    * Value which \c counter should be compared to in order to determine
+    * whether to exit the loop.  Must be non-null whenever \c counter is
+    * non-null, and vice versa.
+    */
+   ir_rvalue *to;
+
+   /**
+    * Value which should be added to \c counter at the end of each loop
+    * iteration.  Must be non-null whenever \c counter is non-null, and vice
+    * versa.
+    */
    ir_rvalue *increment;
+
+   /**
+    * Variable which counts loop iterations.  This is a brand new ir_variable
+    * declaration (not a reference to a previously declared ir_variable, as in
+    * ir_dereference_variable).
+    */
    ir_variable *counter;
 
    /**
@@ -1047,6 +1067,8 @@ public:
     * If any of the loop control fields are non-\c NULL, this field must be
     * one of \c ir_binop_less, \c ir_binop_greater, \c ir_binop_lequal,
     * \c ir_binop_gequal, \c ir_binop_equal, or \c ir_binop_nequal.
+    *
+    * Ignored if \c counter is NULL.
     */
    int cmp;
    /*@}*/




More information about the mesa-commit mailing list