case GL_VERTEX_PROGRAM_ARB:
if (!state) {
GLuint i;
+ rmesa->curr_vp_hw = NULL;
R200_STATECHANGE( rmesa, vap );
rmesa->hw.vap.cmd[VAP_SE_VAP_CNTL] &= ~R200_VAP_PROG_VTX_SHADER_ENABLE;
/* mark all tcl atoms (tcl vector state got overwritten) dirty
/* FIXME: ugly as hell. need to call everything which might change tcl_output_vtxfmt0/1 and compsel */
r200UpdateSpecular( ctx );
r200Fogfv( ctx, GL_FOG_COORD_SRC, NULL );
+#if 1
/* shouldn't be necessary, as it's picked up anyway in r200ValidateState (_NEW_PROGRAM),
but without it doom3 locks up at always the same places. Why? */
+ /* FIXME: This can (and should) be replaced by a call to the TCL_STATE_FLUSH reg before
+ accessing VAP_SE_VAP_CNTL. Requires drm changes (done). Remove after some time... */
r200UpdateTextureState( ctx );
/* if we call r200UpdateTextureState we need the code below because we are calling it with
non-current derived enabled values which may revert the state atoms for frag progs even when
R200_STATECHANGE( rmesa, cst );
R200_STATECHANGE( rmesa, tf );
rmesa->hw.cst.cmd[CST_PP_CNTL_X] = 0;
+#endif
}
else {
- R200_STATECHANGE( rmesa, vap );
- if (!rmesa->TclFallback) {
- /* FIXME: fglrx sets R200_VAP_SINGLE_BUF_STATE_ENABLE too. Do we need it? */
- rmesa->hw.vap.cmd[VAP_SE_VAP_CNTL] |= R200_VAP_PROG_VTX_SHADER_ENABLE /*| R200_VAP_SINGLE_BUF_STATE_ENABLE*/;
- }
- R200_STATECHANGE( rmesa, vpi[0] );
- R200_STATECHANGE( rmesa, vpi[1] );
- R200_STATECHANGE( rmesa, vpp[0] );
- R200_STATECHANGE( rmesa, vpp[1] );
+ /* picked up later */
}
break;
TCL_FALLBACK(ctx, R200_TCL_FALLBACK_VERTEX_PROGRAM, fallback);
if (fallback) return;
+ R200_STATECHANGE( rmesa, vap );
+ /* FIXME: fglrx sets R200_VAP_SINGLE_BUF_STATE_ENABLE too. Do we need it?
+ maybe only when using more than 64 inst / 96 param? */
+ rmesa->hw.vap.cmd[VAP_SE_VAP_CNTL] |= R200_VAP_PROG_VTX_SHADER_ENABLE /*| R200_VAP_SINGLE_BUF_STATE_ENABLE*/;
+
R200_STATECHANGE( rmesa, pvs );
rmesa->hw.pvs.cmd[PVS_CNTL_1] = (0 << R200_PVS_CNTL_1_PROGRAM_START_SHIFT) |