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:02:19 UTC 2010


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

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 bc82966..dddc181 100644
--- a/src/glsl/main.cpp
+++ b/src/glsl/main.cpp
@@ -219,6 +219,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