Mesa (shader-work): glsl: TEMP: do array indexing lowering and structure split in main.cpp

Luca Barbieri lb at kemper.freedesktop.org
Tue Sep 14 02:30:47 UTC 2010


Module: Mesa
Branch: shader-work
Commit: 59bc1f08a2fa044dcd9042c5bf08d7dbe6ef72e4
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=59bc1f08a2fa044dcd9042c5bf08d7dbe6ef72e4

Author: Luca Barbieri <luca at luca-barbieri.com>
Date:   Thu Sep  9 20:15:09 2010 +0200

glsl: TEMP: do array indexing lowering and structure split in main.cpp

The places that run optimization passes should be unified and refactored,
so that things need not be added everywhere.

Currently add this to main.cpp; OpenGL will need this too depending on
options.

---

 src/glsl/main.cpp |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/glsl/main.cpp b/src/glsl/main.cpp
index 94c14a5..bfa1b71 100644
--- a/src/glsl/main.cpp
+++ b/src/glsl/main.cpp
@@ -217,6 +217,9 @@ compile_shader(GLcontext *ctx, struct gl_shader *shader)
 	 progress = set_loop_controls(shader->ir, ls) || progress;
 	 progress = unroll_loops(shader->ir, ls, 32) || progress;
 	 delete ls;
+
+	 progress = do_array_index_to_cond_assign(shader->ir) || progress;
+	 progress = do_structure_splitting(shader->ir) || progress;
       } while (progress);
 
       validate_ir_tree(shader->ir);




More information about the mesa-commit mailing list