summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/r300/r300_vertexprog.c
diff options
context:
space:
mode:
authorAapo Tahkola <aet@rasterburn.org>2005-03-08 03:29:46 +0000
committerAapo Tahkola <aet@rasterburn.org>2005-03-08 03:29:46 +0000
commit2579c32a5f53a0ad89f5af6111d5935529fd3b45 (patch)
tree2e7e427cb3e36be0604063d3b7d4e35603ddeeb4 /src/mesa/drivers/dri/r300/r300_vertexprog.c
parent0bd5373d94c9b74a7b724d74e2b2bc94c8d5bd77 (diff)
Improving Vladimirs alpha test fix a bit as it turns out r300Enable didnt correctly disable alpha test. Vertex programs with high vertex count now run a lot faster as software fallback is no longer on. Also disabling 'temp to result'-instructions as they probably violate the spec and dont seem to be something thats needed.
Diffstat (limited to 'src/mesa/drivers/dri/r300/r300_vertexprog.c')
-rw-r--r--src/mesa/drivers/dri/r300/r300_vertexprog.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_vertexprog.c b/src/mesa/drivers/dri/r300/r300_vertexprog.c
index 54aea4917b..02e0b5b739 100644
--- a/src/mesa/drivers/dri/r300/r300_vertexprog.c
+++ b/src/mesa/drivers/dri/r300/r300_vertexprog.c
@@ -492,7 +492,7 @@ static void translate_program(struct r300_vertex_program *vp)
for(i=0; i < operands; i++)
src[i]=vpi->SrcReg[i];
-
+#if 1
if(operands == 3){ /* TODO: scalars */
if( CMP_SRCS(src[1], src[2]) || CMP_SRCS(src[0], src[2]) ){
o_inst->op=MAKE_VSF_OP(R300_VPI_OUT_OP_ADD, u_temp_i,
@@ -538,7 +538,7 @@ static void translate_program(struct r300_vertex_program *vp)
u_temp_i--;
}
}
-
+#endif
/* these ops need special handling.
Ops that need temp vars should probably be given reg indexes starting at the end of tmp area. */
switch(vpi->Opcode){
@@ -759,8 +759,8 @@ static void translate_program(struct r300_vertex_program *vp)
exit(-1);
break;
}
- next:
-
+ next: ;
+#if 0
/* If instruction writes to result and one of the inputs is tmp, we move it at the end of program */
if(vpi->DstReg.File == PROGRAM_OUTPUT){
for(operand_index=0; operand_index < operands; operand_index++)
@@ -770,13 +770,13 @@ static void translate_program(struct r300_vertex_program *vp)
break;
}
}
-
+#endif
}
-
+#if 0
/* Put "tmp to result" instructions in */
for(i=0; i < vp->t2rs; i++, o_inst++)
*o_inst=t2rs[i];
-
+#endif
vp->program.length=(o_inst - vp->program.body.i) * 4;
if(u_temp_i < vp->num_temporaries)