summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/r300/compiler/r3xx_vertprog.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_vertprog.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_vertprog.c')
-rw-r--r--src/mesa/drivers/dri/r300/compiler/r3xx_vertprog.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/r300/compiler/r3xx_vertprog.c b/src/mesa/drivers/dri/r300/compiler/r3xx_vertprog.c
index 29c6c869ff..c98e123411 100644
--- a/src/mesa/drivers/dri/r300/compiler/r3xx_vertprog.c
+++ b/src/mesa/drivers/dri/r300/compiler/r3xx_vertprog.c
@@ -1005,9 +1005,10 @@ void r3xx_compile_vertex_program(struct r300_vertex_program_compiler *c)
if (c->Base.is_r500) {
struct radeon_program_transformation transformations[] = {
{ &r300_transform_vertex_alu, 0 },
- { &r300_transform_trig_scale_vertex, 0 }
+ { &r300_transform_trig_scale_vertex, 0 },
+ { 0, 0 }
};
- radeonLocalTransform(&c->Base, 2, transformations);
+ radeonLocalTransform(&c->Base, transformations);
if (c->Base.Error)
return;
@@ -1015,9 +1016,10 @@ void r3xx_compile_vertex_program(struct r300_vertex_program_compiler *c)
} else {
struct radeon_program_transformation transformations[] = {
{ &r300_transform_vertex_alu, 0 },
- { &radeonTransformTrigSimple, 0 }
+ { &radeonTransformTrigSimple, 0 },
+ { 0, 0 }
};
- radeonLocalTransform(&c->Base, 2, transformations);
+ radeonLocalTransform(&c->Base, transformations);
if (c->Base.Error)
return;
@@ -1028,8 +1030,9 @@ void r3xx_compile_vertex_program(struct r300_vertex_program_compiler *c)
*/
struct radeon_program_transformation transformations2[] = {
{ &transform_nonnative_modifiers, 0 },
+ { 0, 0 }
};
- radeonLocalTransform(&c->Base, 1, transformations2);
+ radeonLocalTransform(&c->Base, transformations2);
if (c->Base.Error)
return;
@@ -1043,8 +1046,9 @@ void r3xx_compile_vertex_program(struct r300_vertex_program_compiler *c)
*/
struct radeon_program_transformation transformations[] = {
{ &transform_source_conflicts, 0 },
+ { 0, 0 }
};
- radeonLocalTransform(&c->Base, 1, transformations);
+ radeonLocalTransform(&c->Base, transformations);
if (c->Base.Error)
return;
}