[Mesa-dev] [PATCH 1/5] glsl: Comment that expression flattening is used for matrix operations.

Kenneth Graunke kenneth at whitecape.org
Tue Mar 20 12:22:32 PDT 2012


Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
---
 src/glsl/ir_expression_flattening.cpp |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/src/glsl/ir_expression_flattening.cpp b/src/glsl/ir_expression_flattening.cpp
index 0b7c537..bd4ac67 100644
--- a/src/glsl/ir_expression_flattening.cpp
+++ b/src/glsl/ir_expression_flattening.cpp
@@ -27,7 +27,10 @@
  * Takes the leaves of expression trees and makes them dereferences of
  * assignments of the leaves to temporaries, according to a predicate.
  *
- * This is used for automatic function inlining, where we want to take
+ * This is used for breaking down matrix operations, where it's easier to
+ * create a temporary and work on each of its vector components individually.
+ *
+ * It is also used for automatic function inlining, where we want to take
  * an expression containing a call and move the call out to its own
  * assignment so that we can inline it at the appropriate place in the
  * instruction stream.
-- 
1.7.7.6



More information about the mesa-dev mailing list