summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/r300/compiler/r3xx_vertprog.c
diff options
context:
space:
mode:
authorNicolai Hähnle <nhaehnle@gmail.com>2009-10-03 21:28:59 +0200
committerNicolai Hähnle <nhaehnle@gmail.com>2009-10-03 23:37:16 +0200
commitb7cf887ca74561469c144f1d12227e1bcf277e7e (patch)
treec956777f799712573febf464310a1ec0f75f1991 /src/mesa/drivers/dri/r300/compiler/r3xx_vertprog.c
parent6d25b9125ec1e66e0e255b0ee20fe18dfe1076fa (diff)
r300/compiler: Introduce control flow instructions and refactor dataflow
Note that control flow instruction support isn't actually fully functional yet. Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
Diffstat (limited to 'src/mesa/drivers/dri/r300/compiler/r3xx_vertprog.c')
-rw-r--r--src/mesa/drivers/dri/r300/compiler/r3xx_vertprog.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/mesa/drivers/dri/r300/compiler/r3xx_vertprog.c b/src/mesa/drivers/dri/r300/compiler/r3xx_vertprog.c
index ac72f8cbb6..e1e735568d 100644
--- a/src/mesa/drivers/dri/r300/compiler/r3xx_vertprog.c
+++ b/src/mesa/drivers/dri/r300/compiler/r3xx_vertprog.c
@@ -588,7 +588,7 @@ void r3xx_compile_vertex_program(struct r300_vertex_program_compiler* compiler)
if (compiler->Base.Debug) {
fprintf(stderr, "Vertex program after native rewrite:\n");
- rc_print_program(&compiler->Base.Program, 0);
+ rc_print_program(&compiler->Base.Program);
fflush(stderr);
}
@@ -605,21 +605,25 @@ void r3xx_compile_vertex_program(struct r300_vertex_program_compiler* compiler)
if (compiler->Base.Debug) {
fprintf(stderr, "Vertex program after source conflict resolve:\n");
- rc_print_program(&compiler->Base.Program, 0);
+ rc_print_program(&compiler->Base.Program);
+ fflush(stderr);
+ }
+
+ rc_dataflow_deadcode(&compiler->Base, &dataflow_outputs_mark_used, compiler);
+
+ if (compiler->Base.Debug) {
+ fprintf(stderr, "Vertex program after deadcode:\n");
+ rc_print_program(&compiler->Base.Program);
fflush(stderr);
}
- rc_dataflow_annotate(&compiler->Base, &dataflow_outputs_mark_used, compiler);
- rc_dataflow_dealias(&compiler->Base);
rc_dataflow_swizzles(&compiler->Base);
- /* This invalidates dataflow annotations and should be replaced
- * by a future generic register allocation pass. */
allocate_temporary_registers(compiler);
if (compiler->Base.Debug) {
fprintf(stderr, "Vertex program after dataflow:\n");
- rc_print_program(&compiler->Base.Program, 0);
+ rc_print_program(&compiler->Base.Program);
fflush(stderr);
}