summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAapo Tahkola <aet@rasterburn.org>2005-12-18 21:40:13 +0000
committerAapo Tahkola <aet@rasterburn.org>2005-12-18 21:40:13 +0000
commit11decab34a7e537b2d847a23f3b7faff0a9fe15c (patch)
tree1a37305c774189d66a99289b2f5e76fed952aba5 /src
parent3ad366dff2b8d015fe57da6a284088ccec1cea3f (diff)
Handle fatal case.
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/r300/r300_state.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_state.c b/src/mesa/drivers/dri/r300/r300_state.c
index ae22510091..52a3a4479d 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)