summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/r300/compiler/r3xx_fragprog.c
diff options
context:
space:
mode:
authorMarek Olšák <maraeo@gmail.com>2010-09-01 03:19:05 +0200
committerMarek Olšák <maraeo@gmail.com>2010-09-04 18:56:21 +0200
commit0b9f8361470564563dc54e6b13879e73182d353b (patch)
tree937017f9442d42ef14a638c8f151b146304c90b8 /src/mesa/drivers/dri/r300/compiler/r3xx_fragprog.c
parent9a9aa7daa84341daae6a18dd6c13b958979d2343 (diff)
r300/compiler: refactor vertex shader compilation
First list compiler passes in an array, then run the new function rc_run_compiler. Every backend may need a different set of passes. This cleans up the mess in r3xx_compile_vertex_program.
Diffstat (limited to 'src/mesa/drivers/dri/r300/compiler/r3xx_fragprog.c')
-rw-r--r--src/mesa/drivers/dri/r300/compiler/r3xx_fragprog.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/mesa/drivers/dri/r300/compiler/r3xx_fragprog.c b/src/mesa/drivers/dri/r300/compiler/r3xx_fragprog.c
index 45d51b9835..a3c34beb02 100644
--- a/src/mesa/drivers/dri/r300/compiler/r3xx_fragprog.c
+++ b/src/mesa/drivers/dri/r300/compiler/r3xx_fragprog.c
@@ -111,10 +111,10 @@ void r3xx_compile_fragment_program(struct r300_fragment_program_compiler* c)
rc_unroll_loops(&c->Base);
debug_program_log(c, "after unroll loops");
} else {
- rc_transform_loops(&c->Base);
+ rc_transform_loops(&c->Base, NULL);
debug_program_log(c, "after transform loops");
- rc_emulate_branches(&c->Base);
+ rc_emulate_branches(&c->Base, NULL);
debug_program_log(c, "after emulate branches");
}
@@ -126,7 +126,7 @@ void r3xx_compile_fragment_program(struct r300_fragment_program_compiler* c)
{ &radeonTransformTrigScale, 0 },
{ 0, 0 }
};
- radeonLocalTransform(&c->Base, transformations);
+ rc_local_transform(&c->Base, transformations);
debug_program_log(c, "after native rewrite part 1");
@@ -134,10 +134,10 @@ void r3xx_compile_fragment_program(struct r300_fragment_program_compiler* c)
} else {
struct radeon_program_transformation transformations[] = {
{ &radeonTransformALU, 0 },
- { &radeonTransformTrigSimple, 0 },
+ { &r300_transform_trig_simple, 0 },
{ 0, 0 }
};
- radeonLocalTransform(&c->Base, transformations);
+ rc_local_transform(&c->Base, transformations);
debug_program_log(c, "after native rewrite part 1");
@@ -150,10 +150,10 @@ void r3xx_compile_fragment_program(struct r300_fragment_program_compiler* c)
{ &radeonTransformTEX, c },
{ 0, 0 }
};
- radeonLocalTransform(&c->Base, common_transformations);
+ rc_local_transform(&c->Base, common_transformations);
common_transformations[0].function = &radeonTransformALU;
- radeonLocalTransform(&c->Base, common_transformations);
+ rc_local_transform(&c->Base, common_transformations);
if (c->Base.Error)
return;
@@ -175,7 +175,7 @@ void r3xx_compile_fragment_program(struct r300_fragment_program_compiler* c)
debug_program_log(c, "after dataflow optimize");
- rc_dataflow_swizzles(&c->Base);
+ rc_dataflow_swizzles(&c->Base, NULL);
if (c->Base.Error)
return;