&_tnl_fog_coordinate_stage,
&_tnl_texgen_stage,
&_tnl_texture_transform_stage,
- &_tnl_vertex_program_stage,
+ //&_tnl_vertex_program_stage,
/* Try again to go to tcl?
* - no good for asymmetric-twoside (do with multipass)
break;
case GL_ALPHA_TEST:
- R200_STATECHANGE(r300, at);
+ R300_STATECHANGE(r300, at);
if (state) {
r300->hw.at.cmd[R300_AT_ALPHA_TEST] |=
R300_ALPHA_TEST_ENABLE;
} else {
- r300->hw.at.cmd[R300_AT_ALPHA_TEST] |=
+ r300->hw.at.cmd[R300_AT_ALPHA_TEST] &=
~R300_ALPHA_TEST_ENABLE;
}
break;
}
for(i=0; i < mtu; i++) {
-
+ /*if(ctx->Texture.Unit[i].Enabled == 0)
+ continue;*/
if( ((r300->state.render_inputs & (_TNL_BIT_TEX0<<i))!=0) != ((ctx->Texture.Unit[i].Enabled)!=0) ) {
WARN_ONCE("Mismatch between render_inputs and ctx->Texture.Unit[i].Enabled value.\n");
}
r300_set_blend_state(ctx);
- r300->hw.at.cmd[R300_AT_ALPHA_TEST] = 0;
r300AlphaFunc(ctx, ctx->Color.AlphaFunc, ctx->Color.AlphaRef);
- if(ctx->Color.AlphaEnabled)
- r300->hw.at.cmd[R300_AT_ALPHA_TEST] |= R300_ALPHA_TEST_ENABLE;
+ r300Enable(ctx, GL_ALPHA_TEST, ctx->Color.AlphaEnabled);
/* Initialize magic registers
TODO : learn what they really do, or get rid of
r300->hw.unk4BC8.cmd[2] = 0;
r300->hw.unk4BC8.cmd[3] = 0;
- //r300AlphaFunc(ctx, ctx->Color.AlphaFunc, ctx->Color.AlphaRef);
-#if 0
- r300->hw.at.cmd[R300_AT_ALPHA_TEST] = 0;
-#endif
r300->hw.at.cmd[R300_AT_UNKNOWN] = 0;
r300->hw.unk4BD8.cmd[1] = 0;
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,
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){
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++)
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)