summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/i965/brw_fs.cpp
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2010-08-26 12:02:26 -0700
committerEric Anholt <eric@anholt.net>2010-08-26 14:55:44 -0700
commitc1dfdcb93a8991788032d4906c5bf1a5b48cdc48 (patch)
treeb0dcc4585a8a6dede61e8dcb8b46394b76fd7656 /src/mesa/drivers/dri/i965/brw_fs.cpp
parent3a8ad33dde2f059b82ebf09f5cffa66c86f2e734 (diff)
i965: Add new pass to split vectors into scalar variables
Combined with the previous pass, this lets other optimization passes do their work thanks to ir_tree_grafting. Still have regression in instruction count with INTEL_NEW_FS, but register count is even better.
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_fs.cpp')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index d16e75a2ca..9a6ee7a010 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -37,6 +37,7 @@ extern "C" {
#include "talloc.h"
}
#include "../glsl/ir_optimization.h"
+#include "../glsl/ir_print_visitor.h"
struct gl_shader *
brw_new_shader(GLcontext *ctx, GLuint name, GLuint type)
@@ -87,6 +88,7 @@ brw_link_shader(GLcontext *ctx, struct gl_shader_program *prog)
if (using_new_fs && shader->Type == GL_FRAGMENT_SHADER) {
do_mat_op_to_vec(shader->ir);
brw_do_channel_expressions(shader->ir);
+ brw_do_vector_splitting(shader->ir);
}
}