Handle fatal case.

This commit is contained in:
Aapo Tahkola
2005-12-18 21:40:13 +00:00
parent 3ad366dff2
commit 11decab34a

View File

@@ -1093,10 +1093,6 @@ void r300_setup_textures(GLcontext *ctx)
struct r300_tex_obj *t;
r300ContextPtr r300 = R300_CONTEXT(ctx);
int max_texture_unit=-1; /* -1 translates into no setup costs for fields */
GLuint OutputsWritten;
if(hw_tcl_on)
OutputsWritten = CURRENT_VERTEX_SHADER(ctx)->Base.OutputsWritten;
R300_STATECHANGE(r300, txe);
R300_STATECHANGE(r300, tex.filter);
@@ -1272,6 +1268,14 @@ void r300_setup_rs_unit(GLcontext *ctx)
col_interp_nr++;
}
/* Need at least one. This might still lock as the values are undefined... */
if (in_texcoords == 0 && col_interp_nr == 0) {
r300->hw.rr.cmd[R300_RR_ROUTE_0] |= 0
| R300_RS_ROUTE_0_COLOR
| (fp_reg++ << R300_RS_ROUTE_0_COLOR_DEST_SHIFT);
col_interp_nr++;
}
r300->hw.rc.cmd[1] = 0
| (in_texcoords << R300_RS_CNTL_TC_CNT_SHIFT)
| (col_interp_nr << R300_RS_CNTL_CI_CNT_SHIFT)