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 01:10:26 +0200
committerMarek Olšák <maraeo@gmail.com>2010-09-04 18:56:21 +0200
commitcc8f2d559989f516a6896ac137c8a79c7a212fa5 (patch)
treeb4b079a755de9715de6ab463a50eaea1a60166d2 /src/mesa/drivers/dri/r300/compiler/r3xx_fragprog.c
parent56de72c78afdb14d842a8fabbe2613a4d5eebb8f (diff)
r300/compiler: use null-terminated array of transformation functions
I need to reduce the number of parameters of each compiler pass function. This is part of a larger cleanup.
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, 9 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/r300/compiler/r3xx_fragprog.c b/src/mesa/drivers/dri/r300/compiler/r3xx_fragprog.c
index 96c5d6fda9..fdad1255e9 100644
--- a/src/mesa/drivers/dri/r300/compiler/r3xx_fragprog.c
+++ b/src/mesa/drivers/dri/r300/compiler/r3xx_fragprog.c
@@ -123,9 +123,10 @@ void r3xx_compile_fragment_program(struct r300_fragment_program_compiler* c)
{ &r500_transform_IF, 0 },
{ &radeonTransformALU, 0 },
{ &radeonTransformDeriv, 0 },
- { &radeonTransformTrigScale, 0 }
+ { &radeonTransformTrigScale, 0 },
+ { 0, 0 }
};
- radeonLocalTransform(&c->Base, 4, transformations);
+ radeonLocalTransform(&c->Base, transformations);
debug_program_log(c, "after native rewrite part 1");
@@ -133,9 +134,10 @@ void r3xx_compile_fragment_program(struct r300_fragment_program_compiler* c)
} else {
struct radeon_program_transformation transformations[] = {
{ &radeonTransformALU, 0 },
- { &radeonTransformTrigSimple, 0 }
+ { &radeonTransformTrigSimple, 0 },
+ { 0, 0 }
};
- radeonLocalTransform(&c->Base, 2, transformations);
+ radeonLocalTransform(&c->Base, transformations);
debug_program_log(c, "after native rewrite part 1");
@@ -146,11 +148,12 @@ void r3xx_compile_fragment_program(struct r300_fragment_program_compiler* c)
* Remember, lowering comes last! */
struct radeon_program_transformation common_transformations[] = {
{ &radeonTransformTEX, c },
+ { 0, 0 }
};
- radeonLocalTransform(&c->Base, 1, common_transformations);
+ radeonLocalTransform(&c->Base, common_transformations);
common_transformations[0].function = &radeonTransformALU;
- radeonLocalTransform(&c->Base, 1, common_transformations);
+ radeonLocalTransform(&c->Base, common_transformations);
if (c->Base.Error)
return;