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

Luca Barbieri lb at kemper.freedesktop.org
Thu Sep 9 18:38:10 UTC 2010


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

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