summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2012-04-16 09:52:45 -0700
committerEric Anholt <[email protected]>2012-04-19 16:33:28 -0700
commit86f270e0a9d34dd2b6689b7f7c693620db65098c (patch)
tree1991b826ee6e074fe184ad704c63ee79779fa156 /src
parent6de5da079682efd3f8887d3e0a7add7e70a5433d (diff)
glsl: Fix up some comments in structure splitting, based on array-split work.
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/glsl/opt_structure_splitting.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/glsl/opt_structure_splitting.cpp b/src/glsl/opt_structure_splitting.cpp
index 2c1f6bb227a..6dd228e4e3f 100644
--- a/src/glsl/opt_structure_splitting.cpp
+++ b/src/glsl/opt_structure_splitting.cpp
@@ -61,7 +61,11 @@ public:
/** Number of times the variable is referenced, including assignments. */
unsigned whole_structure_access;
- bool declaration; /* If the variable had a decl in the instruction stream */
+ /* If the variable had a decl we can work with in the instruction
+ * stream. We can't do splitting on function arguments, which
+ * don't get this variable set.
+ */
+ bool declaration;
ir_variable **components;
@@ -171,8 +175,9 @@ ir_structure_reference_visitor::visit_enter(ir_assignment *ir)
ir_visitor_status
ir_structure_reference_visitor::visit_enter(ir_function_signature *ir)
{
- /* We don't want to descend into the function parameters and
- * dead-code eliminate them, so just accept the body here.
+ /* We don't have logic for structure-splitting function arguments,
+ * so just look at the body instructions and not the parameter
+ * declarations.
*/
visit_list_elements(this, &ir->body);
return visit_continue_with_parent;