From: Aapo Tahkola Date: Sun, 18 Dec 2005 21:40:13 +0000 (+0000) Subject: Handle fatal case. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=11decab34a7e537b2d847a23f3b7faff0a9fe15c;p=mesa.git Handle fatal case. --- diff --git a/src/mesa/drivers/dri/r300/r300_state.c b/src/mesa/drivers/dri/r300/r300_state.c index ae22510091c..52a3a4479dc 100644 --- a/src/mesa/drivers/dri/r300/r300_state.c +++ b/src/mesa/drivers/dri/r300/r300_state.c @@ -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)