[Mesa-dev] [PATCH RFC 11/11] glsl: convert to and from SSA form in the compiler

Connor Abbott cwabbott0 at gmail.com
Wed Jan 22 09:16:58 PST 2014


This patch is mainly for allowing me to test these changes with piglit.
In the future, a do_ssa_optimizations() function will need to be
created and used by this code, as well as all other users of
do_common_optimizations().
---
 src/glsl/glsl_parser_extras.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/glsl/glsl_parser_extras.cpp b/src/glsl/glsl_parser_extras.cpp
index 9a1e0a2..fc88a4b 100644
--- a/src/glsl/glsl_parser_extras.cpp
+++ b/src/glsl/glsl_parser_extras.cpp
@@ -1488,6 +1488,10 @@ _mesa_glsl_compile_shader(struct gl_context *ctx, struct gl_shader *shader,
       struct gl_shader_compiler_options *options =
          &ctx->ShaderCompilerOptions[shader->Stage];
 
+      convert_to_ssa(shader->ir);
+
+      convert_from_ssa(shader->ir);
+
       /* Do some optimization at compile time to reduce shader IR size
        * and reduce later work if the same shader is linked multiple times
        */
-- 
1.8.3.1



More information about the mesa-dev mailing list