aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/r300/compiler/r3xx_fragprog.c
diff options
context:
space:
mode:
authorNicolai Hähnle <[email protected]>2009-10-03 21:28:59 +0200
committerNicolai Hähnle <[email protected]>2009-10-03 23:37:16 +0200
commitb7cf887ca74561469c144f1d12227e1bcf277e7e (patch)
treec956777f799712573febf464310a1ec0f75f1991 /src/mesa/drivers/dri/r300/compiler/r3xx_fragprog.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 <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/r300/compiler/r3xx_fragprog.c')
-rw-r--r--src/mesa/drivers/dri/r300/compiler/r3xx_fragprog.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/r300/compiler/r3xx_fragprog.c b/src/mesa/drivers/dri/r300/compiler/r3xx_fragprog.c
index bf9bea685ab..590201a9bab 100644
--- a/src/mesa/drivers/dri/r300/compiler/r3xx_fragprog.c
+++ b/src/mesa/drivers/dri/r300/compiler/r3xx_fragprog.c
@@ -24,6 +24,7 @@
#include <stdio.h>
+#include "radeon_dataflow.h"
#include "radeon_program_alu.h"
#include "r300_fragprog.h"
#include "r300_fragprog_swizzle.h"
@@ -107,17 +108,23 @@ void r3xx_compile_fragment_program(struct r300_fragment_program_compiler* c)
if (c->Base.Debug) {
fprintf(stderr, "Fragment Program: After native rewrite:\n");
- rc_print_program(&c->Base.Program, 0);
+ rc_print_program(&c->Base.Program);
+ fflush(stderr);
+ }
+
+ rc_dataflow_deadcode(&c->Base, &dataflow_outputs_mark_use, c);
+
+ if (c->Base.Debug) {
+ fprintf(stderr, "Fragment Program: After deadcode:\n");
+ rc_print_program(&c->Base.Program);
fflush(stderr);
}
- rc_dataflow_annotate(&c->Base, &dataflow_outputs_mark_use, c);
- rc_dataflow_dealias(&c->Base);
rc_dataflow_swizzles(&c->Base);
if (c->Base.Debug) {
fprintf(stderr, "Compiler: after dataflow passes:\n");
- rc_print_program(&c->Base.Program, 0);
+ rc_print_program(&c->Base.Program);
fflush(stderr);
}