summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/r300/compiler/r3xx_vertprog.c
diff options
context:
space:
mode:
authorTom Stellard <tstellar@gmail.com>2010-08-03 15:23:23 -0700
committerTom Stellard <tstellar@gmail.com>2010-08-03 19:11:08 -0700
commit2824d5687a19e42ba0da8fd08e80610c4469a3b3 (patch)
tree62c397d260f054fc1fd502c796963b7ecbc78605 /src/mesa/drivers/dri/r300/compiler/r3xx_vertprog.c
parent9dcc5006660037665fe98bf2d9fb966e620a038b (diff)
r300/compiler: r500 hw support for break and continue in loops.
The BGNLOOP and ENDLOOP instructions are now being used correctly, which makes break and continue possible. The deadcode pass has been modified to handle breaks, and the compiler is more careful about which loops are unrolled.
Diffstat (limited to 'src/mesa/drivers/dri/r300/compiler/r3xx_vertprog.c')
-rw-r--r--src/mesa/drivers/dri/r300/compiler/r3xx_vertprog.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/r300/compiler/r3xx_vertprog.c b/src/mesa/drivers/dri/r300/compiler/r3xx_vertprog.c
index d347b4df9c..fe34ff67cd 100644
--- a/src/mesa/drivers/dri/r300/compiler/r3xx_vertprog.c
+++ b/src/mesa/drivers/dri/r300/compiler/r3xx_vertprog.c
@@ -633,7 +633,7 @@ static struct rc_swizzle_caps r300_vertprog_swizzle_caps = {
void r3xx_compile_vertex_program(struct r300_vertex_program_compiler* compiler)
{
struct emulate_loop_state loop_state;
-
+
compiler->Base.SwizzleCaps = &r300_vertprog_swizzle_caps;
addArtificialOutputs(compiler);
@@ -643,14 +643,13 @@ void r3xx_compile_vertex_program(struct r300_vertex_program_compiler* compiler)
/* XXX Ideally this should be done only for r3xx, but since
* we don't have branching support for r5xx, we use the emulation
* on all chipsets. */
- rc_transform_unroll_loops(&compiler->Base, &loop_state);
-
- debug_program_log(compiler, "after transform loops");
-
+
if (compiler->Base.is_r500){
+ rc_transform_loops(&compiler->Base, &loop_state, R500_VS_MAX_ALU);
rc_emulate_loops(&loop_state, R500_VS_MAX_ALU);
} else {
rc_emulate_loops(&loop_state, R300_VS_MAX_ALU);
+ rc_transform_loops(&compiler->Base, &loop_state, R300_VS_MAX_ALU);
}
debug_program_log(compiler, "after emulate loops");